Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SOaAS
psot.repository
Commits
8a66566f
Commit
8a66566f
authored
Feb 21, 2019
by
Marc
Browse files
database directory is written automatically in nextflow config (docker or singularity scope)
parent
5e64d135
Changes
3
Hide whitespace changes
Inline
Side-by-side
psot/config.py
View file @
8a66566f
...
...
@@ -11,7 +11,7 @@ class Repository:
def
load_config
(
self
):
'''return a dictionary with the whole configuration for this repository'''
config
=
self
.
load_config_file
()
config
[
'profiles'
]
=
self
.
load_profiles
(
config
)
config
[
'profiles'
]
=
self
.
load_profiles
()
config
[
'modules'
]
=
self
.
load_modules
(
config
)
self
.
normalize_profiles
(
config
[
'profiles'
])
return
config
...
...
@@ -41,7 +41,7 @@ class Repository:
config
=
yaml
.
load
(
f
)
return
config
def
load_profiles
(
self
,
config
):
def
load_profiles
(
self
):
profiles
=
[]
for
manifest
in
self
.
get_profile_manifests
():
with
(
open
(
manifest
))
as
f
:
...
...
psot/main.py
View file @
8a66566f
...
...
@@ -73,6 +73,7 @@ def generate_execution(config, args):
execution
[
'output'
]
=
os
.
path
.
abspath
(
args
.
output
)
execution
[
'install_path'
]
=
config
[
'install_path'
]
execution
[
'helpers_path'
]
=
config
[
'helpers_path'
]
execution
[
'database_path'
]
=
config
[
'databases'
][
'localpath'
]
execution
[
'docker'
]
=
args
.
docker
execution
[
'singularity'
]
=
args
.
singularity
if
'venv'
in
config
:
...
...
psot/nextflow.py
View file @
8a66566f
...
...
@@ -337,6 +337,7 @@ def generate_nextflow_script(execution):
def
generate_nextflow_config
(
execution
):
modules
=
execution
[
'modules'
]
database_path
=
execution
[
'database_path'
]
fragments
=
[]
...
...
@@ -344,15 +345,15 @@ def generate_nextflow_config(execution):
fragments
.
append
(
'''docker {
enabled = 'true'
fixOwnership = 'true'
runOptions = '--volume=
/home/ubuntu/db:
/databases'
runOptions = '--volume=
{path}
/databases'
}
'''
)
'''
.
format
(
path
=
database_path
)
)
elif
execution
[
'singularity'
]:
fragments
.
append
(
'''singularity {
enabled = 'true'
runOptions = '--bind
/home/ubuntu/db
:/databases'
runOptions = '--bind
{path}
:/databases'
}
'''
)
'''
.
format
(
path
=
database_path
)
)
fragments
.
append
(
'''process { '''
)
...
...
Write
Preview
Markdown
is supported
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