@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 2.5.0 → 2.6.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-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.0 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.6.0 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.0 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.6.0 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) 53188ms
10
- ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 12934ms
11
- ✓ checking preset for '10x-sc-xcr-vdj' 8323ms
12
- ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8051ms
13
- ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8026ms
14
- ✓ checking preset for 'rna-seq' 7829ms
15
- ✓ checking preset for 'generic-single-cell-gex' 8023ms
9
+ ✓ src/test/columns.test.ts (6 tests) 53410ms
10
+ ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 13379ms
11
+ ✓ checking preset for '10x-sc-xcr-vdj' 8349ms
12
+ ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8047ms
13
+ ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8039ms
14
+ ✓ checking preset for 'rna-seq' 7808ms
15
+ ✓ checking preset for 'generic-single-cell-gex' 7786ms
16
16
 
17
17
   Test Files  1 passed (1)
18
18
   Tests  6 passed (6)
19
-  Start at  09:32:55
20
-  Duration  53.99s (transform 41ms, setup 0ms, collect 564ms, tests 53.19s, environment 0ms, prepare 60ms)
19
+  Start at  10:16:02
20
+  Duration  54.29s (transform 57ms, setup 0ms, collect 610ms, tests 53.41s, environment 0ms, prepare 72ms)
21
21
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4b789fc: Added CDR3 length; removed unnecessary columns; removed pf from outputs
8
+
9
+ ## 2.5.1
10
+
11
+ ### Patch Changes
12
+
13
+ - fedc4ee: Added clonotype key label column for bulk data
14
+ - Updated dependencies [fedc4ee]
15
+ - @platforma-open/milaboratories.mixcr-clonotyping-2.single-cell-scripts@1.1.1
16
+
3
17
  ## 2.5.0
4
18
 
5
19
  ### Minor Changes
@@ -285,9 +285,10 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
285
285
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
286
286
  alphabetShort := isAminoAcid ? "aa" : "nt"
287
287
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
288
+ columnName := alphabetShortMixcr + "Seq" + imputedU + featureU
288
289
  visibility := isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
289
290
  columnsSpecPerClonotype += [ {
290
- column: alphabetShortMixcr + "Seq" + imputedU + featureU,
291
+ column: columnName,
291
292
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
292
293
  naRegex: "region_not_covered",
293
294
  spec: {
@@ -303,28 +304,27 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
303
304
  })
304
305
  }
305
306
  } ]
306
- exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
307
- if !isImputed && !isAminoAcid {
308
- columnsSpecPerSample += [ {
309
- column: "minQual" + featureU,
310
- id: "min-qual-" + featureL,
311
- naRegex: "region_not_covered",
312
- spec: {
313
- name: "pl7.app/vdj/sequenceQuality",
314
- valueType: "Int",
315
- domain: {
316
- "pl7.app/vdj/quality": "minQuality",
317
- "pl7.app/vdj/feature": featureU
318
- },
319
- annotations: a(orderP - 10, false, {
320
- "pl7.app/min": "0",
321
- "pl7.app/max": "60",
322
- "pl7.app/label": "Min quality " + featureU
323
- })
307
+
308
+
309
+ if isAminoAcid && !isSingleCell && featureU == "CDR3" {
310
+ columnsSpecPerClonotype += [ {
311
+ column: columnName,
312
+ id: "clonotype-label",
313
+ preProcess: [{
314
+ type: "regexpReplace",
315
+ pattern: "^region_not_covered$",
316
+ replacement: "Unlabelled"
317
+ }],
318
+ spec: {
319
+ name: "pl7.app/label",
320
+ valueType: "String",
321
+ annotations: {
322
+ "pl7.app/label": "Clone label"
324
323
  }
325
- } ]
326
- exportArgs += [ [ "-minFeatureQuality", featureU ] ]
324
+ }
325
+ } ]
327
326
  }
327
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
328
328
  orderP -= 100
329
329
  }
330
330
  }
@@ -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 ",
@@ -435,21 +437,23 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
435
437
  label: "Productive",
436
438
  id: "is-productive",
437
439
  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
