@platforma-open/milaboratories.mixcr-clonotyping-2.workflow 3.23.1 → 3.23.3

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@3.23.1 build /home/runner/work/mixcr-clonotyping/mixcr-clonotyping/workflow
3
+ > @platforma-open/milaboratories.mixcr-clonotyping-2.workflow@3.23.3 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.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 81cea8f: Use topChains (intersection of best V/J/C hits) to enforce exclusivity when analyzing TRA or TRD
8
+
9
+ ## 3.23.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 40ec375: Upgrade MiXCR to 4.7.0-302-develop
14
+
3
15
  ## 3.23.1
4
16
 
5
17
  ### Patch Changes
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.1",
3
+ "version": "3.23.3",
4
4
  "description": "Tengo-based template",
5
5
  "dependencies": {
6
6
  "@platforma-sdk/workflow-tengo": "5.8.2",
7
- "@platforma-open/milaboratories.software-mixcr": "4.7.0-300-develop"
7
+ "@platforma-open/milaboratories.software-mixcr": "4.7.0-302-develop"
8
8
  },
9
9
  "devDependencies": {
10
- "@platforma-sdk/tengo-builder": "2.4.17"
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",
@@ -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
- for argGrp in (clonotypeKeyArgs + mainIsProductiveArgs + mainAbundanceColumnUnnormalizedArgs) {
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")