Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psot.repository
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOaAS
psot.repository
Commits
0ef7a504
Commit
0ef7a504
authored
7 years ago
by
Lukas Jelonek
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug: convert_targetp still has problems when installed in a virtualenv
parent
8c34e904
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
psot/nextflow.py
+20
-14
20 additions, 14 deletions
psot/nextflow.py
psot/scripts/convert_targetp.py
+1
-1
1 addition, 1 deletion
psot/scripts/convert_targetp.py
with
21 additions
and
15 deletions
psot/nextflow.py
+
20
−
14
View file @
0ef7a504
...
...
@@ -19,6 +19,7 @@ analysis_template = Template ('''
process ${id} {
executor
'
${executor}
'
${clusterOptions}
${beforeScript}
input:
file fasta from for_${id}${chunks}
...
...
@@ -50,6 +51,7 @@ process generate_${id}_live_results {
'''
)
convert_live_template
=
Template
(
'''
process convert_${id}_to_json {
${beforeScript}
input:
file result from ${id}_results
...
...
@@ -64,6 +66,7 @@ process convert_${id}_to_json {
'''
)
convert_info_template
=
Template
(
'''
process convert_${id}_to_json {
${beforeScript}
input:
file result from ${id}_results
...
...
@@ -78,6 +81,7 @@ process convert_${id}_to_json {
'''
)
convert_template
=
Template
(
'''
process convert_${id}_to_json {
${beforeScript}
input:
file result from ${id}_results
...
...
@@ -92,6 +96,7 @@ process convert_${id}_to_json {
'''
)
retrieve_informations_template
=
Template
(
'''
process retrieve_informations_for_${id} {
${beforeScript}
input:
file result from ${id}_json_info
...
...
@@ -107,6 +112,7 @@ process retrieve_informations_for_${id} {
'''
)
retrieve_informations_live_template
=
Template
(
'''
process retrieve_informations_for_${id} {
${beforeScript}
input:
file result from ${id}_json_info
...
...
@@ -187,12 +193,16 @@ Channel.fromPath(params.fasta).set{fasta}''')
for
m
in
modules
:
config
=
flatten
(
m
)
config
[
'
output
'
]
=
execution
[
'
output
'
]
if
'
venv
'
in
execution
:
config
[
'
beforeScript
'
]
=
"
beforeScript
'
export PS1=; source
"
+
execution
[
'
venv
'
]
+
"
/bin/activate
'"
else
:
config
[
'
beforeScript
'
]
=
''
if
execution
[
'
use_cluster
'
]:
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
'
]
=
''
...
...
@@ -200,21 +210,17 @@ Channel.fromPath(params.fasta).set{fasta}''')
fragments
.
append
(
analysis_template
.
substitute
(
config
))
if
execution
[
'
mode
'
]
==
'
live
'
and
not
execution
[
'
fetch_informations
'
]:
fragments
.
append
(
convert_live_template
.
substitute
(
flatten
(
m
)))
copy
=
deepcopy
(
m
)
copy
[
'
output
'
]
=
execution
[
'
output
'
]
fragments
.
append
(
live_results_template
.
substitute
(
flatten
(
copy
)))
fragments
.
append
(
convert_live_template
.
substitute
(
config
))
fragments
.
append
(
live_results_template
.
substitute
(
config
))
elif
execution
[
'
mode
'
]
==
'
live
'
and
execution
[
'
fetch_informations
'
]:
fragments
.
append
(
convert_info_template
.
substitute
(
flatten
(
m
)))
fragments
.
append
(
retrieve_informations_live_template
.
substitute
(
flatten
(
m
)))
copy
=
deepcopy
(
m
)
copy
[
'
output
'
]
=
execution
[
'
output
'
]
fragments
.
append
(
live_results_template
.
substitute
(
flatten
(
copy
)))
fragments
.
append
(
convert_info_template
.
substitute
(
config
))
fragments
.
append
(
retrieve_informations_live_template
.
substitute
(
config
))
fragments
.
append
(
live_results_template
.
substitute
(
config
))
elif
execution
[
'
mode
'
]
==
'
complete
'
and
execution
[
'
fetch_informations
'
]:
fragments
.
append
(
convert_info_template
.
substitute
(
flatten
(
m
)
))
fragments
.
append
(
retrieve_informations_template
.
substitute
(
flatten
(
m
)
))
fragments
.
append
(
convert_info_template
.
substitute
(
config
))
fragments
.
append
(
retrieve_informations_template
.
substitute
(
config
))
else
:
fragments
.
append
(
convert_template
.
substitute
(
flatten
(
m
)
))
fragments
.
append
(
convert_template
.
substitute
(
config
))
json_inputs
=
[]
for
m
in
modules
:
...
...
This diff is collapsed.
Click to expand it.
psot/scripts/convert_targetp.py
+
1
−
1
View file @
0ef7a504
#!/usr/bin/python3
#!/usr/bin/
env
python3
import
sys
import
json
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment