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
8c34e904
Commit
8c34e904
authored
Mar 07, 2018
by
Lukas Jelonek
Browse files
Fix bug: Cluster execution does not work within a virtual environment
parent
708eebeb
Changes
3
Show whitespace changes
Inline
Side-by-side
psot/config.py
View file @
8c34e904
...
...
@@ -105,6 +105,11 @@ class Config:
config
[
'install_path'
]
=
pkg_resources
.
resource_filename
(
'psot'
,
''
)
config
[
'helpers_path'
]
=
pkg_resources
.
resource_filename
(
'psot'
,
'helpers'
)
config
[
'repository_paths'
]
=
self
.
repo_paths
# check if running inside a virtual environment
if
'VIRTUAL_ENV'
in
os
.
environ
:
config
[
'venv'
]
=
os
.
environ
[
'VIRTUAL_ENV'
]
self
.
merge_modules_in_profiles
(
config
)
return
config
...
...
psot/main.py
View file @
8c34e904
...
...
@@ -67,6 +67,8 @@ def generate_execution(config, args):
execution
[
'fasta'
]
=
os
.
path
.
abspath
(
args
.
fasta
)
execution
[
'output'
]
=
os
.
path
.
abspath
(
args
.
output
)
execution
[
'install_path'
]
=
config
[
'install_path'
]
if
'venv'
in
config
:
execution
[
'venv'
]
=
config
[
'venv'
]
if
args
.
execution_dir
:
execution
[
'directory'
]
=
os
.
path
.
abspath
(
args
.
execution_dir
)
else
:
...
...
psot/nextflow.py
View file @
8c34e904
...
...
@@ -191,6 +191,8 @@ Channel.fromPath(params.fasta).set{fasta}''')
config
[
'executor'
]
=
'sge'
config
[
'chunks'
]
=
".splitFasta(by:300, file:'input')"
config
[
'clusterOptions'
]
=
"clusterOptions='-S /bin/bash'"
if
'venv'
in
execution
:
config
[
'clusterOptions'
]
=
config
[
'clusterOptions'
]
+
"
\n
beforeScript 'export PS1=; source "
+
execution
[
'venv'
]
+
"/bin/activate'"
else
:
config
[
'executor'
]
=
'local'
config
[
'chunks'
]
=
''
...
...
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