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

add option to get file extension

parent 12ce6da1
No related branches found
No related tags found
No related merge requests found
Pipeline #13386 passed with stage
in 1 minute and 5 seconds
......@@ -216,6 +216,27 @@ class Process(Nextflow_Building_Blocks):
#Method that returns the input part of the process code
def get_output_code(self):
return self.output_code
def get_file_extensions_outputs(self):
code = self.get_output_code()
extensions = []
for match in re.finditer(r"(\.\w+)+|\.\w+", code):
extensions.append(match.group(0))
return extensions
def get_input_parameters(self):
code = self.get_input_code()
parameters = []
for match in re.finditer(r"\w+", code):
parameters.append(match.group(0))
parameters = list(set(parameters))#Here we can a unique cause a parameter can only be given once in any case
words_2_remove = ["path", "val", "tuple", "into", "stageAs", "emit"]
for word in words_2_remove:
try:
parameters.remove(word)
except:
None
return parameters
def get_modules(self):
return self.modules
......
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