Commit 00b599a0 authored by Marc's avatar Marc
Browse files

add "docker" AND "singularity" properties in module configs; config.py reads...

add "docker" AND  "singularity" properties in module configs; config.py reads named options correctly
parent 368d2f70
......@@ -64,6 +64,13 @@ class Repository:
module['analysis']['parameters'] = {}
if module['converter']['parameters'] is None:
module['converter']['parameters'] = {}
if not 'container' in module['analysis'] or module['analysis']['container'] is None:
module['analysis']['container'] = {"docker":None, "singularity":None}
elif not 'docker' in module['analysis']['container']:
module['analysis']['container']['docker'] = None
elif not 'singularity' in module['analysis']['container']:
module['analysis']['container']['singularity'] = None
module['analysis']['script'] = os.path.abspath(os.path.join(self.get_scripts_location(), module['analysis']['script']))
module['converter']['script'] = os.path.abspath(os.path.join(self.get_scripts_location(), module['converter']['script']))
return modules
......
......@@ -14,7 +14,7 @@ analysis:
database: '/vol/biodb/uniprot/uniprot_sprot.fasta'
evalue: 1e-10
use_accession:
container: 'blastp_swissprot'
container:
# The name of the result to json converter script. Must take one parameter, the
# result file from the analysis_script
......
......@@ -12,7 +12,7 @@ analysis:
script: 'run_ghostx.py'
parameters:
database: '/vol/biodb/ghostx/uniprot_sprot'
container: 'ghostx_swissprot'
container:
# The name of the result to json converter script. Must take one parameter, the
# result file from the analysis_script
......
......@@ -16,7 +16,7 @@ analysis:
execution:
cluster:
chunksize: 200
container: 'hmmer_pfam_a'
container:
# The name of the result to json converter script. Must take one parameter, the
# result file from the analysis_script
......
......@@ -14,7 +14,9 @@ analysis:
# specify additional default configuration here
parameters:
# run script in a container
container: 'psot'
container:
docker: 'cbs-tools'
singularity: '/home/ubuntu/project/work/singularity/cbs-tools/cbs-tools.sif'
# The configuration of the script for the json conversion step.
converter:
......
......@@ -14,7 +14,9 @@ analysis:
# specify additional default configuration here
parameters:
# run script in a container
container: 'psot'
container:
docker: 'cbs-tools'
singularity: '/home/ubuntu/project/work/singularity/cbs-tools/cbs-tools.sif'
# The configuration of the script for the json conversion step.
converter:
......
......@@ -14,7 +14,9 @@ analysis:
# specify additional default configuration here
parameters:
# run script in a container
container: 'psot'
container:
docker: 'cbs-tools'
singularity: '/home/ubuntu/project/work/singularity/cbs-tools/cbs-tools.sif'
# The configuration of the script for the json conversion step.
converter:
......
......@@ -6,6 +6,5 @@ modules:
signalp:
organism: 'euk'
tmhmm:
hmmer_pfam_a:
......@@ -256,8 +256,10 @@ def generate_nextflow_config(execution):
config = {}
config['id'] = m['id']
if execution['docker'] or execution['singularity'] and 'container' in m['analysis']:
config['container'] = "container = " + "'" + m['analysis']['container'] + "'"
if execution['docker'] and m['analysis']['container']['docker']:
config['container'] = "container = " + "'" + m['analysis']['container']['docker'] + "'"
elif execution['singularity'] and m['analysis']['container']['singularity']:
config['container'] = "container = " + "'" + m['analysis']['container']['singularity'] + "'"
else:
config['container'] = ''
......
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