@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 2.8.0 → 2.8.2

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.8.0 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.8.2 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.8.0 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.8.2 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) 54112ms
10
- ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 12976ms
11
- ✓ checking preset for '10x-sc-xcr-vdj' 8593ms
12
- ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8350ms
13
- ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8290ms
14
- ✓ checking preset for 'rna-seq' 7833ms
15
- ✓ checking preset for 'generic-single-cell-gex' 8069ms
9
+ ✓ src/test/columns.test.ts (6 tests) 53957ms
10
+ ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 12559ms
11
+ ✓ checking preset for '10x-sc-xcr-vdj' 8530ms
12
+ ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 8433ms
13
+ ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8412ms
14
+ ✓ checking preset for 'rna-seq' 8008ms
15
+ ✓ checking preset for 'generic-single-cell-gex' 8014ms
16
16
 
17
17
   Test Files  1 passed (1)
18
18
   Tests  6 passed (6)
19
-  Start at  15:43:44
20
-  Duration  55.17s (transform 63ms, setup 0ms, collect 737ms, tests 54.11s, environment 0ms, prepare 92ms)
19
+  Start at  16:34:49
20
+  Duration  54.77s (transform 44ms, setup 0ms, collect 587ms, tests 53.96s, environment 0ms, prepare 62ms)
21
21
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 2.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e84b4df: SDK upgrade to fix empty tables issues & minor corrections to column generation logic
8
+
9
+ ## 2.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - f838dd2: Remove CDR3 length column from output
14
+
3
15
  ## 2.8.0
4
16
 
5
17
  ### Minor Changes
@@ -269,7 +269,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
269
269
  features = ["CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
270
270
  anchorFeature = "CDR3"
271
271
  } else if assemblingFeature != "CDR3" {
272
- features = [assemblingFeature, "CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
272
+ features = ["CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4", assemblingFeature]
273
273
  anchorFeature = assemblingFeature
274
274
  } else {
275
275
  features = ["CDR3"]
@@ -281,12 +281,12 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
281
281
  imputedL := text.to_lower(imputedU)
282
282
  for featureU in features {
283
283
  featureL := text.to_lower(featureU)
284
- for isAminoAcid in [false, true] {
284
+ for isAminoAcid in [true, false] {
285
285
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
286
286
  alphabetShort := isAminoAcid ? "aa" : "nt"
287
287
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
288
288
  columnName := alphabetShortMixcr + "Seq" + imputedU + featureU
289
- visibility := isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
289
+ visibility := featureU == "CDR3" && (!isSingleCell || isAminoAcid) // isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
290
290
  columnsSpecPerClonotype += [ {
291
291
  column: columnName,
292
292
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
@@ -304,6 +304,29 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
304
304
  })
305
305
  }
306
306
  } ]
307
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
308
+ orderP -= 100
309
+
310
+
311
+ if featureU == "CDR3" {
312
+ columnsSpecPerClonotype += [ {
313
+ column: alphabetShortMixcr + "Length" + featureU,
314
+ id: alphabetShortMixcr + "-length-" + featureL,
315
+ naRegex: "region_not_covered",
316
+ spec: {
317
+ name: "pl7.app/vdj/sequenceLength",
318
+ valueType: "Int",
319
+ domain: {
320
+ "pl7.app/vdj/feature": featureU,
321
+ "pl7.app/alphabet": alphabet
322
+ },
323
+ annotations: a(orderP, false, {
324
+ "pl7.app/label": "Length of " + featureU + " " + alphabetShort
325
+ })
326
+ }
327
+ } ]
328
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Length", featureU ] ]
329
+ }
307
330
 
308
331
 
309
332
  if isAminoAcid && !isSingleCell && featureU == "CDR3" {
@@ -318,14 +341,12 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
318
341
  spec: {
319
342
  name: "pl7.app/label",
320
343
  valueType: "String",
321
- annotations: {
344
+ annotations: a(100000, false, {
322
345
  "pl7.app/label": "Clone label"
323
- }
346
+ })
324
347
  }
325
348
  } ]
326
349
  }
327
- exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
328
- orderP -= 100
329
350
  }
330
351
  }
331
352
  }
@@ -376,7 +397,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
376
397
 
377
398
  orderP = 10000
378
399
 
379
- mutationColumnVariants := [
400
+ mutationColumnVariants := [
380
401
 
381
402
 
382
403
 
@@ -536,38 +557,6 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
536
557
  ]
537
558
 
538
559
 
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
-
571
560
 
572
561
  columnsSpec := columnsSpecPerSample + columnsSpecPerClonotype
573
562
 
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.8.0",
3
+ "version": "2.8.2",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
- "@platforma-sdk/workflow-tengo": "^4.0.3",
6
+ "@platforma-sdk/workflow-tengo": "^4.0.8",
7
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.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.28.2",
13
+ "@platforma-sdk/test": "^1.29.3",
14
14
  "vitest": "^2.1.8",
15
15
  "typescript": "~5.5.4"
16
16
  },
@@ -269,7 +269,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
269
269
  features = ["CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
270
270
  anchorFeature = "CDR3"
271
271
  } else if assemblingFeature != "CDR3" {
272
- features = [assemblingFeature, "CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
272
+ features = ["CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4", assemblingFeature]
273
273
  anchorFeature = assemblingFeature
274
274
  } else {
275
275
  features = ["CDR3"]
@@ -281,12 +281,12 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
281
281
  imputedL := text.to_lower(imputedU)
282
282
  for featureU in features {
283
283
  featureL := text.to_lower(featureU)
284
- for isAminoAcid in [false, true] {
284
+ for isAminoAcid in [true, false] {
285
285
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
286
286
  alphabetShort := isAminoAcid ? "aa" : "nt"
287
287
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
288
288
  columnName := alphabetShortMixcr + "Seq" + imputedU + featureU
289
- visibility := isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
289
+ visibility := featureU == "CDR3" && (!isSingleCell || isAminoAcid) // isSingleCell ? (featureU == "CDR3") && isAminoAcid : (featureU == "CDR3") || (featureU == assemblingFeature)
290
290
  columnsSpecPerClonotype += [ {
291
291
  column: columnName,
292
292
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
@@ -304,6 +304,29 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
304
304
  })
305
305
  }
306
306
  } ]
307
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
308
+ orderP -= 100
309
+
310
+ // For now calculate length only for CDR3 to keep the number of columns manageable
311
+ if featureU == "CDR3" {
312
+ columnsSpecPerClonotype += [ {
313
+ column: alphabetShortMixcr + "Length" + featureU,
314
+ id: alphabetShortMixcr + "-length-" + featureL,
315
+ naRegex: "region_not_covered",
316
+ spec: {
317
+ name: "pl7.app/vdj/sequenceLength",
318
+ valueType: "Int",
319
+ domain: {
320
+ "pl7.app/vdj/feature": featureU,
321
+ "pl7.app/alphabet": alphabet
322
+ },
323
+ annotations: a(orderP, false, {
324
+ "pl7.app/label": "Length of " + featureU + " " + alphabetShort
325
+ })
326
+ }
327
+ } ]
328
+ exportArgs += [ [ "-" + alphabetShortMixcr + "Length", featureU ] ]
329
+ }
307
330
 
308
331
  // label column
309
332
  if isAminoAcid && !isSingleCell && featureU == "CDR3" {
@@ -318,14 +341,12 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
318
341
  spec: {
319
342
  name: "pl7.app/label",
320
343
  valueType: "String",
321
- annotations: {
344
+ annotations: a(100000, false, {
322
345
  "pl7.app/label": "Clone label"
323
- }
346
+ })
324
347
  }
325
348
  } ]
326
349
  }
327
- exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
328
- orderP -= 100
329
350
  }
330
351
  }
331
352
  }
@@ -376,7 +397,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
376
397
 
377
398
  orderP = 10000
378
399
 
379
- mutationColumnVariants := [
400
+ mutationColumnVariants := [
380
401
  // {
381
402
  // name: "Mutations",
382
403
  // valueType: "String",
@@ -535,38 +556,6 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
535
556
  [ "-topChains" ]
536
557
  ]
537
558
 
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
-
570
559
  // All columns are added
571
560
 
572
561
  columnsSpec := columnsSpecPerSample + columnsSpecPerClonotype