@platforma-open/milaboratories.top-antibodies.workflow 2.2.2 → 3.0.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/tengo/lib/utils.lib.tengo +54 -2
- package/dist/tengo/tpl/assembling-fasta.plj.gz +0 -0
- package/dist/tengo/tpl/filter-and-sample.plj.gz +0 -0
- package/dist/tengo/tpl/main.plj.gz +0 -0
- package/package.json +7 -7
- package/src/main.tpl.tengo +3 -3
- package/src/utils.lib.tengo +55 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -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@
|
|
3
|
+
> @platforma-open/milaboratories.top-antibodies.workflow@3.0.0 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
|
@@ -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
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.top-antibodies.workflow",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Block Workflow",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@platforma-sdk/workflow-tengo": "5.
|
|
8
|
-
"@platforma-open/milaboratories.software-anarci": "
|
|
7
|
+
"@platforma-sdk/workflow-tengo": "5.13.1",
|
|
8
|
+
"@platforma-open/milaboratories.software-anarci": "^0.0.3",
|
|
9
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
10
|
"@platforma-open/milaboratories.top-antibodies.umap": "1.2.2",
|
|
13
|
-
"@platforma-open/milaboratories.top-antibodies.
|
|
11
|
+
"@platforma-open/milaboratories.top-antibodies.spectratype": "1.8.2",
|
|
12
|
+
"@platforma-open/milaboratories.top-antibodies.assembling-fasta": "1.3.1",
|
|
13
|
+
"@platforma-open/milaboratories.top-antibodies.anarci-kabat": "1.4.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@platforma-sdk/tengo-builder": "2.5.
|
|
16
|
+
"@platforma-sdk/tengo-builder": "2.5.8"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "shx rm -rf dist && pl-tengo check && pl-tengo build",
|
package/src/main.tpl.tengo
CHANGED
|
@@ -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" },
|
package/src/utils.lib.tengo
CHANGED
|
@@ -338,10 +338,62 @@ initializeCloneTable := func(pframes, columns, args, datasetSpec) {
|
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
//
|
|
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)
|