@platforma-open/milaboratories.top-antibodies.workflow 2.2.2 → 3.0.1

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/antibody-tcr-lead-selection/antibody-tcr-lead-selection/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.top-antibodies.workflow@2.2.2 build /home/runner/work/antibody-tcr-lead-selection/antibody-tcr-lead-selection/workflow
3
+ > @platforma-open/milaboratories.top-antibodies.workflow@3.0.1 build /home/runner/work/antibody-tcr-lead-selection/antibody-tcr-lead-selection/workflow
4
4
  > shx rm -rf dist && pl-tengo check && pl-tengo build
5
5
 
6
6
  Processing "src/assembling-fasta.tpl.tengo"...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @platforma-open/milaboratories.top-antibodies.workflow
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3e9c9ef: bump sdk for fix table query
8
+ - Updated dependencies [3e9c9ef]
9
+ - @platforma-open/milaboratories.top-antibodies.anarci-kabat@1.4.3
10
+ - @platforma-open/milaboratories.top-antibodies.assembling-fasta@1.3.2
11
+ - @platforma-open/milaboratories.top-antibodies.sample-clonotypes@2.1.2
12
+ - @platforma-open/milaboratories.top-antibodies.spectratype@1.8.3
13
+ - @platforma-open/milaboratories.top-antibodies.umap@1.2.3
14
+
15
+ ## 3.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - c2c2b06: VDJ Integration support, BlockV3 api migration
20
+
3
21
  ## 2.2.2
4
22
 
5
23
  ### Patch Changes
@@ -339,9 +339,61 @@ initializeCloneTable := func(pframes, columns, args, datasetSpec) {
339
339
  }
340
340
 
341
341
 
