From 9b7b4e3f2bf913ee5d5f73689234e37892a0cfe7 Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Thu, 13 Mar 2025 14:43:37 +0100
Subject: [PATCH] Update the conversion from DSL1 to DSL2 -> there was a
 problem with the inputs and outputs

---
 src/process.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/process.py b/src/process.py
index b4cef1a..73d17ee 100644
--- a/src/process.py
+++ b/src/process.py
@@ -438,7 +438,11 @@ class Process(Nextflow_Building_Blocks):
             self.initialise_inputs_outputs()
 
     def convert_input_code_to_DSL2(self):
-        code = self.input_code
+        code = "\n"+self.get_input_code()+"\n"
+        code = remove_jumps_inbetween_parentheses(code)
+        code = remove_jumps_inbetween_curlies(code)
+        #Simplying the inputs -> when there is a jump line '.' -> it turns it to '.'
+        code = re.sub(constant.JUMP_DOT, '.', code)
         #code = process_2_DSL2(code) 
         lines = []
         for line in code.split("\n"):
@@ -448,7 +452,9 @@ class Process(Nextflow_Building_Blocks):
         return code
     
     def convert_output_code_to_DSL2(self):
-        code = self.output_code
+        code = self.get_output_code()
+        code = remove_jumps_inbetween_parentheses(code)
+        code = remove_jumps_inbetween_curlies(code)
         lines = []
         for line in code.split("\n"):
             line = line.replace(" into ", ", emit: ")
-- 
GitLab