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