@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 2.0.1 → 2.1.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,5 +1,5 @@
1
1
 
2
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.0.1 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
2
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.1.0 build /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
3
  > rm -rf dist && pl-tengo check && pl-tengo build
4
4
 
5
5
  Processing "src/aggregate-by-clonotype-key.tpl.tengo"...
@@ -1,20 +1,20 @@
1
1
 
2
- > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.0.1 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
2
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@2.1.0 test /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
3
3
  > vitest
4
4
 
5
5
 
6
6
   RUN  v2.1.8 /home/runner/work/mixcr-clonotyping-2/mixcr-clonotyping-2/workflow
7
7
 
8
- ✓ src/test/columns.test.ts (6 tests) 47946ms
9
- ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 11920ms
10
- ✓ checking preset for '10x-sc-xcr-vdj' 7407ms
11
- ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 7323ms
12
- ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 7314ms
13
- ✓ checking preset for 'rna-seq' 6897ms
14
- ✓ checking preset for 'generic-single-cell-gex' 7083ms
8
+ ✓ src/test/columns.test.ts (6 tests) 48155ms
9
+ ✓ checking preset for 'milab-human-dna-xcr-7genes-multiplex' 11939ms
10
+ ✓ checking preset for '10x-sc-xcr-vdj' 7604ms
11
+ ✓ checking preset for 'cellecta-human-rna-xcr-umi-drivermap-…' 7330ms
12
+ ✓ checking preset for 'takara-human-rna-bcr-umi-smartseq' 7316ms
13
+ ✓ checking preset for 'rna-seq' 6894ms
14
+ ✓ checking preset for 'generic-single-cell-gex' 7071ms
15
15
 
16
16
   Test Files  1 passed (1)
17
17
   Tests  6 passed (6)
18
-  Start at  11:38:19
19
-  Duration  48.72s (transform 43ms, setup 0ms, collect 544ms, tests 47.95s, environment 0ms, prepare 72ms)
18
+  Start at  20:11:15
19
+  Duration  48.92s (transform 45ms, setup 0ms, collect 537ms, tests 48.16s, environment 0ms, prepare 61ms)
20
20
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @platforma-open/milaboratories.mixcr-clonotyping.workflow
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a168fe3: pl7.app/abundance/isPrimary and pl7.app/isAnchor annotations added to the output columns
8
+
3
9
  ## 2.0.1
4
10
 
5
11
  ### Patch Changes
@@ -118,6 +118,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
118
118
  "pl7.app/isAbundance": "true",
119
119
  "pl7.app/abundance/unit": "reads",
120
120
  "pl7.app/abundance/normalized": "false",
121
+ "pl7.app/abundance/isPrimary": string(!hasUmi),
121
122
  "pl7.app/label": "Number Of Reads"
122
123
  })
123
124
  }
@@ -134,6 +135,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
134
135
  "pl7.app/isAbundance": "true",
135
136
  "pl7.app/abundance/unit": "reads",
136
137
  "pl7.app/abundance/normalized": "true",
138
+ "pl7.app/abundance/isPrimary": string(!hasUmi),
137
139
  "pl7.app/label": "Fraction of reads"
138
140
  })
139
141
  }
@@ -157,6 +159,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
157
159
  "pl7.app/isAbundance": "true",
158
160
  "pl7.app/abundance/unit": "molecules",
159
161
  "pl7.app/abundance/normalized": "false",
162
+ "pl7.app/abundance/isPrimary": "true",
160
163
  "pl7.app/label": "Number of UMI"
161
164
  })
162
165
  }
@@ -173,6 +176,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
173
176
  "pl7.app/isAbundance": "true",
174
177
  "pl7.app/abundance/unit": "molecules",
175
178
  "pl7.app/abundance/normalized": "true",
179
+ "pl7.app/abundance/isPrimary": "true",
176
180
  "pl7.app/label": "Fraction of UMI"
177
181
  })
178
182
  }
@@ -229,13 +233,19 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
229
233
 
230
234
 
231
235
 
236
+
237
+ anchorFeature := undefined;
238
+
232
239
  features := undefined
233
240
  if is_undefined(assemblingFeature) {
234
241
  features = ["CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
242
+ anchorFeature = "CDR3"
235
243
  } else if assemblingFeature != "CDR3" {
236
244
  features = [assemblingFeature, "CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
245
+ anchorFeature = assemblingFeature
237
246
  } else {
238
247
  features = ["CDR3"]
248
+ anchorFeature = "CDR3"
239
249
  }
240
250
 
241
251
  for isImputed in ( is_undefined(assemblingFeature) ? [false, true] : [false] ) {
@@ -248,6 +258,13 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
248
258
  alphabetShort := isAminoAcid ? "aa" : "nt"
249
259
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
250
260
  visibility := (featureU == "CDR3") || (featureU == assemblingFeature)
261
+ annotations := {
262
+ "pl7.app/vdj/imputed": string(isImputed),
263
+ "pl7.app/label": featureU + " " + alphabetShort
264
+ }
265
+ if featureU == anchorFeature && !isImputed && !isAminoAcid {
266
+ annotations["pl7.app/isAnchor"] = "true"
267
+ }
251
268
  columnsSpecPerClonotype += [ {
252
269
  column: alphabetShortMixcr + "Seq" + imputedU + featureU,
253
270
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
@@ -259,10 +276,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
259
276
  "pl7.app/vdj/feature": featureU,
260
277
  "pl7.app/alphabet": alphabet
261
278
  },
262
- annotations: a(orderP, visibility, {
263
- "pl7.app/vdj/imputed": string(isImputed),
264
- "pl7.app/label": featureU + " " + alphabetShort
265
- })
279
+ annotations: a(orderP, visibility, annotations)
266
280
  }
267
281
  } ]
268
282
  exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
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.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
6
  "@platforma-open/milaboratories.mixcr-clonotyping-2.sc-clonotype-builder": "1.0.1"
@@ -118,6 +118,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
118
118
  "pl7.app/isAbundance": "true",
119
119
  "pl7.app/abundance/unit": "reads",
120
120
  "pl7.app/abundance/normalized": "false",
121
+ "pl7.app/abundance/isPrimary": string(!hasUmi),
121
122
  "pl7.app/label": "Number Of Reads"
122
123
  })
