diff --git a/src/workflow.py b/src/workflow.py index 0cbfb610d9294853fb7b969d14867102e3b2f8cd..b673fc232f33f73c39fa36657934ce1e97ce6535 100644 --- a/src/workflow.py +++ b/src/workflow.py @@ -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