From b2bf6b450e843696e8141f650902df68a40866fe Mon Sep 17 00:00:00 2001 From: Dmitry Bolotin Date: Fri, 29 Nov 2024 08:12:16 +0200 Subject: [PATCH] Fix for presets undefined assemlingFeature (i.e. rna-seq) --- .changeset/wild-bats-type.md | 5 +++++ workflow/src/process.tpl.tengo | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .changeset/wild-bats-type.md diff --git a/.changeset/wild-bats-type.md b/.changeset/wild-bats-type.md new file mode 100644 index 0000000..a697b3d --- /dev/null +++ b/.changeset/wild-bats-type.md @@ -0,0 +1,5 @@ +--- +'@platforma-open/milaboratories.mixcr-clonotyping.workflow': patch +--- + +Fix for presets undefined assemlingFeature (i.e. rna-seq) diff --git a/workflow/src/process.tpl.tengo b/workflow/src/process.tpl.tengo index 8a417b2..1073235 100644 --- a/workflow/src/process.tpl.tengo +++ b/workflow/src/process.tpl.tengo @@ -172,13 +172,23 @@ self.body(func(inputs) { // calculating clns annotations - clnsAnnotations := { + removeUndefined := func(m) { + r := {} + for k, v in m { + if !is_undefined(v) { + r[k] = v + } + } + return r; + } + + clnsAnnotations := removeUndefined({ "mixcr.com/assemblingFeature": joinOrUndefined(presetContent.assemblingFeature), "mixcr.com/cellTags": joinOrUndefined(presetContent.cellTags), "mixcr.com/coveredFeaturesOnExport": joinOrUndefined(presetContent.coveredFeaturesOnExport), "mixcr.com/umiTags": joinOrUndefined(presetContent.umiTags), "pl7.app/label": "MiXCR Clonesets" - } + }) if hasAssembleContigs { clnsAnnotations["mixcr.com/contigsAssembled"] = "true" } @@ -196,7 +206,7 @@ self.body(func(inputs) { valueType: "File", axesSpec: [ inputSpec.axesSpec[0] - ] + ] }), "qc.data": mixcrResults.output("qc"), @@ -209,7 +219,7 @@ self.body(func(inputs) { valueType: "Log", axesSpec: [ inputSpec.axesSpec[0] - ] + ] }), "logs.data": mixcrResults.output("log"),