123
124
  }
@@ -134,6 +135,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
134
135
  "pl7.app/isAbundance": "true",
135
136
  "pl7.app/abundance/unit": "reads",
136
137
  "pl7.app/abundance/normalized": "true",
138
+ "pl7.app/abundance/isPrimary": string(!hasUmi),
137
139
  "pl7.app/label": "Fraction of reads"
138
140
  })
139
141
  }
@@ -157,6 +159,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
157
159
  "pl7.app/isAbundance": "true",
158
160
  "pl7.app/abundance/unit": "molecules",
159
161
  "pl7.app/abundance/normalized": "false",
162
+ "pl7.app/abundance/isPrimary": "true",
160
163
  "pl7.app/label": "Number of UMI"
161
164
  })
162
165
  }
@@ -173,6 +176,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
173
176
  "pl7.app/isAbundance": "true",
174
177
  "pl7.app/abundance/unit": "molecules",
175
178
  "pl7.app/abundance/normalized": "true",
179
+ "pl7.app/abundance/isPrimary": "true",
176
180
  "pl7.app/label": "Fraction of UMI"
177
181
  })
178
182
  }
@@ -229,13 +233,19 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
229
233
 
230
234
  // Sequences
231
235
 
236
+ // column with nucleotide sequence of this feature will be marked as anchor
237
+ anchorFeature := undefined;
238
+
232
239
  features := undefined
233
240
  if is_undefined(assemblingFeature) {
234
241
  features = ["CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
242
+ anchorFeature = "CDR3"
235
243
  } else if assemblingFeature != "CDR3" {
236
244
  features = [assemblingFeature, "CDR1", "FR1", "FR2", "CDR2", "FR3", "CDR3", "FR4"]
245
+ anchorFeature = assemblingFeature
237
246
  } else {
238
247
  features = ["CDR3"]
248
+ anchorFeature = "CDR3"
239
249
  }
240
250
 
241
251
  for isImputed in ( is_undefined(assemblingFeature) ? [false, true] : [false] ) {
@@ -248,6 +258,13 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
248
258
  alphabetShort := isAminoAcid ? "aa" : "nt"
249
259
  alphabetShortMixcr := isAminoAcid ? "aa" : "n"
250
260
  visibility := (featureU == "CDR3") || (featureU == assemblingFeature)
261
+ annotations := {
262
+ "pl7.app/vdj/imputed": string(isImputed),
263
+ "pl7.app/label": featureU + " " + alphabetShort
264
+ }
265
+ if featureU == anchorFeature && !isImputed && !isAminoAcid {
266
+ annotations["pl7.app/isAnchor"] = "true"
267
+ }
251
268
  columnsSpecPerClonotype += [ {
252
269
  column: alphabetShortMixcr + "Seq" + imputedU + featureU,
253
270
  id: alphabetShortMixcr + "-seq-" + featureL + (isImputed ? "-imputed" : ""),
@@ -259,10 +276,7 @@ calculateExportSpecs := func(presetSpecForBack, blockId) {
259
276
  "pl7.app/vdj/feature": featureU,
260
277
  "pl7.app/alphabet": alphabet
261
278
  },
262
- annotations: a(orderP, visibility, {
263
- "pl7.app/vdj/imputed": string(isImputed),
264
- "pl7.app/label": featureU + " " + alphabetShort
265
- })
279
+ annotations: a(orderP, visibility, annotations)
266
280
  }
267
281
  } ]
268
282
  exportArgs += [ [ "-" + alphabetShortMixcr + "Feature" + imputedU, featureU ] ]
@@ -20,7 +20,7 @@ processTpl := assets.importTemplate(":process")
20
20
  wf.setPreRun(assets.importTemplate(":prerun"))
21
21
 
22
22
  wf.prepare(func(args){
23
- return{
23
+ return {
24
24
  resolvedLibraryInput: wf.resolve(args.inputLibrary, { errIfMissing: false })
25
25
  }
26
26
  })
@@ -94,6 +94,9 @@ wf.body(func(args) {
94
94
 
95
95
  // calculating chains
96
96
  chains := ["IGHeavy", "IGLight", "TRA", "TRB", "TRD", "TRG"]
97
+ if !is_undefined(args.chains) {
98
+ chains = args.chains
99
+ }
97
100
 
98
101
  runMixcr := render.createEphemeral(processTpl, {
99
102
  inputSpec: input.getFutureInputField("spec"),
@@ -23,6 +23,7 @@ self.body(func(inputs) {
23
23
  // Exporting clones from clns file
24
24
 
25
25
  mixcrCmdBuilder := exec.builder().
26
+ inMediumQueue().
26
27
  printErrStreamToStdout().
27
28
  software(mixcrSw).
28
29
  secret("MI_LICENSE", "MI_LICENSE").
@@ -214,6 +214,7 @@ self.body(func(inputs) {
214
214
  name: "pl7.app/sequencing/readIndex",
215
215
  optional: true
216
216
  }],
217
+
217
218
  // resulting aggregation axes names will be checked against supported combinations
218
219
  // in the body template
219
220
  passAggregationAxesNames: true,