@platforma-open/milaboratories.top-antibodies.workflow 1.2.0 → 1.2.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.
- package/.turbo/turbo-build.log +5 -1
- package/CHANGELOG.md +7 -0
- package/dist/tengo/lib/pf-spectratype-conv.lib.tengo +59 -0
- package/dist/tengo/lib/pf-vj-usage-conv.lib.tengo +54 -0
- package/dist/tengo/tpl/main.plj.gz +0 -0
- package/package.json +5 -5
- package/src/main.tpl.tengo +29 -69
- package/src/pf-spectratype-conv.lib.tengo +59 -0
- package/src/pf-vj-usage-conv.lib.tengo +54 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/work/top-antibodies/top-antibodies/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-open/milaboratories.top-antibodies.workflow@1.2.
|
|
3
|
+
> @platforma-open/milaboratories.top-antibodies.workflow@1.2.1 build /home/runner/work/top-antibodies/top-antibodies/workflow
|
|
4
4
|
> rm -rf dist && pl-tengo check && pl-tengo build
|
|
5
5
|
|
|
6
6
|
Processing "src/main.tpl.tengo"...
|
|
7
|
+
Processing "src/pf-spectratype-conv.lib.tengo"...
|
|
7
8
|
Processing "src/pf-umap-conv.lib.tengo"...
|
|
9
|
+
Processing "src/pf-vj-usage-conv.lib.tengo"...
|
|
8
10
|
Processing "src/sampled-cols-conv.lib.tengo"...
|
|
9
11
|
Processing "src/sampled-cols-umap-conv.lib.tengo"...
|
|
10
12
|
No syntax errors found.
|
|
11
13
|
info: Compiling 'dist'...
|
|
14
|
+
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/pf-spectratype-conv.lib.tengo
|
|
12
15
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/pf-umap-conv.lib.tengo
|
|
16
|
+
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/pf-vj-usage-conv.lib.tengo
|
|
13
17
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/sampled-cols-conv.lib.tengo
|
|
14
18
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/sampled-cols-umap-conv.lib.tengo
|
|
15
19
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/tpl/main.plj.gz
|
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
|
|
3
|
+
getColumns := func() {
|
|
4
|
+
return {
|
|
5
|
+
"axes": [
|
|
6
|
+
{
|
|
7
|
+
"column": "chain",
|
|
8
|
+
"spec": {
|
|
9
|
+
"name": "pl7.app/vdj/chain",
|
|
10
|
+
"type": "String",
|
|
11
|
+
"annotations": { "pl7.app/label": "CDR3 chain" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"column": "cdr3Length",
|
|
16
|
+
"spec": {
|
|
17
|
+
"name": "pl7.app/vdj/sequenceLength",
|
|
18
|
+
"type": "Int",
|
|
19
|
+
"domain": {
|
|
20
|
+
"pl7.app/vdj/feature": "CDR3",
|
|
21
|
+
"pl7.app/alphabet": "aminoacid"
|
|
22
|
+
},
|
|
23
|
+
"annotations": { "pl7.app/label": "CDR3 aa Length" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"column": "vGene",
|
|
28
|
+
"spec": {
|
|
29
|
+
"name": "pl7.app/vdj/geneHit",
|
|
30
|
+
"type": "String",
|
|
31
|
+
"domain": { "pl7.app/vdj/reference": "VGene" },
|
|
32
|
+
"annotations": {
|
|
33
|
+
"pl7.app/label": "Best V gene"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"columns": [
|
|
39
|
+
{
|
|
40
|
+
"column": "count",
|
|
41
|
+
"spec": {
|
|
42
|
+
"name": "pl7.app/vdj/vSpectratype",
|
|
43
|
+
"valueType": "Int",
|
|
44
|
+
"domain": {
|
|
45
|
+
"pl7.app/vdj/feature": "CDR3",
|
|
46
|
+
"pl7.app/alphabet": "aminoacid"
|
|
47
|
+
},
|
|
48
|
+
"annotations": { "pl7.app/label": "CDR3 V Spectratype" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"storageFormat": "Binary",
|
|
53
|
+
"partitionKeyLength": 0
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export ll.toStrict({
|
|
58
|
+
getColumns: getColumns
|
|
59
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
|
|
3
|
+
getColumns := func() {
|
|
4
|
+
return {
|
|
5
|
+
"axes": [
|
|
6
|
+
{
|
|
7
|
+
"column": "chain",
|
|
8
|
+
"spec": {
|
|
9
|
+
"name": "pl7.app/vdj/chain",
|
|
10
|
+
"type": "String",
|
|
11
|
+
"annotations": { "pl7.app/label": "CDR3 chain" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"column": "vGene",
|
|
16
|
+
"spec": {
|
|
17
|
+
"name": "pl7.app/vdj/geneHit",
|
|
18
|
+
"type": "String",
|
|
19
|
+
"domain": { "pl7.app/vdj/reference": "VGene" },
|
|
20
|
+
"annotations": {
|
|
21
|
+
"pl7.app/label": "Best V gene"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"column": "jGene",
|
|
27
|
+
"spec": {
|
|
28
|
+
"name": "pl7.app/vdj/geneHit",
|
|
29
|
+
"type": "String",
|
|
30
|
+
"domain": { "pl7.app/vdj/reference": "JGene" },
|
|
31
|
+
"annotations": {
|
|
32
|
+
"pl7.app/label": "Best J gene"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"columns": [
|
|
38
|
+
{
|
|
39
|
+
"column": "count",
|
|
40
|
+
"spec": {
|
|
41
|
+
"name": "pl7.app/vdj/vjGeneUsage",
|
|
42
|
+
"valueType": "Int",
|
|
43
|
+
"annotations": { "pl7.app/label": "V/J usage" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"storageFormat": "Binary",
|
|
48
|
+
"partitionKeyLength": 0
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export ll.toStrict({
|
|
53
|
+
getColumns: getColumns
|
|
54
|
+
})
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.top-antibodies.workflow",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Block Workflow",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@platforma-sdk/workflow-tengo": "^4.
|
|
7
|
+
"@platforma-sdk/workflow-tengo": "^4.5.1",
|
|
8
8
|
"@platforma-open/milaboratories.top-antibodies.sample-clonotypes": "1.0.1",
|
|
9
|
-
"@platforma-open/milaboratories.top-antibodies.
|
|
10
|
-
"@platforma-open/milaboratories.top-antibodies.
|
|
9
|
+
"@platforma-open/milaboratories.top-antibodies.umap": "1.0.1",
|
|
10
|
+
"@platforma-open/milaboratories.top-antibodies.spectratype": "1.2.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@platforma-sdk/tengo-builder": "^2.1.3",
|
|
14
|
-
"@platforma-sdk/test": "^1.30.
|
|
14
|
+
"@platforma-sdk/test": "^1.30.39",
|
|
15
15
|
"vitest": "^2.1.8"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
package/src/main.tpl.tengo
CHANGED
|
@@ -6,6 +6,8 @@ xsv := import("@platforma-sdk/workflow-tengo:pframes.xsv")
|
|
|
6
6
|
pframes := import("@platforma-sdk/workflow-tengo:pframes")
|
|
7
7
|
sampledColsConv := import(":sampled-cols-conv")
|
|
8
8
|
sampledColsUmapConv := import(":sampled-cols-umap-conv")
|
|
9
|
+
spectratypeConv := import(":pf-spectratype-conv")
|
|
10
|
+
vjUsageConv := import(":pf-vj-usage-conv")
|
|
9
11
|
slices := import("@platforma-sdk/workflow-tengo:slices")
|
|
10
12
|
umapConv := import(":pf-umap-conv")
|
|
11
13
|
|
|
@@ -58,6 +60,15 @@ wf.prepare(func(args){
|
|
|
58
60
|
}
|
|
59
61
|
}, "VGenes")
|
|
60
62
|
|
|
63
|
+
// Add J gene
|
|
64
|
+
bundleBuilder.addMulti({
|
|
65
|
+
axes: [{ anchor: "main", idx: 1 }], // Clonotype axis
|
|
66
|
+
name: "pl7.app/vdj/geneHit",
|
|
67
|
+
domain: {
|
|
68
|
+
"pl7.app/vdj/reference": "JGene"
|
|
69
|
+
}
|
|
70
|
+
}, "JGenes")
|
|
71
|
+
|
|
61
72
|
return {
|
|
62
73
|
columns: bundleBuilder.build()
|
|
63
74
|
}
|
|
@@ -218,89 +229,38 @@ wf.body(func(args) {
|
|
|
218
229
|
cdr3SeqTable.add(col.key, {header: headerName})
|
|
219
230
|
}
|
|
220
231
|
|
|
232
|
+
// Process J genes
|
|
233
|
+
jGenes := columns.getColumns("JGenes")
|
|
234
|
+
|
|
235
|
+
for col in jGenes {
|
|
236
|
+
headerName := makeHeaderName(col, "jGene", isSingleCell)
|
|
237
|
+
cdr3SeqTable.add(col.key, {header: headerName})
|
|
238
|
+
}
|
|
239
|
+
|
|
221
240
|
cdr3SeqTableBuilt := cdr3SeqTable.build("tsv")
|
|
222
241
|
|
|
223
242
|
cdr3VspectratypeCmd := exec.builder().
|
|
224
243
|
software(assets.importSoftware("@platforma-open/milaboratories.top-antibodies.spectratype:main")).
|
|
225
244
|
addFile("cdr3_sequences_input.tsv", cdr3SeqTableBuilt).
|
|
226
245
|
arg("--input_tsv").arg("cdr3_sequences_input.tsv").
|
|
227
|
-
arg("--
|
|
228
|
-
|
|
246
|
+
arg("--spectratype_tsv").arg("spectratype.tsv").
|
|
247
|
+
arg("--vj_usage_tsv").arg("vj_usage.tsv").
|
|
248
|
+
saveFile("spectratype.tsv").
|
|
249
|
+
saveFile("vj_usage.tsv").
|
|
229
250
|
printErrStreamToStdout().
|
|
230
251
|
saveStdoutContent().
|
|
231
252
|
cache(24 * 60 * 60 * 1000).
|
|
232
253
|
run()
|
|
233
254
|
|
|
234
255
|
|
|
235
|
-
// For spectratype structure is
|
|
236
|
-
// [chain][cdr3Length][vGene] -> count
|
|
237
|
-
|
|
238
|
-
// Get the spec for the vGene column
|
|
239
|
-
vGeneSpec := columns.getSpec(vGenes[0].key)
|
|
240
|
-
|
|
241
|
-
// Set up the axes for the output data
|
|
242
|
-
axes := [
|
|
243
|
-
{
|
|
244
|
-
column: "chain",
|
|
245
|
-
spec: {
|
|
246
|
-
name: "pl7.app/vdj/chain",
|
|
247
|
-
type: "String", // For axis it is type, not valueType
|
|
248
|
-
annotations: { "pl7.app/label": "CDR3 chain" }
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
column: "cdr3Length",
|
|
253
|
-
spec: {
|
|
254
|
-
name: "pl7.app/vdj/sequenceLength",
|
|
255
|
-
type: "Int",
|
|
256
|
-
domain: {
|
|
257
|
-
"pl7.app/vdj/feature": "CDR3",
|
|
258
|
-
"pl7.app/alphabet": "aminoacid"
|
|
259
|
-
},
|
|
260
|
-
annotations: { "pl7.app/label": "CDR3 aa Length" }
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
column: "vGene",
|
|
265
|
-
spec: {
|
|
266
|
-
name: "pl7.app/vdj/geneHit",
|
|
267
|
-
type: "String",
|
|
268
|
-
domain: vGeneSpec.domain,
|
|
269
|
-
annotations: {
|
|
270
|
-
"pl7.app/label": "Best V gene"
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
]
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
spectratypeColumns := [
|
|
279
|
-
{
|
|
280
|
-
column: "count",
|
|
281
|
-
spec: {
|
|
282
|
-
name: "pl7.app/vdj/vSpectratype",
|
|
283
|
-
valueType: "Int",
|
|
284
|
-
domain: {
|
|
285
|
-
"pl7.app/vdj/feature": "CDR3",
|
|
286
|
-
"pl7.app/alphabet": "aminoacid"
|
|
287
|
-
},
|
|
288
|
-
annotations: { "pl7.app/label": "CDR3 V Spectratype" }
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
]
|
|
292
|
-
|
|
293
|
-
spectratypeSpec := {
|
|
294
|
-
axes: axes,
|
|
295
|
-
columns: spectratypeColumns,
|
|
296
|
-
storageFormat: "Binary",
|
|
297
|
-
partitionKeyLength: 0
|
|
298
|
-
}
|
|
256
|
+
// For spectratype structure is [chain][cdr3Length][vGene] -> count
|
|
299
257
|
|
|
300
|
-
cdr3VspectratypePf := xsv.importFile(cdr3VspectratypeCmd.getFile("
|
|
301
|
-
|
|
258
|
+
cdr3VspectratypePf := xsv.importFile(cdr3VspectratypeCmd.getFile("spectratype.tsv"), "tsv", spectratypeConv.getColumns())
|
|
302
259
|
outputs["cdr3VspectratypePf"] = pframes.exportFrame(cdr3VspectratypePf)
|
|
303
|
-
|
|
260
|
+
|
|
261
|
+
// For vjUsage structure is [chain][vGene][jGene] -> count
|
|
262
|
+
vjUsagePf := xsv.importFile(cdr3VspectratypeCmd.getFile("vj_usage.tsv"), "tsv", vjUsageConv.getColumns())
|
|
263
|
+
outputs["vjUsagePf"] = pframes.exportFrame(vjUsagePf)
|
|
304
264
|
|
|
305
265
|
return {
|
|
306
266
|
outputs: outputs,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
|
|
3
|
+
getColumns := func() {
|
|
4
|
+
return {
|
|
5
|
+
"axes": [
|
|
6
|
+
{
|
|
7
|
+
"column": "chain",
|
|
8
|
+
"spec": {
|
|
9
|
+
"name": "pl7.app/vdj/chain",
|
|
10
|
+
"type": "String",
|
|
11
|
+
"annotations": { "pl7.app/label": "CDR3 chain" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"column": "cdr3Length",
|
|
16
|
+
"spec": {
|
|
17
|
+
"name": "pl7.app/vdj/sequenceLength",
|
|
18
|
+
"type": "Int",
|
|
19
|
+
"domain": {
|
|
20
|
+
"pl7.app/vdj/feature": "CDR3",
|
|
21
|
+
"pl7.app/alphabet": "aminoacid"
|
|
22
|
+
},
|
|
23
|
+
"annotations": { "pl7.app/label": "CDR3 aa Length" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"column": "vGene",
|
|
28
|
+
"spec": {
|
|
29
|
+
"name": "pl7.app/vdj/geneHit",
|
|
30
|
+
"type": "String",
|
|
31
|
+
"domain": { "pl7.app/vdj/reference": "VGene" },
|
|
32
|
+
"annotations": {
|
|
33
|
+
"pl7.app/label": "Best V gene"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"columns": [
|
|
39
|
+
{
|
|
40
|
+
"column": "count",
|
|
41
|
+
"spec": {
|
|
42
|
+
"name": "pl7.app/vdj/vSpectratype",
|
|
43
|
+
"valueType": "Int",
|
|
44
|
+
"domain": {
|
|
45
|
+
"pl7.app/vdj/feature": "CDR3",
|
|
46
|
+
"pl7.app/alphabet": "aminoacid"
|
|
47
|
+
},
|
|
48
|
+
"annotations": { "pl7.app/label": "CDR3 V Spectratype" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"storageFormat": "Binary",
|
|
53
|
+
"partitionKeyLength": 0
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export ll.toStrict({
|
|
58
|
+
getColumns: getColumns
|
|
59
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
|
|
3
|
+
getColumns := func() {
|
|
4
|
+
return {
|
|
5
|
+
"axes": [
|
|
6
|
+
{
|
|
7
|
+
"column": "chain",
|
|
8
|
+
"spec": {
|
|
9
|
+
"name": "pl7.app/vdj/chain",
|
|
10
|
+
"type": "String",
|
|
11
|
+
"annotations": { "pl7.app/label": "CDR3 chain" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"column": "vGene",
|
|
16
|
+
"spec": {
|
|
17
|
+
"name": "pl7.app/vdj/geneHit",
|
|
18
|
+
"type": "String",
|
|
19
|
+
"domain": { "pl7.app/vdj/reference": "VGene" },
|
|
20
|
+
"annotations": {
|
|
21
|
+
"pl7.app/label": "Best V gene"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"column": "jGene",
|
|
27
|
+
"spec": {
|
|
28
|
+
"name": "pl7.app/vdj/geneHit",
|
|
29
|
+
"type": "String",
|
|
30
|
+
"domain": { "pl7.app/vdj/reference": "JGene" },
|
|
31
|
+
"annotations": {
|
|
32
|
+
"pl7.app/label": "Best J gene"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"columns": [
|
|
38
|
+
{
|
|
39
|
+
"column": "count",
|
|
40
|
+
"spec": {
|
|
41
|
+
"name": "pl7.app/vdj/vjGeneUsage",
|
|
42
|
+
"valueType": "Int",
|
|
43
|
+
"annotations": { "pl7.app/label": "V/J usage" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"storageFormat": "Binary",
|
|
48
|
+
"partitionKeyLength": 0
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export ll.toStrict({
|
|
53
|
+
getColumns: getColumns
|
|
54
|
+
})
|