diff --git a/pipeline_utils/lib/yaml_parser.py b/pipeline_utils/lib/yaml_parser.py index 17e2a6e..0f8ffca 100644 --- a/pipeline_utils/lib/yaml_parser.py +++ b/pipeline_utils/lib/yaml_parser.py @@ -390,6 +390,11 @@ def _arguments(self, input, consortia): for i, name_ in enumerate(v): v_.append({self.FILE_SCHEMA: f'{self._string_consortia(consortia)}:{self.REFERENCEFILE_TYPE_SCHEMA}-{name_.replace("@", "_")}', self.DIMENSION_SCHEMA: str(i)}) + # remove DIMENSION_SCHEMA field if only one file + # this is necessary so the file will be posted as a string and not a list + # having a list will break tibanna creating the correct input for cwltool + if len(v_) == 1: + del v_[0][self.DIMENSION_SCHEMA] argument_.setdefault(k, v_) elif k == self.QC_THRESHOLDS_SCHEMA: v_ = {