@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 2.3.1 → 2.3.3

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-2/mixcr-clonotyping-2/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.3.1 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.3.3 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/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
@@ -1,36 +1,21 @@
1
1
   WARN  Issue while reading "/home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.3.1 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.3.3 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
4
4
  > vitest
5
5
 
6
6
 
7
7
   RUN  v2.1.8 /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
8
8
 
9
- stdout | src/test/columns.test.ts > checking preset for 'milab-human-dna-xcr-7genes-multiplex'
10
- {
11
- type: 'ok',
12
- value: undefined,
13
- stable: false,
14
- uTag: '6c11bfb3-e54c-4d9e-93d9-04ecc8a6e3c8',
15
- unstableMarker: 'field_not_resolved:exportSpecs'
16
- }
17
-
18
- stdout | src/test/columns.test.ts > checking preset for 'milab-human-dna-xcr-7genes-multiplex'
19
- TEST FAILED SO ALTERNATIVE ROOT IS PRESETVED IN PL: test_1743445608218_96df81f8-dd85-4a6f-9cf9-a38dbe8ceb56 (NG:0x7e)
20
-
21
- stdout | src/test/columns.test.ts > checking preset for 'milab-human-dna-xcr-7genes-multiplex'
22
- TEST FAILED SO ALTERNATIVE ROOT IS PRESETVED IN PL: test_1743445629470_e3d0e207-7f5d-412a-92dd-ea4d171cbb48 (NG:0x188)
23
-
24
- ✓ src/test/columns.test.ts (6 tests) 64043ms
25
- ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 23412ms
26
- ✓ checking preset for '10x-sc-xcr-vdj' 8462ms
27
- ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8304ms
28
- ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8239ms
29
- ✓ checking preset for 'rna-seq' 7620ms
30
- ✓ checking preset for 'generic-single-cell-gex' 8004ms
9
+ ✓ src/test/columns.test.ts (6 tests) 55337ms
10
+ ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 13201ms
11
+ ✓ checking preset for '10x-sc-xcr-vdj' 8799ms
12
+ ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8762ms
13
+ ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8478ms
14
+ ✓ checking preset for 'rna-seq' 8061ms
15
+ ✓ checking preset for 'generic-single-cell-gex' 8035ms
31
16
 
32
17
   Test Files  1 passed (1)
33
18
   Tests  6 passed (6)
34
-  Start at  18:26:47
35
-  Duration  64.84s (transform 40ms, setup 0ms, collect 562ms, tests 64.04s, environment 0ms, prepare 66ms)
19
+  Start at  15:41:23
20
+  Duration  56.28s (transform 52ms, setup 0ms, collect 657ms, tests 55.34s, environment 0ms, prepare 77ms)
36
21
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 2.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 675cd29: Fix for output column domains, ordering and visibility
8
+
9
+ ## 2.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 43d3a75: updated MiXCR
14
+
3
15
  ## 2.3.1
4
16
 
5
17
  ### Patch Changes
@@ -85,6 +85,9 @@ addSpec := func(columns, additionalSpec) {
85
85
  })
86
86
  }
87
87
 
