@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 3.21.0 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/work/mixcr-clonotyping/mixcr-clonotyping/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@3.21.0 build /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@3.22.0 build /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
4
4
  > rm -rf dist && pl-tengo check && pl-tengo build
5
5
 
6
6
  info: Skipping unknown file type: test/columns.test.ts
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 3.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 22562b1: qc table multiple UMI support
8
+
3
9
  ## 3.21.0
4
10
 
5
11
  ### Minor Changes
@@ -3,9 +3,13 @@
3
3
 
4
4
  ll := import("@platforma-sdk/workflow-tengo:ll")
5
5
  pConstants := import("@platforma-sdk/workflow-tengo:pframes.constants")
6
+ text := import("text")
6
7
 
7
8
 
8
- getQcReportColumns := func(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellTags) {
9
+ getQcReportColumns := func(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellTags, umiTags) {
10
+ if is_undefined(umiTags) {
11
+ umiTags = []
12
+ }
9
13
 
10
14
  baseColumns := [
11
15
  {
@@ -656,73 +660,82 @@ getQcReportColumns := func(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellT
656
660
  }
657
661
  }
658
662
 
659
- dataWithUmiColumns := [ {
660
- column: "refineTags.UMI.outputCount",
661
- id: "refine-tags-umi-output-count",
662
- allowNA: true,
663
- naRegex: "NaN",
664
- spec: {
665
- name: "mixcr.com/reports/refineTags/UMI/outputCount",
666
- valueType: "Long",
667
- annotations: {
668
- "pl7.app/min": "0",
669
- "pl7.app/table/orderPriority": "85000",
670
- "pl7.app/table/visibility": "optional",
671
- "pl7.app/label": "Refine Tags UMI - Output Count"
663
+ dataWithUmiColumns := []
664
+ for idx, umiTag in umiTags {
665
+ orderBase := 85000 + idx * 10
666
+ orderBasePercents := 85100 + idx * 10
667
+ orderDiversity := 85200 + idx * 10
668
+ orderDiversityPercents := 85300 + idx * 10
669
+ tagL := text.to_lower(umiTag)
670
+ dataWithUmiColumns = dataWithUmiColumns + [{
671
+ column: "refineTags." + umiTag + ".outputCount",
672
+ id: "refine-tags-" + tagL + "-output-count",
673
+ allowNA: true,
674
+ naRegex: "NaN",
675
+ spec: {
676
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputCount",
677
+ valueType: "Long",
678
+ annotations: {
679
+ "pl7.app/min": "0",
680
+ "pl7.app/table/orderPriority": string(orderBase),
681
+ "pl7.app/table/visibility": "optional",
682
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Count"
683
+ }
672
684
  }
673
- }
674
- },
675
- {
676
- column: "refineTags.UMI.outputCountPercents",
677
- id: "refine-tags-umi-output-count-percents",
678
- allowNA: true,
679
- naRegex: "NaN",
680
- spec: {
681
- name: "mixcr.com/reports/refineTags/UMI/outputCountPercents",
682
- valueType: "Double",
683
- annotations: {
684
- "pl7.app/min": "0",
685
- "pl7.app/max": "100",
686
- "pl7.app/table/orderPriority": "85100",
687
- "pl7.app/table/visibility": "default",
688
- "pl7.app/label": "Refine Tags UMI - Output Count (%)"
685
+ },
686
+ {
687
+ column: "refineTags." + umiTag + ".outputCountPercents",
688
+ id: "refine-tags-" + tagL + "-output-count-percents",
689
+ allowNA: true,
690
+ naRegex: "NaN",
691
+ spec: {
692
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputCountPercents",
693
+ valueType: "Double",
694
+ annotations: {
695
+ "pl7.app/min": "0",
696
+ "pl7.app/max": "100",
697
+ "pl7.app/table/orderPriority": string(orderBasePercents),
698
+ "pl7.app/table/visibility": "default",
699
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Count (%)"
700
+ }
689
701
  }
690
- }
691
- },
692
- {
693
- column: "refineTags.UMI.outputDiversity",
694
- id: "refine-tags-umi-output-diversity",
695
- allowNA: true,
696
- naRegex: "NaN",
697
- spec: {
698
- name: "mixcr.com/reports/refineTags/UMI/outputDiversity",
699
- valueType: "Long",
700
- annotations: {
701
- "pl7.app/min": "0",
702
- "pl7.app/table/orderPriority": "85200",
703
- "pl7.app/table/visibility": "optional",
704
- "pl7.app/label": "Refine Tags UMI - Output Diversity"
702
+ },
703
+ {
704
+ column: "refineTags." + umiTag + ".outputDiversity",
705
+ id: "refine-tags-" + tagL + "-output-diversity",
706
+ allowNA: true,
707
+ naRegex: "NaN",
708
+ spec: {
709
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputDiversity",
710
+ valueType: "Long",
711
+ annotations: {
712
+ "pl7.app/min": "0",
713
+ "pl7.app/table/orderPriority": string(orderDiversity),
714
+ "pl7.app/table/visibility": "optional",
715
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Diversity"
716
+ }
705
717
  }
706
- }
707
- },
708
- {
709
- column: "refineTags.UMI.outputDiversityPercents",
710
- id: "refine-tags-umi-output-diversity-percents",
711
- allowNA: true,
712
- naRegex: "NaN",
713
- spec: {
714
- name: "mixcr.com/reports/refineTags/UMI/outputDiversityPercents",
715
- valueType: "Double",
716
- annotations: {
717
- "pl7.app/min": "0",
718
- "pl7.app/max": "100",
719
- "pl7.app/table/orderPriority": "85300",
720
- "pl7.app/table/visibility": "default",
721
- "pl7.app/label": "Refine Tags UMI - Output Diversity (%)"
718
+ },
719
+ {
720
+ column: "refineTags." + umiTag + ".outputDiversityPercents",
721
+ id: "refine-tags-" + tagL + "-output-diversity-percents",
722
+ allowNA: true,
723
+ naRegex: "NaN",
724
+ spec: {
725
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputDiversityPercents",
726
+ valueType: "Double",
727
+ annotations: {
728
+ "pl7.app/min": "0",
729
+ "pl7.app/max": "100",
730
+ "pl7.app/table/orderPriority": string(orderDiversityPercents),
731
+ "pl7.app/table/visibility": "default",
732
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Diversity (%)"
733
+ }
722
734
  }
723
- }
724
- },
725
- {
735
+ }]
736
+ }
737
+
738
+ dataWithUmiColumns = dataWithUmiColumns + [{
726
739
  column: "refineTags.numberOfGroupsAccepted",
727
740
  id: "refine-tags-number-of-groups-accepted",
728
741
  allowNA: true,
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.mixcr-clonotyping-2.workflow",
3
- "version": "3.21.0",
3
+ "version": "3.22.0",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
6
  "@platforma-sdk/workflow-tengo": "5.8.0",
@@ -31,7 +31,8 @@ self.body(func(inputs) {
31
31
  clonotypeTablesData := inputs.clonotypeTablesData
32
32
 
33
33
  isSingleCell := len(presetSpecForBack.cellTags) > 0
34
- hasUmi := !is_undefined(presetSpecForBack.umiTags) && len(presetSpecForBack.umiTags) > 0
34
+ umiTags := presetSpecForBack.umiTags
35
+ hasUmi := !is_undefined(umiTags) && len(umiTags) > 0
35
36
  cellTags := presetSpecForBack.cellTags
36
37
  singleCellChainTsvsData := inputs.singleCellChainTsvsData
37
38
 
@@ -409,7 +410,7 @@ self.body(func(inputs) {
409
410
 
410
411
  tsvFile := wfResult.getFile("qc-report-processed.tsv")
411
412
 
412
- qcReportColumns := qcReportColumns(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellTags)
413
+ qcReportColumns := qcReportColumns(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellTags, umiTags)
413
414
  reportColumnsSpec := qcReportColumns.reportColumnsSpec
414
415
 
415
416
  qcReportTable := xsv.importFile(
@@ -3,9 +3,13 @@
3
3
 
4
4
  ll := import("@platforma-sdk/workflow-tengo:ll")
5
5
  pConstants := import("@platforma-sdk/workflow-tengo:pframes.constants")
6
+ text := import("text")
6
7
 
7
8
  // QC Report column specifications function
8
- getQcReportColumns := func(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellTags) {
9
+ getQcReportColumns := func(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellTags, umiTags) {
10
+ if is_undefined(umiTags) {
11
+ umiTags = []
12
+ }
9
13
  // Bulk sequencing columns
10
14
  baseColumns := [
11
15
  {
@@ -656,73 +660,82 @@ getQcReportColumns := func(hasUmi, isSingleCell, sampleIdAxisSpec, chains, cellT
656
660
  }
657
661
  }
658
662
 
659
- dataWithUmiColumns := [ {
660
- column: "refineTags.UMI.outputCount",
661
- id: "refine-tags-umi-output-count",
662
- allowNA: true,
663
- naRegex: "NaN",
664
- spec: {
665
- name: "mixcr.com/reports/refineTags/UMI/outputCount",
666
- valueType: "Long",
667
- annotations: {
668
- "pl7.app/min": "0",
669
- "pl7.app/table/orderPriority": "85000",
670
- "pl7.app/table/visibility": "optional",
671
- "pl7.app/label": "Refine Tags UMI - Output Count"
663
+ dataWithUmiColumns := []
664
+ for idx, umiTag in umiTags {
665
+ orderBase := 85000 + idx * 10
666
+ orderBasePercents := 85100 + idx * 10
667
+ orderDiversity := 85200 + idx * 10
668
+ orderDiversityPercents := 85300 + idx * 10
669
+ tagL := text.to_lower(umiTag)
670
+ dataWithUmiColumns = dataWithUmiColumns + [{
671
+ column: "refineTags." + umiTag + ".outputCount",
672
+ id: "refine-tags-" + tagL + "-output-count",
673
+ allowNA: true,
674
+ naRegex: "NaN",
675
+ spec: {
676
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputCount",
677
+ valueType: "Long",
678
+ annotations: {
679
+ "pl7.app/min": "0",
680
+ "pl7.app/table/orderPriority": string(orderBase),
681
+ "pl7.app/table/visibility": "optional",
682
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Count"
683
+ }
672
684
  }
673
- }
674
- },
675
- {
676
- column: "refineTags.UMI.outputCountPercents",
677
- id: "refine-tags-umi-output-count-percents",
678
- allowNA: true,
679
- naRegex: "NaN",
680
- spec: {
681
- name: "mixcr.com/reports/refineTags/UMI/outputCountPercents",
682
- valueType: "Double",
683
- annotations: {
684
- "pl7.app/min": "0",
685
- "pl7.app/max": "100",
686
- "pl7.app/table/orderPriority": "85100",
687
- "pl7.app/table/visibility": "default",
688
- "pl7.app/label": "Refine Tags UMI - Output Count (%)"
685
+ },
686
+ {
687
+ column: "refineTags." + umiTag + ".outputCountPercents",
688
+ id: "refine-tags-" + tagL + "-output-count-percents",
689
+ allowNA: true,
690
+ naRegex: "NaN",
691
+ spec: {
692
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputCountPercents",
693
+ valueType: "Double",
694
+ annotations: {
695
+ "pl7.app/min": "0",
696
+ "pl7.app/max": "100",
697
+ "pl7.app/table/orderPriority": string(orderBasePercents),
698
+ "pl7.app/table/visibility": "default",
699
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Count (%)"
700
+ }
689
701
  }
690
- }
691
- },
692
- {
693
- column: "refineTags.UMI.outputDiversity",
694
- id: "refine-tags-umi-output-diversity",
695
- allowNA: true,
696
- naRegex: "NaN",
697
- spec: {
698
- name: "mixcr.com/reports/refineTags/UMI/outputDiversity",
699
- valueType: "Long",
700
- annotations: {
701
- "pl7.app/min": "0",
702
- "pl7.app/table/orderPriority": "85200",
703
- "pl7.app/table/visibility": "optional",
704
- "pl7.app/label": "Refine Tags UMI - Output Diversity"
702
+ },
703
+ {
704
+ column: "refineTags." + umiTag + ".outputDiversity",
705
+ id: "refine-tags-" + tagL + "-output-diversity",
706
+ allowNA: true,
707
+ naRegex: "NaN",
708
+ spec: {
709
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputDiversity",
710
+ valueType: "Long",
711
+ annotations: {
712
+ "pl7.app/min": "0",
713
+ "pl7.app/table/orderPriority": string(orderDiversity),
714
+ "pl7.app/table/visibility": "optional",
715
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Diversity"
716
+ }
705
717
  }
706
- }
707
- },
708
- {
709
- column: "refineTags.UMI.outputDiversityPercents",
710
- id: "refine-tags-umi-output-diversity-percents",
711
- allowNA: true,
712
- naRegex: "NaN",
713
- spec: {
714
- name: "mixcr.com/reports/refineTags/UMI/outputDiversityPercents",
715
- valueType: "Double",
716
- annotations: {
717
- "pl7.app/min": "0",
718
- "pl7.app/max": "100",
719
- "pl7.app/table/orderPriority": "85300",
720
- "pl7.app/table/visibility": "default",
721
- "pl7.app/label": "Refine Tags UMI - Output Diversity (%)"
718
+ },
719
+ {
720
+ column: "refineTags." + umiTag + ".outputDiversityPercents",
721
+ id: "refine-tags-" + tagL + "-output-diversity-percents",
722
+ allowNA: true,
723
+ naRegex: "NaN",
724
+ spec: {
725
+ name: "mixcr.com/reports/refineTags/" + umiTag + "/outputDiversityPercents",
726
+ valueType: "Double",
727
+ annotations: {
728
+ "pl7.app/min": "0",
729
+ "pl7.app/max": "100",
730
+ "pl7.app/table/orderPriority": string(orderDiversityPercents),
731
+ "pl7.app/table/visibility": "default",
732
+ "pl7.app/label": "Refine Tags " + umiTag + " - Output Diversity (%)"
733
+ }
722
734
  }
723
- }
724
- },
725
- {
735
+ }]
736
+ }
737
+
738
+ dataWithUmiColumns = dataWithUmiColumns + [{
726
739
  column: "refineTags.numberOfGroupsAccepted",
727
740
  id: "refine-tags-number-of-groups-accepted",
728
741
  allowNA: true,