@platforma-open/milaboratories.top-antibodies.workflow 1.14.1 → 1.15.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/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/dist/tengo/tpl/prerun.plj.gz +0 -0
- package/package.json +6 -6
- package/src/prerun.tpl.tengo +73 -8
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@1.
|
|
3
|
+
> @platforma-open/milaboratories.top-antibodies.workflow@1.15.0 build /home/runner/work/antibody-tcr-lead-selection/antibody-tcr-lead-selection/workflow
|
|
4
4
|
> rm -rf dist && pl-tengo check && pl-tengo build
|
|
5
5
|
|
|
6
6
|
Processing "src/assembling-fasta.tpl.tengo"...
|
package/CHANGELOG.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.top-antibodies.workflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Block Workflow",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@platforma-sdk/workflow-tengo": "^5.6.
|
|
7
|
+
"@platforma-sdk/workflow-tengo": "^5.6.6",
|
|
8
8
|
"@platforma-open/milaboratories.software-anarci": "^0.0.3",
|
|
9
9
|
"@platforma-open/milaboratories.top-antibodies.sample-clonotypes": "1.7.1",
|
|
10
10
|
"@platforma-open/milaboratories.top-antibodies.umap": "1.2.1",
|
|
11
|
-
"@platforma-open/milaboratories.top-antibodies.
|
|
11
|
+
"@platforma-open/milaboratories.top-antibodies.spectratype": "1.7.1",
|
|
12
12
|
"@platforma-open/milaboratories.top-antibodies.assembling-fasta": "1.2.1",
|
|
13
|
-
"@platforma-open/milaboratories.top-antibodies.
|
|
13
|
+
"@platforma-open/milaboratories.top-antibodies.anarci-kabat": "1.2.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@platforma-sdk/tengo-builder": "^2.
|
|
17
|
-
"@platforma-sdk/test": "^1.
|
|
16
|
+
"@platforma-sdk/tengo-builder": "^2.4.0",
|
|
17
|
+
"@platforma-sdk/test": "^1.47.3",
|
|
18
18
|
"vitest": "^2.1.8"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
package/src/prerun.tpl.tengo
CHANGED
|
@@ -210,31 +210,96 @@ wf.body(func(args) {
|
|
|
210
210
|
|
|
211
211
|
// Get linker columns if needed
|
|
212
212
|
linkerAxisSpec := {}
|
|
213
|
+
linkerClusterIdAxes := []
|
|
213
214
|
if len(columns.getColumns("linkers")) > 0 {
|
|
214
215
|
for i, col in columns.getColumns("linkers") {
|
|
216
|
+
clusterIdAxis := undefined
|
|
215
217
|
if datasetSpec.axesSpec[1].name == col.spec.axesSpec[1].name {
|
|
216
218
|
cloneTable.add(col, {header: "linker." + string(i)})
|
|
217
219
|
cloneTable.setAxisHeader(col.spec.axesSpec[0], "cluster_" + string(i))
|
|
218
220
|
linkerAxisSpec["cluster_" + string(i)] = col.spec.axesSpec[0]
|
|
221
|
+
clusterIdAxis = col.spec.axesSpec[0]
|
|
219
222
|
} else if datasetSpec.axesSpec[1].name == col.spec.axesSpec[0].name {
|
|
220
223
|
cloneTable.add(col, {header: "linker." + string(i)})
|
|
221
224
|
cloneTable.setAxisHeader(col.spec.axesSpec[1], "cluster_" + string(i))
|
|
222
225
|
linkerAxisSpec["cluster_" + string(i)] = col.spec.axesSpec[1]
|
|
226
|
+
clusterIdAxis = col.spec.axesSpec[1]
|
|
227
|
+
}
|
|
228
|
+
// Collect clusterId axes from linker columns to match cluster size columns
|
|
229
|
+
if !is_undefined(clusterIdAxis) && clusterIdAxis.name == "pl7.app/vdj/clusterId" {
|
|
230
|
+
linkerClusterIdAxes = append(linkerClusterIdAxes, clusterIdAxis)
|
|
223
231
|
}
|
|
224
232
|
addedCols = true
|
|
225
233
|
}
|
|
226
234
|
}
|
|
227
235
|
|
|
228
|
-
// Add cluster size columns if available
|
|
236
|
+
// Add cluster size columns if available, but only those matching linker columns' clusterId axes
|
|
237
|
+
// This ensures we only join columns from the same clustering run
|
|
229
238
|
if len(columns.getColumns("clusterSizes")) > 0 {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
for
|
|
235
|
-
if axis.name
|
|
236
|
-
|
|
239
|
+
clusterSizeIdx := 0
|
|
240
|
+
for col in columns.getColumns("clusterSizes") {
|
|
241
|
+
// Find the clusterId axis in this cluster size column
|
|
242
|
+
clusterSizeClusterIdAxis := undefined
|
|
243
|
+
for axis in col.spec.axesSpec {
|
|
244
|
+
if axis.name == "pl7.app/vdj/clusterId" {
|
|
245
|
+
clusterSizeClusterIdAxis = axis
|
|
246
|
+
break
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Only add if we have linker columns and this cluster size matches one of them
|
|
251
|
+
shouldAdd := false
|
|
252
|
+
if len(linkerClusterIdAxes) > 0 && !is_undefined(clusterSizeClusterIdAxis) {
|
|
253
|
+
// Check if this cluster size column matches any linker's clusterId axis
|
|
254
|
+
for linkerAxis in linkerClusterIdAxes {
|
|
255
|
+
// Compare domains - they must match exactly for same clustering run
|
|
256
|
+
if clusterSizeClusterIdAxis.name == linkerAxis.name &&
|
|
257
|
+
clusterSizeClusterIdAxis.type == linkerAxis.type {
|
|
258
|
+
// Check if domains match
|
|
259
|
+
domainsMatch := true
|
|
260
|
+
if is_undefined(clusterSizeClusterIdAxis.domain) != is_undefined(linkerAxis.domain) {
|
|
261
|
+
domainsMatch = false
|
|
262
|
+
} else if !is_undefined(clusterSizeClusterIdAxis.domain) && !is_undefined(linkerAxis.domain) {
|
|
263
|
+
// Compare domain keys and values
|
|
264
|
+
if len(clusterSizeClusterIdAxis.domain) != len(linkerAxis.domain) {
|
|
265
|
+
domainsMatch = false
|
|
266
|
+
} else {
|
|
267
|
+
for k, v in clusterSizeClusterIdAxis.domain {
|
|
268
|
+
if is_undefined(linkerAxis.domain[k]) || linkerAxis.domain[k] != v {
|
|
269
|
+
domainsMatch = false
|
|
270
|
+
break
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if domainsMatch {
|
|
276
|
+
shouldAdd = true
|
|
277
|
+
break
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Only add cluster size columns that match a linker column's clustering run
|
|
284
|
+
if shouldAdd {
|
|
285
|
+
// Trace elements are already present in col.spec from the clustering block.
|
|
286
|
+
// deriveLabels (in label.ts) will use these existing trace elements to construct
|
|
287
|
+
// distinguishing labels when multiple clustering blocks are joined, similar to
|
|
288
|
+
// how LabelTypeFull ('__LABEL__@1') works. The trace includes:
|
|
289
|
+
// - Original dataset trace
|
|
290
|
+
// - "milaboratories.clonotype-clustering.sequences" trace element
|
|
291
|
+
// - "milaboratories.clonotype-clustering.clustering" trace element
|
|
292
|
+
// No modification needed - just preserve the existing trace.
|
|
293
|
+
|
|
294
|
+
cloneTable.add(col, {header: "clusterSize." + string(clusterSizeIdx)})
|
|
295
|
+
addedCols = true
|
|
296
|
+
// Add the cluster axis header
|
|
297
|
+
for axisIdx, axis in col.spec.axesSpec {
|
|
298
|
+
if axis.name != datasetSpec.axesSpec[1].name {
|
|
299
|
+
cloneTable.setAxisHeader(axis, "clusterAxis_" + string(clusterSizeIdx) + "_" + string(axisIdx))
|
|
300
|
+
}
|
|
237
301
|
}
|
|
302
|
+
clusterSizeIdx = clusterSizeIdx + 1
|
|
238
303
|
}
|
|
239
304
|
}
|
|
240
305
|
}
|