88
+
89
+
90
+
88
91
  calculateExportSpecs := func(presetSpecForBack, blockId) {
89
92
  ops := exportSpecOpsFromPreset(presetSpecForBack)
90
93
 
@@ -210,14 +213,14 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
210
213
 
211
214
  if isSingleCell {
212
215
 
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
216
+ columnsSpecPerSample = addSpec(columnsSpecPerSample, {
217
+ spec: {
218
+ annotations: {
219
+ "pl7.app/abundance/isPrimary": undefined,
220
+ "pl7.app/isAnchor": undefined
221
+ }
222
+ }
223
+ })
221
224
  columnsSpecPerSampleSc = [ {
222
225
  column: "uniqueCellCount",
223
226
  id: "cell-count",
@@ -225,7 +228,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
225
228
  spec: {
226
229
  name: "pl7.app/vdj/uniqueCellCount",
227
230
  valueType: "Long",
228
- annotations: a(88000, true, {
231
+ annotations: a(20100, true, {
229
232
  "pl7.app/min": "1",
230
233
  "pl7.app/isAbundance": "true",
231
234
  "pl7.app/abundance/unit": "cells",
@@ -242,7 +245,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
242
245
  spec: {
243
246
  name: "pl7.app/vdj/uniqueCellFraction",
244
247
  valueType: "Double",
245
- annotations: a(88000, true, {
248
+ annotations: a(20000, false, {
246
249
  "pl7.app/min": "0",
247
250
  "pl7.app/isAbundance": "true",
248
251
  "pl7.app/abundance/unit": "cells",
@@ -254,48 +257,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
254
257
  } ]
255
258
  }
256
259
 
257
-
258
-
259
260
  orderP := 80000
260
- geneHitColumnVariants := [ {
261
- name: "pl7.app/vdj/geneHitWithAllele",
262
- columnNameSuffix: "Hit",
263
- idSuffix: "-hit-with-allele",
264
- labelSuffix: " hit with allele",
265
- argSuffix: "Hit",
266
- visible: false
267
- }, {
268
- name: "pl7.app/vdj/geneHit",
269
- columnNameSuffix: "Gene",
270
- idSuffix: "-gene",
271
- labelSuffix: " gene",
272
- argSuffix: "Gene",
273
- visible: true
274
- } ]
275
- for vdjcU in ["V", "D", "J", "C"] {
276
- vdjcL := text.to_lower(vdjcU)
277
- for variant in geneHitColumnVariants {
278
- columnsSpecPerClonotype += [ {
279
- column: "best" + vdjcU + variant.columnNameSuffix,
280
- id: "best-" + vdjcL + variant.idSuffix,
281
- naRegex: "",
282
- allowNA: vdjcU == "C" || vdjcU == "D",
283
- spec: {
284
- name: variant.name,
285
- valueType: "String",
286
- domain: {
287
- "pl7.app/vdj/reference": vdjcU + "Gene"
288
- },
289
- annotations: a(orderP, variant.visible, {
290
- "pl7.app/label": "Best " + vdjcU + variant.labelSuffix,
291
- "pl7.app/isDiscreteFilter": "true"
292
- })
293
- }
294
- } ]
295
- exportArgs += [ [ "-" + vdjcL + variant.argSuffix ] ]
296
- orderP -= 100
297
- }
298
- }
299
261
 
300
262
 
301
263
 
@@ -323,7 +285,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
323
285
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
324
286
  alphabetShort := isAminoAcid ? "aa" : "nt"
325
287
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
326
- visibility := (featureU == "CDR3") || (featureU == assemblingFeature)
288
+ visibility := isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
327
289
  columnsSpecPerClonotype += [ {
328
290
  column: alphabetShortMixcr + "Seq" + imputedU + featureU,
329
291
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
@@ -370,6 +332,48 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
370
332
 
371
333
 
372
334
 
335
+ geneHitColumnVariants := [ {
336
+ name: "pl7.app/vdj/geneHitWithAllele",
337
+ columnNameSuffix: "Hit",
338
+ idSuffix: "-hit-with-allele",
339
+ labelSuffix: " hit with allele",
340
+ argSuffix: "Hit",
341
+ visible: false
342
+ }, {
343
+ name: "pl7.app/vdj/geneHit",
344
+ columnNameSuffix: "Gene",
345
+ idSuffix: "-gene",
346
+ labelSuffix: " gene",
347
+ argSuffix: "Gene",
348
+ visible: true
349
+ } ]
350
+ for vdjcU in ["V", "D", "J", "C"] {
351
+ vdjcL := text.to_lower(vdjcU)
352
+ for variant in geneHitColumnVariants {
353
+ columnsSpecPerClonotype += [ {
354
+ column: "best" + vdjcU + variant.columnNameSuffix,
355
+ id: "best-" + vdjcL + variant.idSuffix,
356
+ naRegex: "",
357
+ allowNA: vdjcU == "C" || vdjcU == "D",
358
+ spec: {
359
+ name: variant.name,
360
+ valueType: "String",
361
+ domain: {
362
+ "pl7.app/vdj/reference": vdjcU + "Gene"
363
+ },
364
+ annotations: a(orderP, variant.visible, {
365
+ "pl7.app/label": "Best " + vdjcU + variant.labelSuffix,
366
+ "pl7.app/isDiscreteFilter": "true"
367
+ })
368
+ }
369
+ } ]
370
+ exportArgs += [ [ "-" + vdjcL + variant.argSuffix ] ]
371
+ orderP -= 100
372
+ }
373
+ }
374
+
375
+
376
+
373
377
  orderP = 10000
374
378
 
375
379
  mutationColumnVariants := [ {
@@ -430,7 +434,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
430
434
  specName: "pl7.app/vdj/sequence/productive",
431
435
  label: "Productive",
432
436
  id: "is-productive",
433
- visibility: true
437
+ visibility: false
434
438
  }, {
435
439
  columnPrefix: "isOOF",
436
440
  arg: "-isOOF",
@@ -532,6 +536,10 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
532
536
  "pl7.app/vdj/clonotypingRunId": blockId
533
537
  } } })
534
538
 
539
+ columnsSpecPerSampleSc = addSpec(columnsSpecPerSampleSc, { spec: { domain: {
540
+ "pl7.app/vdj/clonotypingRunId": blockId
541
+ } } })
542
+
535
543
 
536
544
 
537
545
 
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": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
6
  "@platforma-sdk/workflow-tengo": "^3.1.0",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "devDependencies": {
10
10
  "@platforma-sdk/tengo-builder": "^2.0.2",
11
- "@platforma-open/milaboratories.software-mixcr": "4.7.0-148-develop",
11
+ "@platforma-open/milaboratories.software-mixcr": "4.7.0-149-develop",
12
12
  "@platforma-open/milaboratories.software-ptransform": "^1.3.1",
13
13
  "@platforma-sdk/test": "^1.25.0",
14
14
  "vitest": "^2.1.8",
@@ -85,6 +85,9 @@ addSpec := func(columns, additionalSpec) {
85
85
  })
86
86
  }
87
87
 
88
+ // Ordering rules
89
+ // AA Sequences
90
+
88
91
  calculateExportSpecs := func(presetSpecForBack, blockId) {
89
92
  ops := exportSpecOpsFromPreset(presetSpecForBack)
90
93
 
@@ -210,14 +213,14 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
210
213
 
211
214
  if isSingleCell {
212
215
  // copying reads and umi counts and fraction removing isPrimary and isAnchor
213
- // addSpec(columnsSpecPerSample, {
214
- // spec: {
215
- // annotations: {
216
- // "pl7.app/abundance/isPrimary": undefined,
217
- // "pl7.app/isAnchor": undefined
218
- // }
219
- // }
220
- // }) +
216
+ columnsSpecPerSample = addSpec(columnsSpecPerSample, {
217
+ spec: {
218
+ annotations: {
219
+ "pl7.app/abundance/isPrimary": undefined,
220
+ "pl7.app/isAnchor": undefined
221
+ }
222
+ }
223
+ })
221
224
  columnsSpecPerSampleSc = [ {
222
225
  column: "uniqueCellCount",
223
226
  id: "cell-count",
@@ -225,7 +228,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
225
228
  spec: {
226
229
  name: "pl7.app/vdj/uniqueCellCount",
227
230
  valueType: "Long",
228
- annotations: a(88000, true, {
231
+ annotations: a(20100, true, {
229
232
  "pl7.app/min": "1",
230
233
  "pl7.app/isAbundance": "true",
231
234
  "pl7.app/abundance/unit": "cells",
@@ -242,7 +245,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
242
245
  spec: {
243
246
  name: "pl7.app/vdj/uniqueCellFraction",
244
247
  valueType: "Double",
245
- annotations: a(88000, true, {
248
+ annotations: a(20000, false, {
246
249
  "pl7.app/min": "0",
247
250
  "pl7.app/isAbundance": "true",
248
251
  "pl7.app/abundance/unit": "cells",
@@ -254,48 +257,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
254
257
  } ]
255
258
  }
256
259
 
257
- // VDJC Hits
258
-
259
260
  orderP := 80000
260
- geneHitColumnVariants := [ {
261
- name: "pl7.app/vdj/geneHitWithAllele",
262
- columnNameSuffix: "Hit",
263
- idSuffix: "-hit-with-allele",
264
- labelSuffix: " hit with allele",
265
- argSuffix: "Hit",
266
- visible: false
267
- }, {
268
- name: "pl7.app/vdj/geneHit",
269
- columnNameSuffix: "Gene",
270
- idSuffix: "-gene",
271
- labelSuffix: " gene",
272
- argSuffix: "Gene",
273
- visible: true
274
- } ]
275
- for vdjcU in ["V", "D", "J", "C"] {
276
- vdjcL := text.to_lower(vdjcU)
277
- for variant in geneHitColumnVariants {
278
- columnsSpecPerClonotype += [ {
279
- column: "best" + vdjcU + variant.columnNameSuffix,
280
- id: "best-" + vdjcL + variant.idSuffix,
281
- naRegex: "",
282
- allowNA: vdjcU == "C" || vdjcU == "D",
283
- spec: {
284
- name: variant.name,
285
- valueType: "String",
286
- domain: {
287
- "pl7.app/vdj/reference": vdjcU + "Gene"
288
- },
289
- annotations: a(orderP, variant.visible, {
290
- "pl7.app/label": "Best " + vdjcU + variant.labelSuffix,
291
- "pl7.app/isDiscreteFilter": "true"
292
- })
293
- }
294
- } ]
295
- exportArgs += [ [ "-" + vdjcL + variant.argSuffix ] ]
296
- orderP -= 100
297
- }
298
- }
299
261
 
300
262
  // Sequences
301
263
 
@@ -323,7 +285,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
323
285
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
324
286
  alphabetShort := isAminoAcid ? "aa" : "nt"
325
287
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
326
- visibility := (featureU == "CDR3") || (featureU == assemblingFeature)
288
+ visibility := isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
327
289
  columnsSpecPerClonotype += [ {
328
290
  column: alphabetShortMixcr + "Seq" + imputedU + featureU,
329
291
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
@@ -368,6 +330,48 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
368
330
  }
369
331
  }
370
332
 
333
+ // VDJC Hits
334
+
335
+ geneHitColumnVariants := [ {
336
+ name: "pl7.app/vdj/geneHitWithAllele",
337
+ columnNameSuffix: "Hit",
338
+ idSuffix: "-hit-with-allele",
339
+ labelSuffix: " hit with allele",
340
+ argSuffix: "Hit",
341
+ visible: false
342
+ }, {
343
+ name: "pl7.app/vdj/geneHit",
344
+ columnNameSuffix: "Gene",
345
+ idSuffix: "-gene",
346
+ labelSuffix: " gene",
347
+ argSuffix: "Gene",
348
+ visible: true
349
+ } ]
350
+ for vdjcU in ["V", "D", "J", "C"] {
351
+ vdjcL := text.to_lower(vdjcU)
352
+ for variant in geneHitColumnVariants {
353
+ columnsSpecPerClonotype += [ {
354
+ column: "best" + vdjcU + variant.columnNameSuffix,
355
+ id: "best-" + vdjcL + variant.idSuffix,
356
+ naRegex: "",
357
+ allowNA: vdjcU == "C" || vdjcU == "D",
358
+ spec: {
359
+ name: variant.name,
360
+ valueType: "String",
361
+ domain: {
362
+ "pl7.app/vdj/reference": vdjcU + "Gene"
363
+ },
364
+ annotations: a(orderP, variant.visible, {
365
+ "pl7.app/label": "Best " + vdjcU + variant.labelSuffix,
366
+ "pl7.app/isDiscreteFilter": "true"
367
+ })
368
+ }
369
+ } ]
370
+ exportArgs += [ [ "-" + vdjcL + variant.argSuffix ] ]
371
+ orderP -= 100
372
+ }
373
+ }
374
+
371
375
  // Mutations
372
376
 
373
377
  orderP = 10000
@@ -430,7 +434,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
430
434
  specName: "pl7.app/vdj/sequence/productive",
431
435
  label: "Productive",
432
436
  id: "is-productive",
433
- visibility: true
437
+ visibility: false
434
438
  }, {
435
439
  columnPrefix: "isOOF",
436
440
  arg: "-isOOF",
@@ -532,6 +536,10 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
532
536
  "pl7.app/vdj/clonotypingRunId": blockId
533
537
  } } })
534
538
 
539
+ columnsSpecPerSampleSc = addSpec(columnsSpecPerSampleSc, { spec: { domain: {
540
+ "pl7.app/vdj/clonotypingRunId": blockId
541
+ } } })
542
+
535
543
  // "pl7.app/segmentedBy" annotation indicates columns that can be meaningfully merged across
536
544
  // different runs (given they have the same name and axes signature).
537
545
  // Its absence indicates that merging would be semantically meaningless (e.g., abundance
@@ -451,7 +451,7 @@ self.body(func(inputs) {
451
451
  for chainIdx in [0, 1] {
452
452
  // "A" chain is always the one that is more diverse
453
453
  chainLetterU := ["A", "B"][chainIdx]
454
- chainNameU := chainInfos[receptorInfo.chains[chainIdx]].name
454
+ chainNameU := chainInfos[receptorInfo.chains[chainIdx]].shortName
455
455
  chainNameL := text.to_lower(chainNameU)
456
456
 
457
457
  for isPrimary in [true, false] {
@@ -463,12 +463,25 @@ self.body(func(inputs) {
463
463
  // i.e. propertiesAPrimaryTsv
464
464
  propertiesTsvOutputName := propertiesTableName + "Tsv"
465
465
 
466
+ annotationsTransformation := {
467
+ "pl7.app/label": func(label) {
468
+ return chainNameU + " " + label + " " + pPrefixU
469
+ }
470
+ }
471
+
472
+ if !isPrimary {
473
+ annotationsTransformation["pl7.app/table/visibility"] = "optional"
474
+ }
475
+
466
476
  singleCellOutputs += [ {
467
477
  type: "Resource",
468
478
  spec: {
469
479
  kind: "PColumn",
470
480
  name: "mixcr.com/scClonotypeTable/" + chainNameL + pPrefixU,
471
481
  domain: {
482
+ "pl7.app/vdj/receptor": receptor,
483
+ "pl7.app/vdj/scClonotypeChain": chainLetterU,
484
+ "pl7.app/vdj/scClonotypeChain/index": pPrefixL,
472
485
  "pl7.app/vdj/clonotypingRunId": blockId
473
486
  },
474
487
  valueType: "File"
@@ -484,13 +497,10 @@ self.body(func(inputs) {
484
497
  spec: {
485
498
  domain: {
486
499
  "pl7.app/vdj/receptor": receptor,
487
- "pl7.app/vdj/scClonotypeChain": chainLetterU
500
+ "pl7.app/vdj/scClonotypeChain": chainLetterU,
501
+ "pl7.app/vdj/scClonotypeChain/index": pPrefixL
488
502
  },
489
- annotations: {
490
- "pl7.app/label": func(label) {
491
- return pPrefixU + " " + chainNameU + " " + label
492
- }
493
- }
503
+ annotations: annotationsTransformation
494
504
  }
495
505
  }),
496
506
  storageFormat: "Binary",