From e77a6816ea84db0870a81150042e74b8f08da799 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 3 Feb 2022 17:44:59 +0000 Subject: [PATCH] Fix CWL --- ceci/pipeline.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ceci/pipeline.py b/ceci/pipeline.py index bcf9bc1..d506fc8 100644 --- a/ceci/pipeline.py +++ b/ceci/pipeline.py @@ -1284,11 +1284,9 @@ def initiate_run(self, overall_inputs): inputs_file = f"{cwl_dir}/cwl_inputs.yml" self.make_inputs_file(self.stages, overall_inputs, self.stages_config, inputs_file) - # CWL treats overall inputs differently, storing - # them in the inputs file. We keep the - self.cwl_overall_inputs = overall_inputs.copy() - overall_inputs.clear() - self.cwl_overall_inputs['config'] = self.stages_config + # CWL treats overall inputs differently, and requires + # that we include the config file in there too + self.overall_inputs['config'] = self.stages_config return { "workflow": wf, @@ -1318,7 +1316,7 @@ def enqueue_job(self, stage, pipeline_files): # so not he same as the pipeline_files we usually see for inp in cwl_tool.inputs: - if (inp.id in self.cwl_overall_inputs): + if (inp.id in self.overall_inputs): name = inp.id # If this input is an putput from an earlier stage # then it takes its name based on that @@ -1333,10 +1331,10 @@ def enqueue_job(self, stage, pipeline_files): name = inp.id # If it's an overall input to the entire pipeline we - # record that. We only want things that aren't outputs - # (first clause) and that we haven't already recorded (second) - # breakpoint() - if (inp.id in self.cwl_overall_inputs) and ( + # record that. Or a configuration option. + # And we don't want things that we've already recorded. + if ((inp.id in self.overall_inputs) or ( + inp.id in stage.config_options)) and ( name not in self.run_info["workflow_inputs"] ): self.run_info["workflow_inputs"].add(name)