Commit 301d74c2 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Replace drmaa with SGE

parent d9b2d590
......@@ -18,6 +18,7 @@ def flatten(d, parent_key='', sep='_'):
analysis_template = Template ('''
process ${id} {
executor '${executor}'
${clusterOptions}
input:
file fasta from for_${id}${chunks}
......@@ -127,8 +128,6 @@ def setup_execution_directory(execution):
def execute_analysis(execution):
old_cwd = os.getcwd()
if execution['use_cluster']:
os.environ['NXF_DRMAA'] = '/usr/share/java/drmaa.jar'
os.chdir(execution['directory'])
os.system('nextflow run ' + execution['directory'] + '/main.nf --fasta ' + execution['fasta'] + ' --output ' + execution['output'])
os.chdir(old_cwd)
......@@ -145,11 +144,13 @@ Channel.fromPath(params.fasta).set{fasta}''')
for m in modules:
config = flatten(m)
if execution['use_cluster']:
config['executor'] = 'drmaa'
config['executor'] = 'sge'
config['chunks'] = ".splitFasta(by:300, file:'input')"
config['clusterOptions'] = "clusterOptions='-S /bin/bash'"
else:
config['executor'] = 'local'
config['chunks'] = ''
config['clusterOptions'] = ''
fragments.append(analysis_template.substitute(config))
if execution['mode'] == 'live':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment