diff --git a/src/workflow.py b/src/workflow.py index 11bcd9769ad9f2ad7612d705e804112e94a20f6f..10c4d0cd21ca3d14d3ab7dcdf22bb0b4359e02e7 100644 --- a/src/workflow.py +++ b/src/workflow.py @@ -743,7 +743,11 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen return emits - + def remove_GG_from_code(self, code): + def replacer(match): + return match.group(1) + return re.sub(f"(\w+)_GG_\d+", replacer, code) + #Method which rewrites the workflow follwong the user view #Conert workflow to user_view only makes sense when the option duplicate is activated -> otherwise is doesn't make sense + it makes the analysis way more complicated def convert_workflow_2_user_view(self, relevant_processes = [], render_graphs = True): @@ -1172,6 +1176,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen code = code.replace("$OR$", "||") code = self.put_modified_operations_back(code, map_element_dico) code = remove_extra_jumps(format_with_tabs(code)) + code = self.remove_GG_from_code(code) f = open(self.get_output_dir()/ "debug" / "rewritten.nf", "w") f.write(code) f.close()