342
+
343
+ usedNonMainAxes := {}
344
+ for i, filter in args.filters {
345
+ if filter.value != undefined {
346
+ colSpec := columns.getColumn(filter.value.column)
347
+ if !is_undefined(colSpec) && !is_undefined(colSpec.spec) {
348
+ for ax in colSpec.spec.axesSpec {
349
+ if ax.name != datasetSpec.axesSpec[1].name {
350
+ usedNonMainAxes[ax.name] = true
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ for i, col in args.rankingOrder {
357
+ if col.value != undefined && col.value.column != "pl7.app/vdj/inVivoScore" {
358
+ colSpec := columns.getColumn(col.value.column)
359
+ if !is_undefined(colSpec) && !is_undefined(colSpec.spec) {
360
+ for ax in colSpec.spec.axesSpec {
361
+ if ax.name != datasetSpec.axesSpec[1].name {
362
+ usedNonMainAxes[ax.name] = true
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+
369
+ if !is_undefined(args.diversificationColumn) {
370
+ selectedLinkerSpec := columns.getSpec(args.diversificationColumn)
371
+ if !is_undefined(selectedLinkerSpec) {
372
+ for ax in selectedLinkerSpec.axesSpec {
373
+ if ax.name != datasetSpec.axesSpec[1].name {
374
+ usedNonMainAxes[ax.name] = true
375
+ }
376
+ }
377
+ }
378
+ }
379
+
380
+
342
381
  linkerClusterIdAxesWithIdx := []
343
-
382
+
344
383
  for linkerIdx, col in sortedLinkers {
384
+
385
+ otherAxis := undefined
386
+ if datasetSpec.axesSpec[1].name == col.spec.axesSpec[1].name {
387
+ otherAxis = col.spec.axesSpec[0]
388
+ } else if datasetSpec.axesSpec[1].name == col.spec.axesSpec[0].name {
389
+ otherAxis = col.spec.axesSpec[1]
390
+ }
391
+
392
+
393
+ if is_undefined(otherAxis) || is_undefined(usedNonMainAxes[otherAxis.name]) {
394
+ continue
395
+ }
396
+
345
397
  clusterIdAxis := undefined
346
398
  if datasetSpec.axesSpec[1].name == col.spec.axesSpec[1].name {
347
399
 
@@ -421,7 +473,7 @@ initializeCloneTable := func(pframes, columns, args, datasetSpec) {
421
473
  if addedCols {
422
474
  cloneTable.mem("16GiB")
423
475
  cloneTable.cpu(1)
424
- builtTable = cloneTable.build()
476
+ builtTable = cloneTable.build({joinType: "Inner"})
425
477
 
426
478
 
427
479
  clusterColumnHeader = resolveClusterColumnHeader(args, columns, sortedLinkers)
Binary file
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.top-antibodies.workflow",
3
- "version": "2.2.2",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "description": "Block Workflow",
6
6
  "dependencies": {
7
- "@platforma-sdk/workflow-tengo": "5.11.0",
8
- "@platforma-open/milaboratories.software-anarci": "1.0.1",
9
- "@platforma-open/milaboratories.top-antibodies.sample-clonotypes": "2.1.1",
10
- "@platforma-open/milaboratories.top-antibodies.spectratype": "1.8.2",
11
- "@platforma-open/milaboratories.top-antibodies.anarci-kabat": "1.4.2",
12
- "@platforma-open/milaboratories.top-antibodies.umap": "1.2.2",
13
- "@platforma-open/milaboratories.top-antibodies.assembling-fasta": "1.3.1"
7
+ "@platforma-sdk/workflow-tengo": "5.16.0",
8
+ "@platforma-open/milaboratories.software-anarci": "^0.0.3",
9
+ "@platforma-open/milaboratories.top-antibodies.spectratype": "1.8.3",
10
+ "@platforma-open/milaboratories.top-antibodies.sample-clonotypes": "2.1.2",
11
+ "@platforma-open/milaboratories.top-antibodies.umap": "1.2.3",
12
+ "@platforma-open/milaboratories.top-antibodies.assembling-fasta": "1.3.2",
13
+ "@platforma-open/milaboratories.top-antibodies.anarci-kabat": "1.4.3"
14
14
  },
15
15
  "devDependencies": {
16
- "@platforma-sdk/tengo-builder": "2.5.2"
16
+ "@platforma-sdk/tengo-builder": "2.5.17"
17
17
  },
18
18
  "scripts": {
19
19
  "build": "shx rm -rf dist && pl-tengo check && pl-tengo build",
@@ -45,7 +45,6 @@ wf.prepare(func(args){
45
45
  validRanks = true
46
46
  continue
47
47
  }
48
- bundleBuilder.addAnchor(col.value.anchorName, col.value.anchorRef)
49
48
  bundleBuilder.addSingle(col.value.column)
50
49
  validRanks = true
51
50
  }
@@ -56,14 +55,15 @@ wf.prepare(func(args){
56
55
  if len(args.filters) > 0 {
57
56
  for filter in args.filters {
58
57
  if filter.value != undefined {
59
- bundleBuilder.addAnchor(filter.value.anchorName, filter.value.anchorRef)
60
58
  bundleBuilder.addSingle(filter.value.column)
61
59
  }
62
60
  }
63
61
  }
64
62
 
65
63
 
66
- // Add linker columns
64
+ // Add linker columns — always fetch them for metadata,
65
+ // but initializeCloneTable only adds linkers to the join when needed
66
+ // by filter/ranking columns or diversification.
67
67
  bundleBuilder.addMulti({
68
68
  axes: [{ anchor: "main", idx: 1 }], // this will do partial axes match (unlike in the model)
69
69
  annotations: { "pl7.app/isLinkerColumn": "true" },
@@ -338,10 +338,62 @@ initializeCloneTable := func(pframes, columns, args, datasetSpec) {
338
338
  }
339
339
  }
340
340
 
341
- // Get linker columns and add them to the table
341
+ // Collect axes used by filter/ranking columns (excluding clonotypeKey)
342
+ // to determine which linkers are actually needed
343
+ usedNonMainAxes := {}
344
+ for i, filter in args.filters {
345
+ if filter.value != undefined {
346
+ colSpec := columns.getColumn(filter.value.column)
347
+ if !is_undefined(colSpec) && !is_undefined(colSpec.spec) {
348
+ for ax in colSpec.spec.axesSpec {
349
+ if ax.name != datasetSpec.axesSpec[1].name {
350
+ usedNonMainAxes[ax.name] = true
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ for i, col in args.rankingOrder {
357
+ if col.value != undefined && col.value.column != "pl7.app/vdj/inVivoScore" {
358
+ colSpec := columns.getColumn(col.value.column)
359
+ if !is_undefined(colSpec) && !is_undefined(colSpec.spec) {
360
+ for ax in colSpec.spec.axesSpec {
361
+ if ax.name != datasetSpec.axesSpec[1].name {
362
+ usedNonMainAxes[ax.name] = true
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ // Diversification also needs its linker
369
+ if !is_undefined(args.diversificationColumn) {
370
+ selectedLinkerSpec := columns.getSpec(args.diversificationColumn)
371
+ if !is_undefined(selectedLinkerSpec) {
372
+ for ax in selectedLinkerSpec.axesSpec {
373
+ if ax.name != datasetSpec.axesSpec[1].name {
374
+ usedNonMainAxes[ax.name] = true
375
+ }
376
+ }
377
+ }
378
+ }
379
+
380
+ // Get linker columns — only add to clone table if their non-main axis is used
342
381
  linkerClusterIdAxesWithIdx := []
343
-
382
+
344
383
  for linkerIdx, col in sortedLinkers {
384
+ // Determine the linker's non-clonotypeKey axis
385
+ otherAxis := undefined
386
+ if datasetSpec.axesSpec[1].name == col.spec.axesSpec[1].name {
387
+ otherAxis = col.spec.axesSpec[0]
388
+ } else if datasetSpec.axesSpec[1].name == col.spec.axesSpec[0].name {
389
+ otherAxis = col.spec.axesSpec[1]
390
+ }
391
+
392
+ // Skip this linker if its non-main axis is not used by any filter/ranking/diversification
393
+ if is_undefined(otherAxis) || is_undefined(usedNonMainAxes[otherAxis.name]) {
394
+ continue
395
+ }
396
+
345
397
  clusterIdAxis := undefined
346
398
  if datasetSpec.axesSpec[1].name == col.spec.axesSpec[1].name {
347
399
  // clonotypeKey is in second axis
@@ -421,7 +473,7 @@ initializeCloneTable := func(pframes, columns, args, datasetSpec) {
421
473
  if addedCols {
422
474
  cloneTable.mem("16GiB")
423
475
  cloneTable.cpu(1)
424
- builtTable = cloneTable.build()
476
+ builtTable = cloneTable.build({joinType: "Inner"})
425
477
 
426
478
  // Resolve diversificationColumn ref to header name
427
479
  clusterColumnHeader = resolveClusterColumnHeader(args, columns, sortedLinkers)