@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 3.23.2 → 3.23.4
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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/tengo/lib/calculate-export-specs.lib.tengo +30 -6
- package/dist/tengo/tpl/aggregate-by-clonotype-key.plj.gz +0 -0
- package/dist/tengo/tpl/calculate-preset-info.plj.gz +0 -0
- package/dist/tengo/tpl/export-report.plj.gz +0 -0
- package/dist/tengo/tpl/list-presets.plj.gz +0 -0
- package/dist/tengo/tpl/main.plj.gz +0 -0
- package/dist/tengo/tpl/mixcr-analyze.plj.gz +0 -0
- package/dist/tengo/tpl/mixcr-export.plj.gz +0 -0
- package/dist/tengo/tpl/prerun.plj.gz +0 -0
- package/dist/tengo/tpl/process-single-cell.plj.gz +0 -0
- package/dist/tengo/tpl/process.plj.gz +0 -0
- package/dist/tengo/tpl/test.columns-calculate.plj.gz +0 -0
- package/dist/tengo/tpl/test.columns.test.plj.gz +0 -0
- package/package.json +2 -2
- package/src/calculate-export-specs.lib.tengo +30 -6
- package/src/mixcr-export.tpl.tengo +21 -1
- package/src/test/columns.test.ts +10 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -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@3.23.
|
|
3
|
+
> @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@3.23.4 build /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
|
|
4
4
|
> shx rm -rf dist && pl-tengo check && pl-tengo build
|
|
5
5
|
|
|
6
6
|
info: Skipping unknown file type: test/columns.test.ts
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @platforma-open/milaboratories.mixcr-clonotyping.workflow
|
|
2
2
|
|
|
3
|
+
## 3.23.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9c08972: Update RNA-seq preset
|
|
8
|
+
|
|
9
|
+
## 3.23.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 81cea8f: Use topChains (intersection of best V/J/C hits) to enforce exclusivity when analyzing TRA or TRD
|
|
14
|
+
|
|
3
15
|
## 3.23.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -133,6 +133,7 @@ calculateExportSpecs := func(presetSpecForBack, sampleIdAxisSpec, blockId, expor
|
|
|
133
133
|
ops := exportSpecOpsFromPreset(presetSpecForBack)
|
|
134
134
|
|
|
135
135
|
assemblingFeature := ops.assemblingFeature
|
|
136
|
+
isRnaSeqPreset := is_undefined(assemblingFeature)
|
|
136
137
|
cellTags := ops.cellTags
|
|
137
138
|
hasUmi := ops.hasUmi
|
|
138
139
|
splitByC := ops.splitByC
|
|
@@ -175,12 +176,35 @@ calculateExportSpecs := func(presetSpecForBack, sampleIdAxisSpec, blockId, expor
|
|
|
175
176
|
clonotypeKeyArgs := undefined
|
|
176
177
|
|
|
177
178
|
if !is_undefined(assemblingFeature) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
if isRnaSeqPreset {
|
|
180
|
+
clonotypeKeyColumns = [
|
|
181
|
+
"nSeqFR1",
|
|
182
|
+
"nSeqCDR1",
|
|
183
|
+
"nSeqFR2",
|
|
184
|
+
"nSeqCDR2",
|
|
185
|
+
"nSeqFR3",
|
|
186
|
+
"nSeqCDR3",
|
|
187
|
+
"bestVGene",
|
|
188
|
+
"bestJGene"
|
|
189
|
+
]
|
|
190
|
+
clonotypeKeyArgs = [
|
|
191
|
+
[ "-nFeature", "FR1" ],
|
|
192
|
+
[ "-nFeature", "CDR1" ],
|
|
193
|
+
[ "-nFeature", "FR2" ],
|
|
194
|
+
[ "-nFeature", "CDR2" ],
|
|
195
|
+
[ "-nFeature", "FR3" ],
|
|
196
|
+
[ "-nFeature", "CDR3" ],
|
|
197
|
+
[ "-vGene" ],
|
|
198
|
+
[ "-jGene" ]
|
|
199
|
+
]
|
|
200
|
+
} else {
|
|
201
|
+
clonotypeKeyColumns = ["nSeq" + assemblingFeature, "bestVGene", "bestJGene"]
|
|
202
|
+
clonotypeKeyArgs = [
|
|
203
|
+
[ "-nFeature", assemblingFeature ],
|
|
204
|
+
[ "-vGene" ],
|
|
205
|
+
[ "-jGene" ]
|
|
206
|
+
]
|
|
207
|
+
}
|
|
184
208
|
if splitByC {
|
|
185
209
|
clonotypeKeyColumns += ["bestCHit"]
|
|
186
210
|
clonotypeKeyArgs += [ [ "-cHit" ] ]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.mixcr-clonotyping-2.workflow",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.4",
|
|
4
4
|
"description": "Tengo-based template",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@platforma-sdk/workflow-tengo": "5.8.2",
|
|
7
7
|
"@platforma-open/milaboratories.software-mixcr": "4.7.0-302-develop"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@platforma-sdk/tengo-builder": "2.4.
|
|
10
|
+
"@platforma-sdk/tengo-builder": "2.4.18"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "shx rm -rf dist && pl-tengo check && pl-tengo build",
|
|
@@ -133,6 +133,7 @@ calculateExportSpecs := func(presetSpecForBack, sampleIdAxisSpec, blockId, expor
|
|
|
133
133
|
ops := exportSpecOpsFromPreset(presetSpecForBack)
|
|
134
134
|
|
|
135
135
|
assemblingFeature := ops.assemblingFeature
|
|
136
|
+
isRnaSeqPreset := is_undefined(assemblingFeature)
|
|
136
137
|
cellTags := ops.cellTags
|
|
137
138
|
hasUmi := ops.hasUmi
|
|
138
139
|
splitByC := ops.splitByC
|
|
@@ -175,12 +176,35 @@ calculateExportSpecs := func(presetSpecForBack, sampleIdAxisSpec, blockId, expor
|
|
|
175
176
|
clonotypeKeyArgs := undefined
|
|
176
177
|
|
|
177
178
|
if !is_undefined(assemblingFeature) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
if isRnaSeqPreset {
|
|
180
|
+
clonotypeKeyColumns = [
|
|
181
|
+
"nSeqFR1",
|
|
182
|
+
"nSeqCDR1",
|
|
183
|
+
"nSeqFR2",
|
|
184
|
+
"nSeqCDR2",
|
|
185
|
+
"nSeqFR3",
|
|
186
|
+
"nSeqCDR3",
|
|
187
|
+
"bestVGene",
|
|
188
|
+
"bestJGene"
|
|
189
|
+
]
|
|
190
|
+
clonotypeKeyArgs = [
|
|
191
|
+
[ "-nFeature", "FR1" ],
|
|
192
|
+
[ "-nFeature", "CDR1" ],
|
|
193
|
+
[ "-nFeature", "FR2" ],
|
|
194
|
+
[ "-nFeature", "CDR2" ],
|
|
195
|
+
[ "-nFeature", "FR3" ],
|
|
196
|
+
[ "-nFeature", "CDR3" ],
|
|
197
|
+
[ "-vGene" ],
|
|
198
|
+
[ "-jGene" ]
|
|
199
|
+
]
|
|
200
|
+
} else {
|
|
201
|
+
clonotypeKeyColumns = ["nSeq" + assemblingFeature, "bestVGene", "bestJGene"]
|
|
202
|
+
clonotypeKeyArgs = [
|
|
203
|
+
[ "-nFeature", assemblingFeature ],
|
|
204
|
+
[ "-vGene" ],
|
|
205
|
+
[ "-jGene" ]
|
|
206
|
+
]
|
|
207
|
+
}
|
|
184
208
|
if splitByC {
|
|
185
209
|
clonotypeKeyColumns += ["bestCHit"]
|
|
186
210
|
clonotypeKeyArgs += [ [ "-cHit" ] ]
|
|
@@ -159,6 +159,15 @@ self.body(func(inputs) {
|
|
|
159
159
|
stopCodonTypes: stopCodonTypes,
|
|
160
160
|
stopCodonReplacements: stopCodonReplacements
|
|
161
161
|
})
|
|
162
|
+
|
|
163
|
+
// Filter for exclusive TRA/TRD chain assignment.
|
|
164
|
+
// MiXCR --chains filter is permissive (any V/J/C gene locus match),
|
|
165
|
+
// so clonotypes with shared TRDV genes pass both --chains TRA and --chains TRD.
|
|
166
|
+
// Use topChains (intersection of best V/J/C hits) to enforce exclusivity.
|
|
167
|
+
if chains == "TRA" || chains == "TRD" {
|
|
168
|
+
dfMain = dfMain.filter(pt.col("topChains").eq(chains))
|
|
169
|
+
}
|
|
170
|
+
|
|
162
171
|
dfMain.addColumns(
|
|
163
172
|
hashKeyDerivationExpressionPt(clonotypeKeyColumns).alias("clonotypeKey")
|
|
164
173
|
)
|
|
@@ -177,7 +186,12 @@ self.body(func(inputs) {
|
|
|
177
186
|
arg("--split-by-tags").arg("Cell").
|
|
178
187
|
arg("-tags").arg("Cell")
|
|
179
188
|
|
|
180
|
-
|
|
189
|
+
scExportArgs := clonotypeKeyArgs + mainIsProductiveArgs + mainAbundanceColumnUnnormalizedArgs
|
|
190
|
+
// Add -topChains for TRA/TRD filtering (shared TRAD locus)
|
|
191
|
+
if chains == "TRA" || chains == "TRD" {
|
|
192
|
+
scExportArgs = scExportArgs + [[ "-topChains" ]]
|
|
193
|
+
}
|
|
194
|
+
for argGrp in scExportArgs {
|
|
181
195
|
for arg in argGrp {
|
|
182
196
|
mixcrCmdBuilder.arg(arg)
|
|
183
197
|
}
|
|
@@ -236,6 +250,12 @@ self.body(func(inputs) {
|
|
|
236
250
|
return allowed
|
|
237
251
|
}()
|
|
238
252
|
})
|
|
253
|
+
|
|
254
|
+
// Filter for exclusive TRA/TRD chain assignment (same as bulk path)
|
|
255
|
+
if chains == "TRA" || chains == "TRD" {
|
|
256
|
+
dfSingleCell = dfSingleCell.filter(pt.col("topChains").eq(chains))
|
|
257
|
+
}
|
|
258
|
+
|
|
239
259
|
dfSingleCell.addColumns(
|
|
240
260
|
hashKeyDerivationExpressionPt(clonotypeKeyColumns).alias("clonotypeKey"),
|
|
241
261
|
hashCellKey ? hashKeyDerivationExpressionPt(cellTagColumns).alias("cellKey") : pt.col(cellTagColumns[0]).alias("cellKey")
|
package/src/test/columns.test.ts
CHANGED
|
@@ -111,6 +111,16 @@ const testCases: TestCase[] = [
|
|
|
111
111
|
expect(config.columnsSpec.find((c: any) => c.column === 'readFraction')).toBeDefined();
|
|
112
112
|
expect(config.columnsSpec.find((c: any) => c.column === 'nSeqCDR3')).toBeDefined();
|
|
113
113
|
expect(config.columnsSpec.find((c: any) => c.column === 'aaSeqCDR3')).toBeDefined();
|
|
114
|
+
expect(config.clonotypeKeyColumns).toEqual([
|
|
115
|
+
'nSeqFR1',
|
|
116
|
+
'nSeqCDR1',
|
|
117
|
+
'nSeqFR2',
|
|
118
|
+
'nSeqCDR2',
|
|
119
|
+
'nSeqFR3',
|
|
120
|
+
'nSeqCDR3',
|
|
121
|
+
'bestVGene',
|
|
122
|
+
'bestJGene'
|
|
123
|
+
]);
|
|
114
124
|
}
|
|
115
125
|
},
|
|
116
126
|
{
|