@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 2.5.1 → 2.6.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,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.5.1 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.6.1 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,21 +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.5.1 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.6.1 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
- ✓ src/test/columns.test.ts (6 tests) 55335ms
10
- ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 13611ms
11
- ✓ checking preset for '10x-sc-xcr-vdj' 8802ms
12
- ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8358ms
13
- ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8466ms
14
- ✓ checking preset for 'rna-seq' 8068ms
15
- ✓ checking preset for 'generic-single-cell-gex' 8028ms
9
+ ✓ src/test/columns.test.ts (6 tests) 55868ms
10
+ ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 14243ms
11
+ ✓ checking preset for '10x-sc-xcr-vdj' 8794ms
12
+ ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8380ms
13
+ ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8294ms
14
+ ✓ checking preset for 'rna-seq' 7887ms
15
+ ✓ checking preset for 'generic-single-cell-gex' 8268ms
16
16
 
17
17
   Test Files  1 passed (1)
18
18
   Tests  6 passed (6)
19
-  Start at  16:04:59
20
-  Duration  56.24s (transform 54ms, setup 0ms, collect 634ms, tests 55.34s, environment 0ms, prepare 77ms)
19
+  Start at  16:45:12
20
+  Duration  56.68s (transform 41ms, setup 0ms, collect 572ms, tests 55.87s, environment 0ms, prepare 60ms)
21
21
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 2.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 24b689b: Fixes spec for mutation columns (adds pl7.app/vdj/gene domain to make column ids for V and J genes distinguishable)
8
+
9
+ ## 2.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4b789fc: Added CDR3 length; removed unnecessary columns; removed pf from outputs
14
+
3
15
  ## 2.5.1
4
16
 
5
17
  ### Patch Changes
@@ -376,12 +376,14 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
376
376
 
377
377
  orderP = 10000
378
378
 
