Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BioFlow-Insight
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
shareFAIR
BioFlow-Insight
Commits
53f588fd
Commit
53f588fd
authored
4 months ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
Fixed: placing the call of a subworkflow outside of conditions
parent
fec4dbd5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14389
failed with stage
Stage:
in 2 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/workflow.py
+18
-2
18 additions, 2 deletions
src/workflow.py
with
18 additions
and
2 deletions
src/workflow.py
+
18
−
2
View file @
53f588fd
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
from
.nextflow_file
import
Nextflow_File
from
.nextflow_file
import
Nextflow_File
from
.ro_crate
import
RO_Crate
from
.ro_crate
import
RO_Crate
from
.
import
constant
from
.
import
constant
from
.outils
import
is_git_directory
,
format_with_tabs
,
replace_thing_by_call
,
replace_group1
,
group_together_ifs
,
extract_curly
,
remove_extra_jumps
,
get_channels_to_add_in_false_conditions
from
.outils
import
is_git_directory
,
format_with_tabs
,
replace_thing_by_call
,
replace_group1
,
group_together_ifs
,
extract_curly
,
remove_extra_jumps
,
get_channels_to_add_in_false_conditions
,
extract_conditions
from
.outils_graph
import
flatten_dico
,
initia_link_dico_rec
,
get_number_cycles
from
.outils_graph
import
flatten_dico
,
initia_link_dico_rec
,
get_number_cycles
from
.outils_annotate
import
get_tools_commands_from_user_for_process
from
.outils_annotate
import
get_tools_commands_from_user_for_process
from
.bioflowinsighterror
import
BioFlowInsightError
from
.bioflowinsighterror
import
BioFlowInsightError
...
@@ -978,9 +978,25 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
...
@@ -978,9 +978,25 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
#Replace the ankers by the calls of the subworkflows
#Replace the ankers by the calls of the subworkflows
for
i
in
range
(
len
(
subworkflow_clusters_to_add
)):
for
i
in
range
(
len
(
subworkflow_clusters_to_add
)):
code
=
code
.
replace
(
f
"
//Anker_cluster
{
i
}
"
,
subworkflow_cluster_calls_to_add
[
i
])
#Extracting the conditions in the code
conditions_in_code
=
extract_conditions
(
code
)
anker
=
f
"
//Anker_cluster
{
i
}
"
pos_anker
=
code
.
find
(
anker
)
#For each anker get the condition in which it is called
#Cause we do not want the call of the subworkflows to be done in a condition
#So around the call we place ""}} call if(){if(){"" -> so it's executed ouside of a condition
conditions_for_anker
=
[]
for
c
in
conditions_in_code
:
if
(
conditions_in_code
[
c
][
0
]
<
pos_anker
and
pos_anker
<
conditions_in_code
[
c
][
1
]):
conditions_for_anker
.
append
(
c
.
split
(
"
$$__$$
"
)[
0
])
#Placing the extract curlies around it
subworkflow_call
=
subworkflow_cluster_calls_to_add
[
i
]
for
c
in
conditions_for_anker
:
subworkflow_call
=
f
"
\n
}}
\n
{
subworkflow_call
}
\n
if(
{
c
}
){{
\n
"
code
=
code
.
replace
(
anker
,
subworkflow_call
)
for
old
,
new
in
channels_to_replace_outside_of_cluster
:
for
old
,
new
in
channels_to_replace_outside_of_cluster
:
...
...
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