From e82af601dd305ba9f4275723b5ce89b5def53848 Mon Sep 17 00:00:00 2001 From: George Marchment <georgemarchment@yahoo.fr> Date: Wed, 26 Mar 2025 11:37:13 +0100 Subject: [PATCH] Remove the GGs --- src/workflow.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/workflow.py b/src/workflow.py index 11bcd97..10c4d0c 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() -- GitLab