Commit d222fc30 authored by Marc's avatar Marc
Browse files

bug fixed: nextflow.config now also correct if processes are not started in virtual environment

parent 08bdbb12
......@@ -255,11 +255,6 @@ def generate_nextflow_config(execution):
config['container'] = "container = " + "'" + m['analysis']['container'] + "'"
else:
config['container'] = ''
if 'venv' in execution:
config['beforeScript'] = "beforeScript = 'export PS1=; source " + execution['venv'] + "/bin/activate'"
else:
config['beforeScript'] = ''
if execution['use_cluster']:
config['executor'] = 'sge'
......@@ -267,13 +262,20 @@ def generate_nextflow_config(execution):
else:
config['executor'] = 'local'
config['clusterOptions'] = ''
fragments.append(analysis_config_template.substitute(config))
if execution['fetch_informations']:
config['process_names'] = "'" + Template('convert_${id}_to_json|retrieve_informations_for_${id}').substitute(config) + "'"
if 'venv' in execution:
config['beforeScript'] = "beforeScript = 'export PS1=; source " + execution['venv'] + "/bin/activate'"
if execution['fetch_informations']:
config['process_names'] = "'" + Template('convert_${id}_to_json|retrieve_informations_for_${id}').substitute(config) + "'"
else:
config['process_names'] = Template('convert_${id}_to_json').substitute(config)
fragments.append(analysis_config_template.substitute(config))
fragments.append(beforeScript_config_template.substitute(config))
else:
config['process_names'] = Template('convert_${id}_to_json').substitute(config)
fragments.append(beforeScript_config_template.substitute(config))
config['beforeScript'] = ''
fragments.append(analysis_config_template.substitute(config))
fragments.append('''}''')
......
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