379
- mutationColumnVariants := [ {
380
- name: "Mutations",
381
- valueType: "String",
382
- labelPart: " mutations in ",
383
- idPart: "-mutations-"
384
- }, {
379
+ mutationColumnVariants := [
380
+
381
+
382
+
383
+
384
+
385
+
386
+ {
385
387
  name: "MutationsCount",
386
388
  valueType: "Int",
387
389
  labelPart: " mutations count in ",
@@ -415,6 +417,9 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
415
417
  spec: {
416
418
  valueType: variant.valueType,
417
419
  name: "pl7.app/vdj/sequence/" + alphabetShortMixcr + variant.name,
420
+ domain: {
421
+ "pl7.app/vdj/gene": geneU
422
+ },
418
423
  annotations: a(orderP, false, {
419
424
  "pl7.app/label": alphabetShort + variant.labelPart + geneU + " gene"
420
425
  })
@@ -435,21 +440,23 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
435
440
  label: "Productive",
436
441
  id: "is-productive",
437
442
  visibility: false
438
- }, {
439
- columnPrefix: "isOOF",
440
- arg: "-isOOF",
441
- specName: "pl7.app/vdj/sequence/containsOOF",
442
- label: "Contains OOF",
443
- id: "is-oof",
444
- visibility: false
445
- }, {
446
- columnPrefix: "hasStopsIn",
447
- arg: "-hasStops",
448
- specName: "pl7.app/vdj/sequence/containsStopCodons",
449
- label: "Contains stop codons",
450
- id: "has-stops",
451
- visibility: false
452
- } ]
443
+ }
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+ ]
453
460
  for variant in flagColumnVariants {
454
461
  columnsSpecPerClonotype += [ {
455
462
  column: variant.columnPrefix + productiveFeature,
@@ -470,29 +477,29 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
470
477
 
471
478
 
472
479
 
473
- geneRegions := ["VRegion", "DRegion", "JRegion"]
474
480
 
475
- for region in geneRegions {
476
- columnsSpecPerClonotype += [ {
477
- column: "nSeq" + region + "OfGermline",
478
- naRegex: "",
479
- allowNA: true,
480
- id: "n-seq-" + text.to_lower(region) + "-germline",
481
- spec: {
482
- name: "pl7.app/vdj/germlineSequence",
483
- valueType: "String",
484
- domain: {
485
- "pl7.app/vdj/feature": region,
486
- "pl7.app/alphabet": "nucleotide"
487
- },
488
- annotations: a(orderP, false, {
489
- "pl7.app/label": region[0:1] + " germline"
490
- })
491
- }
492
- } ]
493
- exportArgs += [ [ "-nFeature", region, "germline" ] ]
494
- orderP -= 100
495
- }
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
496
503
 
497
504
 
498
505
 
@@ -529,6 +536,38 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
529
536
  ]
530
537
 
531
538
 
539
+
540
+
541
+ lengthColumns := ["CDR3"] // assemblingFeatureInfo.nonImputed
542
+
543
+ for featureU in lengthColumns {
544
+ featureL := text.to_lower(featureU)
545
+ for isAminoAcid in [false, true] {
546
+ alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
547
+ alphabetShort := isAminoAcid ? "aa" : "nt"
548
+ alphabetShortMixcr := isAminoAcid ? "aa" : "n"
549
+ columnsSpecPerClonotype += [ {
550
+ column: alphabetShortMixcr + "Length" + featureU,
551
+ id: alphabetShortMixcr + "-length-" + featureL,
552
+ naRegex: "region_not_covered",
553
+ spec: {
554
+ name: "pl7.app/vdj/sequenceLength",
555
+ valueType: "Int",
556
+ domain: {
557
+ "pl7.app/vdj/feature": featureU,
558
+ "pl7.app/alphabet": alphabet
559
+ },
560
+ annotations: a(orderP, false, {
561
+ "pl7.app/label": "Length of " + featureU + " " + alphabetShort
562
+ })
563
+ }
564
+ } ]
565
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Length", featureU ] ]
566
+ orderP -= 100
567
+ }
568
+ }
569
+
570
+
532
571
 
533
572
  columnsSpec := columnsSpecPerSample + columnsSpecPerClonotype
534
573
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.mixcr-clonotyping-2.workflow",
3
- "version": "2.5.1",
3
+ "version": "2.6.1",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
- "@platforma-sdk/workflow-tengo": "^3.1.0",
6
+ "@platforma-sdk/workflow-tengo": "^4.0.3",
7
7
  "@platforma-open/milaboratories.mixcr-clonotyping-2.single-cell-scripts": "1.1.1"
8
8
  },
9
9
  "devDependencies": {
10
- "@platforma-sdk/tengo-builder": "^2.0.2",
10
+ "@platforma-sdk/tengo-builder": "^2.0.3",
11
11
  "@platforma-open/milaboratories.software-mixcr": "4.7.0-149-develop",
12
12
  "@platforma-open/milaboratories.software-ptransform": "^1.3.1",
13
- "@platforma-sdk/test": "^1.25.0",
13
+ "@platforma-sdk/test": "^1.28.2",
14
14
  "vitest": "^2.1.8",
15
15
  "typescript": "~5.5.4"
16
16
  },
@@ -376,12 +376,14 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
376
376
 
377
377
  orderP = 10000
378
378
 
379
- mutationColumnVariants := [ {
380
- name: "Mutations",
381
- valueType: "String",
382
- labelPart: " mutations in ",
383
- idPart: "-mutations-"
384
- }, {
379
+ mutationColumnVariants := [
380
+ // {
381
+ // name: "Mutations",
382
+ // valueType: "String",
383
+ // labelPart: " mutations in ",
384
+ // idPart: "-mutations-"
385
+ // },
386
+ {
385
387
  name: "MutationsCount",
386
388
  valueType: "Int",
387
389
  labelPart: " mutations count in ",
@@ -415,6 +417,9 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
415
417
  spec: {
416
418
  valueType: variant.valueType,
417
419
  name: "pl7.app/vdj/sequence/" + alphabetShortMixcr + variant.name,
420
+ domain: {
421
+ "pl7.app/vdj/gene": geneU
422
+ },
418
423
  annotations: a(orderP, false, {
419
424
  "pl7.app/label": alphabetShort + variant.labelPart + geneU + " gene"
420
425
  })
@@ -435,21 +440,23 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
435
440
  label: "Productive",
436
441
  id: "is-productive",
437
442
  visibility: false
438
- }, {
439
- columnPrefix: "isOOF",
440
- arg: "-isOOF",
441
- specName: "pl7.app/vdj/sequence/containsOOF",
442
- label: "Contains OOF",
443
- id: "is-oof",
444
- visibility: false
445
- }, {
446
- columnPrefix: "hasStopsIn",
447
- arg: "-hasStops",
448
- specName: "pl7.app/vdj/sequence/containsStopCodons",
449
- label: "Contains stop codons",
450
- id: "has-stops",
451
- visibility: false
452
- } ]
443
+ }
444
+ // {
445
+ // columnPrefix: "isOOF",
446
+ // arg: "-isOOF",
447
+ // specName: "pl7.app/vdj/sequence/containsOOF",
448
+ // label: "Contains OOF",
449
+ // id: "is-oof",
450
+ // visibility: false
451
+ // }, {
452
+ // columnPrefix: "hasStopsIn",
453
+ // arg: "-hasStops",
454
+ // specName: "pl7.app/vdj/sequence/containsStopCodons",
455
+ // label: "Contains stop codons",
456
+ // id: "has-stops",
457
+ // visibility: false
458
+ // }
459
+ ]
453
460
  for variant in flagColumnVariants {
454
461
  columnsSpecPerClonotype += [ {
455
462
  column: variant.columnPrefix + productiveFeature,
@@ -470,29 +477,29 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
470
477
 
471
478
  // Germline sequences
472
479
 
473
- geneRegions := ["VRegion", "DRegion", "JRegion"]
474
-
475
- for region in geneRegions {
476
- columnsSpecPerClonotype += [ {
477
- column: "nSeq" + region + "OfGermline",
478
- naRegex: "",
479
- allowNA: true,
480
- id: "n-seq-" + text.to_lower(region) + "-germline",
481
- spec: {
482
- name: "pl7.app/vdj/germlineSequence",
483
- valueType: "String",
484
- domain: {
485
- "pl7.app/vdj/feature": region,
486
- "pl7.app/alphabet": "nucleotide"
487
- },
488
- annotations: a(orderP, false, {
489
- "pl7.app/label": region[0:1] + " germline"
490
- })
491
- }
492
- } ]
493
- exportArgs += [ [ "-nFeature", region, "germline" ] ]
494
- orderP -= 100
495
- }
480
+ // geneRegions := ["VRegion", "DRegion", "JRegion"]
481
+
482
+ // for region in geneRegions {
483
+ // columnsSpecPerClonotype += [ {
484
+ // column: "nSeq" + region + "OfGermline",
485
+ // naRegex: "",
486
+ // allowNA: true,
487
+ // id: "n-seq-" + text.to_lower(region) + "-germline",
488
+ // spec: {
489
+ // name: "pl7.app/vdj/germlineSequence",
490
+ // valueType: "String",
491
+ // domain: {
492
+ // "pl7.app/vdj/feature": region,
493
+ // "pl7.app/alphabet": "nucleotide"
494
+ // },
495
+ // annotations: a(orderP, false, {
496
+ // "pl7.app/label": region[0:1] + " germline"
497
+ // })
498
+ // }
499
+ // } ]
500
+ // exportArgs += [ [ "-nFeature", region, "germline" ] ]
501
+ // orderP -= 100
502
+ // }
496
503
 
497
504
  // Isotype and chain
498
505
 
@@ -528,6 +535,38 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
528
535
  [ "-topChains" ]
529
536
  ]
530
537
 
538
+ //Sequence length
539
+
540
+ // for now use only CDR3 length to avoid generating too many columns
541
+ lengthColumns := ["CDR3"] // assemblingFeatureInfo.nonImputed
542
+
543
+ for featureU in lengthColumns {
544
+ featureL := text.to_lower(featureU)
545
+ for isAminoAcid in [false, true] {
546
+ alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
547
+ alphabetShort := isAminoAcid ? "aa" : "nt"
548
+ alphabetShortMixcr := isAminoAcid ? "aa" : "n"
549
+ columnsSpecPerClonotype += [ {
550
+ column: alphabetShortMixcr + "Length" + featureU,
551
+ id: alphabetShortMixcr + "-length-" + featureL,
552
+ naRegex: "region_not_covered",
553
+ spec: {
554
+ name: "pl7.app/vdj/sequenceLength",
555
+ valueType: "Int",
556
+ domain: {
557
+ "pl7.app/vdj/feature": featureU,
558
+ "pl7.app/alphabet": alphabet
559
+ },
560
+ annotations: a(orderP, false, {
561
+ "pl7.app/label": "Length of " + featureU + " " + alphabetShort
562
+ })
563
+ }
564
+ } ]
565
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Length", featureU ] ]
566
+ orderP -= 100
567
+ }
568
+ }
569
+
531
570
  // All columns are added
532
571
 
533
572
  columnsSpec := columnsSpecPerSample + columnsSpecPerClonotype
@@ -135,8 +135,8 @@ wf.body(func(args) {
135
135
  qc: pframes.exportColumnData(runMixcr.output("qc.data")),
136
136
  reports: pframes.exportColumnData(runMixcr.output("reports.data")),
137
137
  logs: runMixcr.output("logs.data"),
138
- clonotypes: pframes.exportFrame(runMixcr.output("clonotypes")),
139
138
  clns: runMixcr.output("clns.data"),
139
+ clonotypes: pframes.exportFrame(runMixcr.output("clonotypes")),
140
140
  fileImports: smart.createMapResource(maps.mapValues(fileImports, func(im) {
141
141
  return im.handle
142
142
  }))