Skip to content
GitLab
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
71a5fb8f
Commit
71a5fb8f
authored
Nov 15, 2013
by
Jerome Mariette
Browse files
get_exec_path handle sub execution files
parent
2f789d18
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/jflow/component.py
View file @
71a5fb8f
...
...
@@ -138,10 +138,14 @@ class Component(object):
exec_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)),
"../bin"
,
software
)
elif
exec_path
is
None
and
os
.
path
.
isfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)),
"bin"
,
software
)):
exec_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)),
"bin"
,
software
)
if
exec_path
is
None
and
which
(
software
)
==
None
:
el
if
exec_path
is
None
and
which
(
software
)
==
None
:
sys
.
stderr
.
write
(
"Error: '"
+
software
+
"' path connot be retrieved either in the PATH and in the application.properties file!
\n
"
)
sys
.
exit
(
1
)
else
:
exec_path
=
software
elif
exec_path
is
None
and
which
(
software
)
!=
None
:
exec_path
=
software
elif
exec_path
!=
None
and
not
os
.
path
.
isfile
(
exec_path
):
sys
.
stderr
.
write
(
"Error: '"
+
exec_path
+
"' set for '"
+
software
+
"' does not exists, please provide a valid path!
\n
"
)
sys
.
exit
(
1
)
return
exec_path
def
get_nameid
(
self
):
...
...
src/jflow/workflow.py
View file @
71a5fb8f
...
...
@@ -184,10 +184,14 @@ class Workflow(threading.Thread):
exec_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)),
"../bin"
,
software
)
elif
exec_path
is
None
and
os
.
path
.
isfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)),
"bin"
,
software
)):
exec_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
)),
"bin"
,
software
)
if
exec_path
is
None
and
utils
.
which
(
software
)
==
None
:
el
if
exec_path
is
None
and
utils
.
which
(
software
)
==
None
:
sys
.
stderr
.
write
(
"Error: '"
+
software
+
"' path connot be retrieved either in the PATH and in the application.properties file!
\n
"
)
sys
.
exit
(
1
)
else
:
exec_path
=
software
elif
exec_path
is
None
and
utils
.
which
(
software
)
!=
None
:
exec_path
=
software
elif
exec_path
!=
None
and
not
os
.
path
.
isfile
(
exec_path
):
sys
.
stderr
.
write
(
"Error: '"
+
exec_path
+
"' set for '"
+
software
+
"' does not exists, please provide a valid path!
\n
"
)
sys
.
exit
(
1
)
return
exec_path
def
add_component
(
self
,
component_name
,
args
=
[],
kwargs
=
{},
component_prefix
=
"default"
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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