- } ]
440
+ }
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+ ]
453
457
  for variant in flagColumnVariants {
454
458
  columnsSpecPerClonotype += [ {
455
459
  column: variant.columnPrefix + productiveFeature,
@@ -470,29 +474,29 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
470
474
 
471
475
 
472
476
 
473
- geneRegions := ["VRegion", "DRegion", "JRegion"]
474
477
 
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
- }
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
496
500
 
497
501
 
498
502
 
@@ -529,6 +533,38 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
529
533
  ]
530
534
 
531
535
 
536
+
537
+
538
+ lengthColumns := ["CDR3"] // assemblingFeatureInfo.nonImputed
539
+
540
+ for featureU in lengthColumns {
541
+ featureL := text.to_lower(featureU)
542
+ for isAminoAcid in [false, true] {
543
+ alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
544
+ alphabetShort := isAminoAcid ? "aa" : "nt"
545
+ alphabetShortMixcr := isAminoAcid ? "aa" : "n"
546
+ columnsSpecPerClonotype += [ {
547
+ column: alphabetShortMixcr + "Length" + featureU,
548
+ id: alphabetShortMixcr + "-length-" + featureL,
549
+ naRegex: "region_not_covered",
550
+ spec: {
551
+ name: "pl7.app/vdj/sequenceLength",
552
+ valueType: "Int",
553
+ domain: {
554
+ "pl7.app/vdj/feature": featureU,
555
+ "pl7.app/alphabet": alphabet
556
+ },
557
+ annotations: a(orderP, false, {
558
+ "pl7.app/label": "Length of " + featureU + " " + alphabetShort
559
+ })
560
+ }
561
+ } ]
562
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Length", featureU ] ]
563
+ orderP -= 100
564
+ }
565
+ }
566
+
567
+
532
568
 
533
569
  columnsSpec := columnsSpecPerSample + columnsSpecPerClonotype
534
570
 
@@ -595,7 +631,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
595
631
  "pl7.app/vdj/clonotypingRunId": blockId
596
632
  },
597
633
  annotations: {
598
- "pl7.app/label": "SC Clonotype key",
634
+ "pl7.app/label": "Clone label",
599
635
  "pl7.app/table/visibility": "optional",
600
636
  "pl7.app/table/orderPriority": "110000",
601
637
  "pl7.app/segmentedBy": string(json.encode(["pl7.app/vdj/clonotypingRunId"]))
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.mixcr-clonotyping-2.workflow",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
6
  "@platforma-sdk/workflow-tengo": "^3.1.0",
7
- "@platforma-open/milaboratories.mixcr-clonotyping-2.single-cell-scripts": "1.1.0"
7
+ "@platforma-open/milaboratories.mixcr-clonotyping-2.single-cell-scripts": "1.1.1"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@platforma-sdk/tengo-builder": "^2.0.2",
@@ -285,9 +285,10 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
285
285
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
286
286
  alphabetShort := isAminoAcid ? "aa" : "nt"
287
287
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
288
+ columnName := alphabetShortMixcr + "Seq" + imputedU + featureU
288
289
  visibility := isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
289
290
  columnsSpecPerClonotype += [ {
290
- column: alphabetShortMixcr + "Seq" + imputedU + featureU,
291
+ column: columnName,
291
292
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
292
293
  naRegex: "region_not_covered",
293
294
  spec: {
@@ -303,28 +304,27 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
303
304
  })
304
305
  }
305
306
  } ]
306
- exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
307
- if !isImputed && !isAminoAcid {
308
- columnsSpecPerSample += [ {
309
- column: "minQual" + featureU,
310
- id: "min-qual-" + featureL,
311
- naRegex: "region_not_covered",
312
- spec: {
313
- name: "pl7.app/vdj/sequenceQuality",
314
- valueType: "Int",
315
- domain: {
316
- "pl7.app/vdj/quality": "minQuality",
317
- "pl7.app/vdj/feature": featureU
318
- },
319
- annotations: a(orderP - 10, false, {
320
- "pl7.app/min": "0",
321
- "pl7.app/max": "60",
322
- "pl7.app/label": "Min quality " + featureU
323
- })
307
+
308
+ // label column
309
+ if isAminoAcid && !isSingleCell && featureU == "CDR3" {
310
+ columnsSpecPerClonotype += [ {
311
+ column: columnName,
312
+ id: "clonotype-label",
313
+ preProcess: [{
314
+ type: "regexpReplace",
315
+ pattern: "^region_not_covered$",
316
+ replacement: "Unlabelled"
317
+ }],
318
+ spec: {
319
+ name: "pl7.app/label",
320
+ valueType: "String",
321
+ annotations: {
322
+ "pl7.app/label": "Clone label"
324
323
  }
325
- } ]
326
- exportArgs += [ [ "-minFeatureQuality", featureU ] ]
324
+ }
325
+ } ]
327
326
  }
327
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
328
328
  orderP -= 100
329
329
  }
330
330
  }
@@ -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 ",
@@ -435,21 +437,23 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
435
437
  label: "Productive",
436
438
  id: "is-productive",
437
439
  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
- } ]
440
+ }
441
+ // {
442
+ // columnPrefix: "isOOF",
443
+ // arg: "-isOOF",
444
+ // specName: "pl7.app/vdj/sequence/containsOOF",
445
+ // label: "Contains OOF",
446
+ // id: "is-oof",
447
+ // visibility: false
448
+ // }, {
449
+ // columnPrefix: "hasStopsIn",
450
+ // arg: "-hasStops",
451
+ // specName: "pl7.app/vdj/sequence/containsStopCodons",
452
+ // label: "Contains stop codons",
453
+ // id: "has-stops",
454
+ // visibility: false
455
+ // }
456
+ ]
453
457
  for variant in flagColumnVariants {
454
458
  columnsSpecPerClonotype += [ {
455
459
  column: variant.columnPrefix + productiveFeature,
@@ -470,29 +474,29 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
470
474
 
471
475
  // Germline sequences
472
476
 
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
- }
477
+ // geneRegions := ["VRegion", "DRegion", "JRegion"]
478
+
479
+ // for region in geneRegions {
480
+ // columnsSpecPerClonotype += [ {
481
+ // column: "nSeq" + region + "OfGermline",
482
+ // naRegex: "",
483
+ // allowNA: true,
484
+ // id: "n-seq-" + text.to_lower(region) + "-germline",
485
+ // spec: {
486
+ // name: "pl7.app/vdj/germlineSequence",
487
+ // valueType: "String",
488
+ // domain: {
489
+ // "pl7.app/vdj/feature": region,
490
+ // "pl7.app/alphabet": "nucleotide"
491
+ // },
492
+ // annotations: a(orderP, false, {
493
+ // "pl7.app/label": region[0:1] + " germline"
494
+ // })
495
+ // }
496
+ // } ]
497
+ // exportArgs += [ [ "-nFeature", region, "germline" ] ]
498
+ // orderP -= 100
499
+ // }
496
500
 
497
501
  // Isotype and chain
498
502
 
@@ -528,6 +532,38 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
528
532
  [ "-topChains" ]
529
533
  ]
530
534
 
535
+ //Sequence length
536
+
537
+ // for now use only CDR3 length to avoid generating too many columns
538
+ lengthColumns := ["CDR3"] // assemblingFeatureInfo.nonImputed
539
+
540
+ for featureU in lengthColumns {
541
+ featureL := text.to_lower(featureU)
542
+ for isAminoAcid in [false, true] {
543
+ alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
544
+ alphabetShort := isAminoAcid ? "aa" : "nt"
545
+ alphabetShortMixcr := isAminoAcid ? "aa" : "n"
546
+ columnsSpecPerClonotype += [ {
547
+ column: alphabetShortMixcr + "Length" + featureU,
548
+ id: alphabetShortMixcr + "-length-" + featureL,
549
+ naRegex: "region_not_covered",
550
+ spec: {
551
+ name: "pl7.app/vdj/sequenceLength",
552
+ valueType: "Int",
553
+ domain: {
554
+ "pl7.app/vdj/feature": featureU,
555
+ "pl7.app/alphabet": alphabet
556
+ },
557
+ annotations: a(orderP, false, {
558
+ "pl7.app/label": "Length of " + featureU + " " + alphabetShort
559
+ })
560
+ }
561
+ } ]
562
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Length", featureU ] ]
563
+ orderP -= 100
564
+ }
565
+ }
566
+
531
567
  // All columns are added
532
568
 
533
569
  columnsSpec := columnsSpecPerSample + columnsSpecPerClonotype
@@ -595,7 +631,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
595
631
  "pl7.app/vdj/clonotypingRunId": blockId
596
632
  },
597
633
  annotations: {
598
- "pl7.app/label": "SC Clonotype key",
634
+ "pl7.app/label": "Clone label",
599
635
  "pl7.app/table/visibility": "optional",
600
636
  "pl7.app/table/orderPriority": "110000",
601
637
  "pl7.app/segmentedBy": string(json.encode(["pl7.app/vdj/clonotypingRunId"]))
@@ -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
  }))