Skip to content
Snippets Groups Projects
Commit 6ec7a47e authored by George Marchment's avatar George Marchment
Browse files

small update to get the generation of the relevant processes to work + removed...

small update to get the generation of the relevant processes to work + removed the creation of empty channels in the case of false condition for the call of the clusters
parent 9c657b98
No related branches found
No related tags found
No related merge requests found
Pipeline #14661 failed with stage
in 2 minutes and 21 seconds
......@@ -527,6 +527,8 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
for t in tools:
try:
val = tool_2_nb_usage[t]
if(t in ['python', 'r', 'perl', 'julia']):#Cause in this case it is a custom script -> one should hope that it is important in this case
val = 1
except:
val = 1
if(val<min_value):
......@@ -1446,9 +1448,11 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
#If the tools have been extracted they can be used to name the none relevant processes
if(extract_tools):
for p in processes_added:
for t in p.get_code():
for t in p.get_tools():
try:
val = tool_2_nb_usage[t]
if(t in ['python', 'r', 'perl', 'julia']):#Cause in this case it is a custom script -> one should hope that it is important in this case
val = 1
except:
val = 1
if(val<min_tool):
......@@ -1560,7 +1564,10 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
#If there was only one single condition in the subworkflow cluster -> then we add it when the call is done
if(len(conditions_in_subworkflow)==1):
#TODO -> i think the case "else" -> needs to be removed cause sometimes the the empty channel created may overwrite an existing one
subworkfow_call = f"if({conditions_in_subworkflow[0].split('$$__$$')[0]}) {{\n{subworkfow_call_case_true}\n}} else {{\n{subworkfow_call_case_false}\n}}"
#OG
#subworkfow_call = f"if({conditions_in_subworkflow[0].split('$$__$$')[0]}) {{\n{subworkfow_call_case_true}\n}} else {{\n{subworkfow_call_case_false}\n}}"
#New
subworkfow_call = f"if({conditions_in_subworkflow[0].split('$$__$$')[0]}) {{\n{subworkfow_call_case_true}\n}}"
else:
subworkfow_call = subworkfow_call_case_true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment