@platforma-open/milaboratories.mixcr-shm-trees.workflow 3.4.0 → 3.5.1

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,5 +1,5 @@
1
1
 
2
- > @platforma-open/milaboratories.mixcr-shm-trees.workflow@3.4.0 build /home/runner/work/mixcr-shm-trees/mixcr-shm-trees/workflow
2
+ > @platforma-open/milaboratories.mixcr-shm-trees.workflow@3.5.1 build /home/runner/work/mixcr-shm-trees/mixcr-shm-trees/workflow
3
3
  > rm -rf dist && pl-tengo check && pl-tengo build
4
4
 
5
5
  Processing "src/export-settings.lib.tengo"...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @platforma-open/milaboratories.mixcr-shm-trees.workflow
2
2
 
3
+ ## 3.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 089219e: dependency upgrade
8
+
9
+ ## 3.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 591630e: Descrete columns annotation
14
+
3
15
  ## 3.4.0
4
16
 
5
17
  ### Minor Changes
@@ -1,18 +1,18 @@
1
1
  ll := import("@platforma-sdk/workflow-tengo:ll")
2
2
  text := import("text")
3
3
 
4
- // ==============================================
5
- //
6
- // Every function in this file will return:
7
- // pfconvParams - params to run xsv.importFileMap on exported files
8
- // cmdArgs - additional args for MiXCR to specify what fields to extract
9
- //
10
- // ==============================================
11
-
12
- // TODO: TMP
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
13
  allowNA := true
14
14
 
15
- // export of threes whithout nodes
15
+
16
16
  shmTreeTableOptions := func(dataDescription) {
17
17
  axes := []
18
18
  columns := []
@@ -149,6 +149,7 @@ shmTreeTableOptions := func(dataDescription) {
149
149
  annotations: {
150
150
  type: "V gene name",
151
151
  "pl7.app/label": "V gene",
152
+ "pl7.app/isDiscreteFilter": "true",
152
153
  "pl7.app/table/visibility": "default",
153
154
  "pl7.app/table/orderPriority": "30000"
154
155
  }
@@ -169,6 +170,7 @@ shmTreeTableOptions := func(dataDescription) {
169
170
  annotations: {
170
171
  type: "J gene name",
171
172
  "pl7.app/label": "J gene",
173
+ "pl7.app/isDiscreteFilter": "true",
172
174
  "pl7.app/table/visibility": "default",
173
175
  "pl7.app/table/orderPriority": "29000"
174
176
  }
@@ -185,6 +187,8 @@ shmTreeTableOptions := func(dataDescription) {
185
187
  name: "pl7.app/vdj/chain",
186
188
  annotations: {
187
189
  "pl7.app/label": "Chain",
190
+ "pl7.app/isDiscreteFilter": "true",
191
+ "pl7.app/discreteValues": "['TRA', 'TRB', 'TRG', 'TRD', 'IGH', 'IGK', 'IGL']",
188
192
  "pl7.app/table/visibility": "default",
189
193
  "pl7.app/table/orderPriority": "40000"
190
194
  }
@@ -296,7 +300,7 @@ shmTreeTableOptions := func(dataDescription) {
296
300
  }
297
301
  }
298
302
 
299
- // export data that is uniq for node
303
+
300
304
  shmTreeNodesTableOptions := func(dataDescription) {
301
305
  axes := []
302
306
  columns := []
@@ -357,10 +361,12 @@ shmTreeNodesTableOptions := func(dataDescription) {
357
361
  allowNA: false,
358
362
  spec: {
359
363
  name: "pl7.app/dendrogram/isObserved",
360
- // TODO change to Boolean when it will be supported
364
+
361
365
  valueType: "String",
362
366
  annotations: {
363
367
  "pl7.app/label": "Is observed in data",
368
+ "pl7.app/isDiscreteFilter": "true",
369
+ "pl7.app/discreteValues": "['true', 'false']",
364
370
  "pl7.app/table/visibility": "default",
365
371
  "pl7.app/table/orderPriority": "85000"
366
372
  }
@@ -672,6 +678,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
672
678
  annotations: {
673
679
  type: "V gene name",
674
680
  "pl7.app/label": "V gene",
681
+ "pl7.app/isDiscreteFilter": "true",
675
682
  "pl7.app/table/visibility": "default",
676
683
  "pl7.app/table/orderPriority": "49000"
677
684
  }
@@ -692,6 +699,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
692
699
  annotations: {
693
700
  type: "J gene name",
694
701
  "pl7.app/label": "J gene",
702
+ "pl7.app/isDiscreteFilter": "true",
695
703
  "pl7.app/table/visibility": "default",
696
704
  "pl7.app/table/orderPriority": "47000"
697
705
  }
@@ -803,8 +811,8 @@ shmTreeNodesTableOptions := func(dataDescription) {
803
811
  }
804
812
  }
805
813
 
806
- // export data that is unique for clones, but not unique for a node
807
- // (different clones could be in the same topology node, for example, different time points)
814
+
815
+
808
816
  shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
809
817
  donorColumnSpec := donorColumn.spec
810
818
 
@@ -862,8 +870,8 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
862
870
  cmdArgs = append(cmdArgs, "-fileName")
863
871
  axes = append(axes, {
864
872
  column: "fileName",
865
- // in case of single cell trees, not all subtrees will be filled for nodes with observed
866
- // allowNA: true,
873
+
874
+
867
875
  preProcess: [
868
876
  {
869
877
  type: "regexpReplace",
@@ -874,6 +882,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
874
882
  spec: donorColumnSpec.axesSpec[0],
875
883
  annotations: {
876
884
  "pl7.app/label": "Sample name",
885
+ "pl7.app/isDiscreteFilter": "true",
877
886
  "pl7.app/table/visibility": "default",
878
887
  "pl7.app/table/orderPriority": "110000"
879
888
  }
@@ -883,13 +892,13 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
883
892
  axes = append(axes, {
884
893
  column: "cloneId",
885
894
  id: "clone-id",
886
- // allowNA: true,
887
- // filtering off records without clones because we are not interested in them here
895
+
896
+
888
897
  filterOutRegex: "^$",
889
898
  spec: {
890
899
  name: "pl7.app/vdj/cloneId",
891
900
  type: "Long",
892
- // TODO domain with blockId
901
+
893
902
  annotations: {
894
903
  "pl7.app/label": "Clone id",
895
904
  "pl7.app/table/visibility": "default",
@@ -980,6 +989,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
980
989
  annotations: {
981
990
  type: "D gene name",
982
991
  "pl7.app/label": "Best D hit",
992
+ "pl7.app/isDiscreteFilter": "true",
983
993
  "pl7.app/table/visibility": "default",
984
994
  "pl7.app/table/orderPriority": "48000"
985
995
  }
@@ -1000,6 +1010,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1000
1010
  annotations: {
1001
1011
  type: "C gene name",
1002
1012
  "pl7.app/label": "Best C hit",
1013
+ "pl7.app/isDiscreteFilter": "true",
1003
1014
  "pl7.app/table/visibility": "default",
1004
1015
  "pl7.app/table/orderPriority": "46000"
1005
1016
  }
@@ -1016,6 +1027,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1016
1027
  name: "pl7.app/vdj/isotype",
1017
1028
  annotations: {
1018
1029
  "pl7.app/label": "IG isotype",
1030
+ "pl7.app/isDiscreteFilter": "true",
1019
1031
  "pl7.app/table/visibility": "default",
1020
1032
  "pl7.app/table/orderPriority": "50000"
1021
1033
  }
@@ -1106,6 +1118,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1106
1118
  name: "pl7.app/vdj/isotype",
1107
1119
  annotations: {
1108
1120
  "pl7.app/label": "Top IG isotype",
1121
+ "pl7.app/isDiscreteFilter": "true",
1109
1122
  "pl7.app/table/visibility": "optional",
1110
1123
  "pl7.app/table/orderPriority": "50000"
1111
1124
  }
@@ -1122,7 +1135,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1122
1135
  }
1123
1136
  }
1124
1137
 
1125
- // to use the file as a library, we should explicitly export functions
1138
+
1126
1139
  export ll.toStrict({
1127
1140
  shmTreeTableOptions: shmTreeTableOptions,
1128
1141
  shmTreeNodesTableOptions: shmTreeNodesTableOptions,
@@ -7,19 +7,19 @@ json := import("json")
7
7
  _P_COLUMN_DATA_RESOURCE_MAP := { Name: "PColumnData/ResourceMap", Version: "1" }
8
8
 
9
9
  groupDataByDonorId := func(donorColumn, datasets) {
10
- // we need to form a pColumn with two axes:
11
- // axes[0]: donorId
12
- // axes[1]: sampleId
13
- // axes[2]: mixcrclonotypingBlockId
14
- // value: fileRef resource
15
-
16
- // we have:
17
- // column of donorIds:
18
- // axes[0]: sampleId
19
- // value: donorId
20
- // several columns of clns:
21
- // axes[0]: sampleId
22
- // value: fileRef resource
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
23
 
24
24
  donorColumnSpec := donorColumn.spec
25
25
 
@@ -30,7 +30,7 @@ groupDataByDonorId := func(donorColumn, datasets) {
30
30
  name: "mixcr.com/clns",
31
31
  valueType: "File",
32
32
 
33
- // annotations and domain could differ between datasets
33
+
34
34
  axesSpec: [
35
35
  {
36
36
  name: donorColumnSpec.name,
@@ -49,20 +49,20 @@ groupDataByDonorId := func(donorColumn, datasets) {
49
49
  ]
50
50
  }, { removeUndefs: true })
51
51
 
52
- // creating sample to donor map
52
+
53
53
 
54
54
  sampleToDonor := {}
55
55
 
56
- // columns with meta could be fetched as data directly
56
+
57
57
  for k, v in donorColumn.data.getDataAsJson()["data"] {
58
58
  sampleId := json.decode(k)[0]
59
59
  sampleToDonor[sampleId] = v
60
60
  }
61
61
 
62
- // build pColumn by hand
62
+
63
63
  dataBuilder := smart.structBuilder(_P_COLUMN_DATA_RESOURCE_MAP, json.encode({ keyLength: 3 }))
64
64
 
65
- // collect all the clns files that we have into pColumn
65
+
66
66
  for clonotypingBlockId, dataset in datasets {
67
67
  for sKey, fileRef in dataset.data.inputs() {
68
68
  sampleId := json.decode(sKey)[0]
@@ -77,7 +77,7 @@ groupDataByDonorId := func(donorColumn, datasets) {
77
77
  }
78
78
  }
79
79
 
80
- // to use the file as a library, we should explicitly export functions
80
+
81
81
  export ll.toStrict({
82
82
  groupDataByDonorId: groupDataByDonorId
83
83
  })
@@ -4,7 +4,7 @@ assets := import("@platforma-sdk/workflow-tengo:assets")
4
4
  json := import("json")
5
5
  paggregateSw := assets.importSoftware("@platforma-open/milaboratories.software-ptransform:main")
6
6
 
7
- //// aggregating by-nodes output to make it uniquely addressable by it's native key
7
+
8
8
  ensureUniqueness := func(inputTsv, pfConvParams, ...aggParams) {
9
9
  keyColumns := []
10
10
  for axis in pfConvParams.axes {
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.mixcr-shm-trees.workflow",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
4
  "type": "module",
5
5
  "description": "Tengo-based template",
6
6
  "//": {
7
7
  "build": "node ./scripts/build-static.mjs src/pfconv_params.json src/pfconv_params.lib.tengo && rm -rf dist && pl-tengo check && pl-tengo build && ./create_tags.sh"
8
8
  },
9
+ "dependencies": {
10
+ "@platforma-sdk/workflow-tengo": "^3.1.0"
11
+ },
9
12
  "devDependencies": {
10
- "@platforma-sdk/tengo-builder": "^1.17.5",
11
- "@platforma-sdk/workflow-tengo": "^2.9.9",
12
- "@milaboratories/software-pframes-conv": "^2.1.8",
13
- "@platforma-open/milaboratories.software-small-binaries": "^1.15.6",
13
+ "@platforma-sdk/tengo-builder": "^2.0.2",
14
+ "@milaboratories/software-pframes-conv": "^2.1.20",
15
+ "@platforma-open/milaboratories.software-small-binaries": "^1.15.19",
14
16
  "@platforma-open/milaboratories.software-mixcr": "4.7.0-139-develop",
15
17
  "@platforma-open/milaboratories.software-mitool": "2.3.1-5-main",
16
- "@platforma-open/milaboratories.software-ptransform": "^1.1.0",
17
- "@platforma-sdk/test": "^1.22.6",
18
+ "@platforma-open/milaboratories.software-ptransform": "^1.3.1",
19
+ "@platforma-sdk/test": "^1.25.0",
18
20
  "vitest": "^2.1.8",
19
21
  "typescript": "~5.6.3"
20
22
  },
@@ -149,6 +149,7 @@ shmTreeTableOptions := func(dataDescription) {
149
149
  annotations: {
150
150
  type: "V gene name",
151
151
  "pl7.app/label": "V gene",
152
+ "pl7.app/isDiscreteFilter": "true",
152
153
  "pl7.app/table/visibility": "default",
153
154
  "pl7.app/table/orderPriority": "30000"
154
155
  }
@@ -169,6 +170,7 @@ shmTreeTableOptions := func(dataDescription) {
169
170
  annotations: {
170
171
  type: "J gene name",
171
172
  "pl7.app/label": "J gene",
173
+ "pl7.app/isDiscreteFilter": "true",
172
174
  "pl7.app/table/visibility": "default",
173
175
  "pl7.app/table/orderPriority": "29000"
174
176
  }
@@ -185,6 +187,8 @@ shmTreeTableOptions := func(dataDescription) {
185
187
  name: "pl7.app/vdj/chain",
186
188
  annotations: {
187
189
  "pl7.app/label": "Chain",
190
+ "pl7.app/isDiscreteFilter": "true",
191
+ "pl7.app/discreteValues": "['TRA', 'TRB', 'TRG', 'TRD', 'IGH', 'IGK', 'IGL']",
188
192
  "pl7.app/table/visibility": "default",
189
193
  "pl7.app/table/orderPriority": "40000"
190
194
  }
@@ -361,6 +365,8 @@ shmTreeNodesTableOptions := func(dataDescription) {
361
365
  valueType: "String",
362
366
  annotations: {
363
367
  "pl7.app/label": "Is observed in data",
368
+ "pl7.app/isDiscreteFilter": "true",
369
+ "pl7.app/discreteValues": "['true', 'false']",
364
370
  "pl7.app/table/visibility": "default",
365
371
  "pl7.app/table/orderPriority": "85000"
366
372
  }
@@ -672,6 +678,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
672
678
  annotations: {
673
679
  type: "V gene name",
674
680
  "pl7.app/label": "V gene",
681
+ "pl7.app/isDiscreteFilter": "true",
675
682
  "pl7.app/table/visibility": "default",
676
683
  "pl7.app/table/orderPriority": "49000"
677
684
  }
@@ -692,6 +699,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
692
699
  annotations: {
693
700
  type: "J gene name",
694
701
  "pl7.app/label": "J gene",
702
+ "pl7.app/isDiscreteFilter": "true",
695
703
  "pl7.app/table/visibility": "default",
696
704
  "pl7.app/table/orderPriority": "47000"
697
705
  }
@@ -874,6 +882,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
874
882
  spec: donorColumnSpec.axesSpec[0],
875
883
  annotations: {
876
884
  "pl7.app/label": "Sample name",
885
+ "pl7.app/isDiscreteFilter": "true",
877
886
  "pl7.app/table/visibility": "default",
878
887
  "pl7.app/table/orderPriority": "110000"
879
888
  }
@@ -980,6 +989,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
980
989
  annotations: {
981
990
  type: "D gene name",
982
991
  "pl7.app/label": "Best D hit",
992
+ "pl7.app/isDiscreteFilter": "true",
983
993
  "pl7.app/table/visibility": "default",
984
994
  "pl7.app/table/orderPriority": "48000"
985
995
  }
@@ -1000,6 +1010,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1000
1010
  annotations: {
1001
1011
  type: "C gene name",
1002
1012
  "pl7.app/label": "Best C hit",
1013
+ "pl7.app/isDiscreteFilter": "true",
1003
1014
  "pl7.app/table/visibility": "default",
1004
1015
  "pl7.app/table/orderPriority": "46000"
1005
1016
  }
@@ -1016,6 +1027,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1016
1027
  name: "pl7.app/vdj/isotype",
1017
1028
  annotations: {
1018
1029
  "pl7.app/label": "IG isotype",
1030
+ "pl7.app/isDiscreteFilter": "true",
1019
1031
  "pl7.app/table/visibility": "default",
1020
1032
  "pl7.app/table/orderPriority": "50000"
1021
1033
  }
@@ -1106,6 +1118,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1106
1118
  name: "pl7.app/vdj/isotype",
1107
1119
  annotations: {
1108
1120
  "pl7.app/label": "Top IG isotype",
1121
+ "pl7.app/isDiscreteFilter": "true",
1109
1122
  "pl7.app/table/visibility": "optional",
1110
1123
  "pl7.app/table/orderPriority": "50000"
1111
1124
  }