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
SOaAS
psot.repository
Commits
301d74c2
Commit
301d74c2
authored
Nov 21, 2017
by
Lukas Jelonek
Browse files
Replace drmaa with SGE
parent
d9b2d590
Changes
1
Hide whitespace changes
Inline
Side-by-side
psot/nextflow.py
View file @
301d74c2
...
@@ -18,6 +18,7 @@ def flatten(d, parent_key='', sep='_'):
...
@@ -18,6 +18,7 @@ def flatten(d, parent_key='', sep='_'):
analysis_template
=
Template
(
'''
analysis_template
=
Template
(
'''
process ${id} {
process ${id} {
executor '${executor}'
executor '${executor}'
${clusterOptions}
input:
input:
file fasta from for_${id}${chunks}
file fasta from for_${id}${chunks}
...
@@ -127,8 +128,6 @@ def setup_execution_directory(execution):
...
@@ -127,8 +128,6 @@ def setup_execution_directory(execution):
def
execute_analysis
(
execution
):
def
execute_analysis
(
execution
):
old_cwd
=
os
.
getcwd
()
old_cwd
=
os
.
getcwd
()
if
execution
[
'use_cluster'
]:
os
.
environ
[
'NXF_DRMAA'
]
=
'/usr/share/java/drmaa.jar'
os
.
chdir
(
execution
[
'directory'
])
os
.
chdir
(
execution
[
'directory'
])
os
.
system
(
'nextflow run '
+
execution
[
'directory'
]
+
'/main.nf --fasta '
+
execution
[
'fasta'
]
+
' --output '
+
execution
[
'output'
])
os
.
system
(
'nextflow run '
+
execution
[
'directory'
]
+
'/main.nf --fasta '
+
execution
[
'fasta'
]
+
' --output '
+
execution
[
'output'
])
os
.
chdir
(
old_cwd
)
os
.
chdir
(
old_cwd
)
...
@@ -145,11 +144,13 @@ Channel.fromPath(params.fasta).set{fasta}''')
...
@@ -145,11 +144,13 @@ Channel.fromPath(params.fasta).set{fasta}''')
for
m
in
modules
:
for
m
in
modules
:
config
=
flatten
(
m
)
config
=
flatten
(
m
)
if
execution
[
'use_cluster'
]:
if
execution
[
'use_cluster'
]:
config
[
'executor'
]
=
'
drmaa
'
config
[
'executor'
]
=
'
sge
'
config
[
'chunks'
]
=
".splitFasta(by:300, file:'input')"
config
[
'chunks'
]
=
".splitFasta(by:300, file:'input')"
config
[
'clusterOptions'
]
=
"clusterOptions='-S /bin/bash'"
else
:
else
:
config
[
'executor'
]
=
'local'
config
[
'executor'
]
=
'local'
config
[
'chunks'
]
=
''
config
[
'chunks'
]
=
''
config
[
'clusterOptions'
]
=
''
fragments
.
append
(
analysis_template
.
substitute
(
config
))
fragments
.
append
(
analysis_template
.
substitute
(
config
))
if
execution
[
'mode'
]
==
'live'
:
if
execution
[
'mode'
]
==
'live'
:
...
...
Write
Preview
Supports
Markdown
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