Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
ee06a0f7
Commit
ee06a0f7
authored
Oct 24, 2014
by
Jerome Mariette
Browse files
change the graph class by a good one
parent
323e99a1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/jflow/workflow.py
View file @
ee06a0f7
...
...
@@ -35,7 +35,7 @@ from inspect import getcallargs
import
jflow
import
jflow.utils
as
utils
from
jflow.utils
import
validate_email
from
jflow
.graph
import
G
raph
from
pygraph.classes
.graph
import
g
raph
from
jflow.workflows_manager
import
WorkflowsManager
,
JFlowConfigReader
from
jflow.utils
import
get_octet_string_representation
,
get_nb_octet
from
jflow.parameter
import
*
...
...
@@ -288,15 +288,16 @@ class Workflow(threading.Thread):
self
.
__setattr__
(
param
.
name
,
new_param
)
def
get_execution_graph
(
self
):
graph
=
Graph
(
graph_dict
=
{})
gr
=
digraph
()
for
cpt
in
self
.
components
:
gr
.
add_nodes
([
cpt
.
get_nameid
()])
for
cpt
in
self
.
components
:
graph
.
add_vertex
(
cpt
.
get_nameid
())
for
ioparameter
in
cpt
.
__dict__
.
values
():
if
(
issubclass
(
ioparameter
.
__class__
,
InputFile
)
or
issubclass
(
ioparameter
.
__class__
,
OutputFile
)
or
issubclass
(
ioparameter
.
__class__
,
InputFileList
)
or
issubclass
(
ioparameter
.
__class__
,
OutputFileList
)
):
if
(
issubclass
(
ioparameter
.
__class__
,
InputFile
)
or
issubclass
(
ioparameter
.
__class__
,
InputFileList
)):
for
pc_nameid
in
ioparameter
.
parent_component_nameid
:
graph
.
add_edge
({
ioparameter
.
component_nameid
,
pc_nameid
})
return
graph
try
:
gr
.
add_edge
((
pc_nameid
,
ioparameter
.
component_nameid
))
except
:
pass
return
gr
def
set_stderr
(
self
):
if
hasattr
(
self
,
"stderr"
)
and
self
.
stderr
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment