@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 2.15.1 → 2.16.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/mixcr-clonotyping/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.15.1 build /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.16.0 build /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/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/mixcr-clonotyping/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.15.1 test /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.16.0 test /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
4
4
  > vitest
5
5
 
6
6
 
7
7
   RUN  v2.1.8 /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
8
8
 
9
- ✓ src/test/columns.test.ts (6 tests) 52243ms
10
- ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 12711ms
11
- ✓ checking preset for '10x-sc-xcr-vdj' 8250ms
12
- ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 7810ms
13
- ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 7940ms
14
- ✓ checking preset for 'rna-seq' 7563ms
15
- ✓ checking preset for 'generic-single-cell-gex' 7968ms
9
+ ✓ src/test/columns.test.ts (6 tests) 52032ms
10
+ ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 12517ms
11
+ ✓ checking preset for '10x-sc-xcr-vdj' 7966ms
12
+ ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 7939ms
13
+ ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 8375ms
14
+ ✓ checking preset for 'rna-seq' 7527ms
15
+ ✓ checking preset for 'generic-single-cell-gex' 7706ms
16
16
 
17
17
   Test Files  1 passed (1)
18
18
   Tests  6 passed (6)
19
-  Start at  20:14:53
20
-  Duration  53.03s (transform 43ms, setup 0ms, collect 561ms, tests 52.24s, environment 0ms, prepare 60ms)
19
+  Start at  20:31:27
20
+  Duration  52.90s (transform 57ms, setup 0ms, collect 619ms, tests 52.03s, environment 0ms, prepare 68ms)
21
21
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 2.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 632c7c0: fixed bugs with assemblingFeature and updated ptransform to 1.4.0
8
+
3
9
  ## 2.15.1
4
10
 
5
11
  ### Patch Changes
@@ -36,24 +36,30 @@ assemblingFeatureInfo := func(assemblingFeature) {
36
36
  productiveFeature := undefined
37
37
  coreVFeature := undefined
38
38
  coreJFeature := undefined
39
- if assemblingFeature == "CDR3" || is_undefined(assemblingFeature) {
40
- productiveFeature = "CDR3"
41
- } else if assemblingFeature == "VDJRegion" {
42
- productiveFeature = "VDJRegion(0,-1)"
43
- coreVFeature = "{FR1Begin:FR3End}"
44
- coreJFeature = "FR4"
45
- } else {
46
- splittedFeature := text.split(assemblingFeature, "_TO_")
47
- if len(splittedFeature) == 2 {
48
- if splittedFeature[1] == "FR4" {
49
- productiveFeature = splittedFeature[0] + "_TO_FR4(0,-1)"
50
- coreVFeature = "{"+splittedFeature[0]+"Begin:FR3End}"
39
+ if assemblingFeature {
40
+ splittedFeature1 := text.split(assemblingFeature, "_TO_")
41
+ splittedFeature2 := text.split(assemblingFeature, ":")
42
+ if assemblingFeature == "CDR3" {
43
+ productiveFeature = "CDR3"
44
+ } else if assemblingFeature == "VDJRegion" {
45
+ productiveFeature = "VDJRegion(0,-1)"
46
+ coreVFeature = "{FR1Begin:FR3End}"
47
+ coreJFeature = "FR4"
48
+ } else if len(splittedFeature1) == 2 {
49
+ if splittedFeature1[1] == "FR4" {
50
+ productiveFeature = splittedFeature1[0] + "_TO_FR4(0,-1)"
51
+ coreVFeature = "{"+splittedFeature1[0]+"Begin:FR3End}"
51
52
  coreJFeature = "FR4"
52
53
  } else {
53
54
  productiveFeature = assemblingFeature
54
- coreVFeature = "{"+splittedFeature[0]+"Begin:FR3End}"
55
+ coreVFeature = "{"+splittedFeature1[0]+"Begin:FR3End}"
55
56
  }
57
+ } else if len(splittedFeature2) == 2 {
58
+ productiveFeature = assemblingFeature
59
+ coreVFeature = splittedFeature2[0]+":FR3End}"
56
60
  }
61
+ } else {
62
+ productiveFeature = "CDR3"
57
63
  }
58
64
  return {
59
65
  productiveFeature: productiveFeature,
@@ -64,6 +70,14 @@ assemblingFeatureInfo := func(assemblingFeature) {
64
70
  }
65
71
  }
66
72
 
73
+
74
+ formatId := func(input) {
75
+ noNums := text.re_replace(`\(\s*-?\d+(\s*,\s*-?\d+)*\s*\)`, input, "")
76
+ noBraces := text.re_replace(`[{}\(\)]`, noNums, "")
77
+ result := text.re_replace(`:`, noBraces, "-")
78
+ return result
79
+ }
80
+
67
81
  exportSpecOpsFromPreset := func(presetSpecForBack) {
68
82
  assemblingFeature := undefined
69
83
  if !is_undefined(presetSpecForBack.assemblingFeature) {
@@ -302,7 +316,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
302
316
  imputedU := isImputed ? "Imputed" : ""
303
317
  imputedL := text.to_lower(imputedU)
304
318
  for featureU in features {
305
- featureL := text.to_lower(featureU)
319
+ featureL := text.to_lower(formatId(featureU))
306
320
  for isAminoAcid in [true, false] {
307
321
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
308
322
  alphabetShort := isAminoAcid ? "aa" : "nt"
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.15.1",
3
+ "version": "2.16.0",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
6
  "@platforma-sdk/workflow-tengo": "^4.1.2",
@@ -10,7 +10,7 @@
10
10
  "devDependencies": {
11
11
  "@platforma-sdk/tengo-builder": "^2.1.0",
12
12
  "@platforma-open/milaboratories.software-mixcr": "4.7.0-165-develop",
13
- "@platforma-open/milaboratories.software-ptransform": "^1.3.1",
13
+ "@platforma-open/milaboratories.software-ptransform": "^1.4.0",
14
14
  "@platforma-sdk/test": "^1.29.17",
15
15
  "vitest": "~2.1.8",
16
16
  "typescript": "~5.5.4"
@@ -36,24 +36,30 @@ assemblingFeatureInfo := func(assemblingFeature) {
36
36
  productiveFeature := undefined
37
37
  coreVFeature := undefined
38
38
  coreJFeature := undefined
39
- if assemblingFeature == "CDR3" || is_undefined(assemblingFeature) {
40
- productiveFeature = "CDR3"
41
- } else if assemblingFeature == "VDJRegion" {
42
- productiveFeature = "VDJRegion(0,-1)"
43
- coreVFeature = "{FR1Begin:FR3End}"
44
- coreJFeature = "FR4"
45
- } else {
46
- splittedFeature := text.split(assemblingFeature, "_TO_")
47
- if len(splittedFeature) == 2 {
48
- if splittedFeature[1] == "FR4" {
49
- productiveFeature = splittedFeature[0] + "_TO_FR4(0,-1)"
50
- coreVFeature = "{"+splittedFeature[0]+"Begin:FR3End}"
39
+ if assemblingFeature {
40
+ splittedFeature1 := text.split(assemblingFeature, "_TO_")
41
+ splittedFeature2 := text.split(assemblingFeature, ":")
42
+ if assemblingFeature == "CDR3" {
43
+ productiveFeature = "CDR3"
44
+ } else if assemblingFeature == "VDJRegion" {
45
+ productiveFeature = "VDJRegion(0,-1)"
46
+ coreVFeature = "{FR1Begin:FR3End}"
47
+ coreJFeature = "FR4"
48
+ } else if len(splittedFeature1) == 2 {
49
+ if splittedFeature1[1] == "FR4" {
50
+ productiveFeature = splittedFeature1[0] + "_TO_FR4(0,-1)"
51
+ coreVFeature = "{"+splittedFeature1[0]+"Begin:FR3End}"
51
52
  coreJFeature = "FR4"
52
53
  } else {
53
54
  productiveFeature = assemblingFeature
54
- coreVFeature = "{"+splittedFeature[0]+"Begin:FR3End}"
55
+ coreVFeature = "{"+splittedFeature1[0]+"Begin:FR3End}"
55
56
  }
57
+ } else if len(splittedFeature2) == 2 {
58
+ productiveFeature = assemblingFeature
59
+ coreVFeature = splittedFeature2[0]+":FR3End}"
56
60
  }
61
+ } else {
62
+ productiveFeature = "CDR3"
57
63
  }
58
64
  return {
59
65
  productiveFeature: productiveFeature,
@@ -64,6 +70,14 @@ assemblingFeatureInfo := func(assemblingFeature) {
64
70
  }
65
71
  }
66
72
 
73
+ // sometimes we need to format assembling feature to be used in column ids
74
+ formatId := func(input) {
75
+ noNums := text.re_replace(`\(\s*-?\d+(\s*,\s*-?\d+)*\s*\)`, input, "")
76
+ noBraces := text.re_replace(`[{}\(\)]`, noNums, "")
77
+ result := text.re_replace(`:`, noBraces, "-")
78
+ return result
79
+ }
80
+
67
81
  exportSpecOpsFromPreset := func(presetSpecForBack) {
68
82
  assemblingFeature := undefined
69
83
  if !is_undefined(presetSpecForBack.assemblingFeature) {
@@ -302,7 +316,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
302
316
  imputedU := isImputed ? "Imputed" : ""
303
317
  imputedL := text.to_lower(imputedU)
304
318
  for featureU in features {
305
- featureL := text.to_lower(featureU)
319
+ featureL := text.to_lower(formatId(featureU))
306
320
  for isAminoAcid in [true, false] {
307
321
  alphabet := isAminoAcid ? "aminoacid" : "nucleotide"
308
322
  alphabetShort := isAminoAcid ? "aa" : "nt"
package/.test_auth.json DELETED
@@ -1 +0,0 @@
1
- {"conf":{"address":"http://127.0.0.1:6345","test_user":"test-user","test_password":"test-password"},"authInformation":{"jwtToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImxvZ2luIjoidGVzdC11c2VyIn0sImV4cCI6MTc0NjU2MjQ5MywiaWF0IjoxNzQ1OTU3NjkzfQ.ZMQGoZ3Z2SanN_ZOemm_xqZSD7YNnYC561qeU_fU2CA"},"expiration":1746044093000}