From 9587aabd879fe29f4a5197aefaffb44d903d5edf Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 2 Jan 2024 15:04:23 +0100 Subject: [PATCH] handle stageAs in input parsing correctly closes #2622 --- nf_core/components/nfcore_component.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nf_core/components/nfcore_component.py b/nf_core/components/nfcore_component.py index 874fa570bc..705db958e0 100644 --- a/nf_core/components/nfcore_component.py +++ b/nf_core/components/nfcore_component.py @@ -170,9 +170,11 @@ def get_inputs_from_main_nf(self): matches = re.finditer(regex, input_data, re.MULTILINE) for matchNum, match in enumerate(matches, start=1): if match.group(3): - inputs.append(match.group(3)) + input_val = match.group(3).split(",")[0] # handle `files, stageAs: "inputs/*"` cases + inputs.append(input_val) elif match.group(4): - inputs.append(match.group(4)) + input_val = match.group(4).split(",")[0] # handle `files, stageAs: "inputs/*"` cases + inputs.append(input_val) log.info(f"Found {len(inputs)} inputs in {self.main_nf}") self.inputs = inputs