@platforma-open/milaboratories.top-antibodies.workflow 1.2.1 → 1.3.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 +1 -5
- package/CHANGELOG.md +20 -0
- package/dist/tengo/lib/pf-spectratype-conv.lib.tengo +27 -27
- package/dist/tengo/lib/pf-vj-usage-conv.lib.tengo +26 -26
- package/dist/tengo/lib/sampled-cols-conv.lib.tengo +19 -30
- package/dist/tengo/tpl/main.plj.gz +0 -0
- package/package.json +7 -7
- package/src/main.tpl.tengo +31 -55
- package/src/pf-spectratype-conv.lib.tengo +27 -27
- package/src/pf-vj-usage-conv.lib.tengo +26 -26
- package/src/sampled-cols-conv.lib.tengo +19 -30
- package/dist/tengo/lib/pf-umap-conv.lib.tengo +0 -43
- package/dist/tengo/lib/sampled-cols-umap-conv.lib.tengo +0 -38
- package/src/pf-umap-conv.lib.tengo +0 -43
- package/src/sampled-cols-umap-conv.lib.tengo +0 -38
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
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.
|
|
3
|
+
> @platforma-open/milaboratories.top-antibodies.workflow@1.3.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
7
|
Processing "src/pf-spectratype-conv.lib.tengo"...
|
|
8
|
-
Processing "src/pf-umap-conv.lib.tengo"...
|
|
9
8
|
Processing "src/pf-vj-usage-conv.lib.tengo"...
|
|
10
9
|
Processing "src/sampled-cols-conv.lib.tengo"...
|
|
11
|
-
Processing "src/sampled-cols-umap-conv.lib.tengo"...
|
|
12
10
|
No syntax errors found.
|
|
13
11
|
info: Compiling 'dist'...
|
|
14
12
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/pf-spectratype-conv.lib.tengo
|
|
15
|
-
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/pf-umap-conv.lib.tengo
|
|
16
13
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/pf-vj-usage-conv.lib.tengo
|
|
17
14
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/sampled-cols-conv.lib.tengo
|
|
18
|
-
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/lib/sampled-cols-umap-conv.lib.tengo
|
|
19
15
|
info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/tpl/main.plj.gz
|
|
20
16
|
info: Template Pack build done.
|
|
21
17
|
info: Template Pack build done.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @platforma-open/milaboratories.top-antibodies.workflow
|
|
2
2
|
|
|
3
|
+
## 1.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [b280c5c]
|
|
8
|
+
- @platforma-open/milaboratories.top-antibodies.sample-clonotypes@1.0.2
|
|
9
|
+
- @platforma-open/milaboratories.top-antibodies.spectratype@1.3.1
|
|
10
|
+
- @platforma-open/milaboratories.top-antibodies.umap@1.0.2
|
|
11
|
+
|
|
12
|
+
## 1.3.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 2e24f7a: Disable default normalization in VJ usage plot and change spectratype/VJ usage script to run on top clonotypes if provided
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [2e24f7a]
|
|
21
|
+
- @platforma-open/milaboratories.top-antibodies.spectratype@1.3.0
|
|
22
|
+
|
|
3
23
|
## 1.2.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -2,55 +2,55 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
|
2
2
|
|
|
3
3
|
getColumns := func() {
|
|
4
4
|
return {
|
|
5
|
-
|
|
5
|
+
axes: [
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
column: "chain",
|
|
8
|
+
spec: {
|
|
9
|
+
name: "pl7.app/vdj/chain",
|
|
10
|
+
type: "String",
|
|
11
|
+
annotations: { "pl7.app/label": "CDR3 chain" }
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
column: "cdr3Length",
|
|
16
|
+
spec: {
|
|
17
|
+
name: "pl7.app/vdj/sequenceLength",
|
|
18
|
+
type: "Int",
|
|
19
|
+
domain: {
|
|
20
20
|
"pl7.app/vdj/feature": "CDR3",
|
|
21
21
|
"pl7.app/alphabet": "aminoacid"
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
annotations: { "pl7.app/label": "CDR3 aa Length" }
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
column: "vGene",
|
|
28
|
+
spec: {
|
|
29
|
+
name: "pl7.app/vdj/geneHit",
|
|
30
|
+
type: "String",
|
|
31
|
+
domain: { "pl7.app/vdj/reference": "VGene" },
|
|
32
|
+
annotations: {
|
|
33
33
|
"pl7.app/label": "Best V gene"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
-
|
|
38
|
+
columns: [
|
|
39
39
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
column: "count",
|
|
41
|
+
spec: {
|
|
42
|
+
name: "pl7.app/vdj/vSpectratype",
|
|
43
|
+
valueType: "Int",
|
|
44
|
+
domain: {
|
|
45
45
|
"pl7.app/vdj/feature": "CDR3",
|
|
46
46
|
"pl7.app/alphabet": "aminoacid"
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
annotations: { "pl7.app/label": "CDR3 V Spectratype" }
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
storageFormat: "Binary",
|
|
53
|
+
partitionKeyLength: 0
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -2,50 +2,50 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
|
2
2
|
|
|
3
3
|
getColumns := func() {
|
|
4
4
|
return {
|
|
5
|
-
|
|
5
|
+
axes: [
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
column: "chain",
|
|
8
|
+
spec: {
|
|
9
|
+
name: "pl7.app/vdj/chain",
|
|
10
|
+
type: "String",
|
|
11
|
+
annotations: { "pl7.app/label": "CDR3 chain" }
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
column: "vGene",
|
|
16
|
+
spec: {
|
|
17
|
+
name: "pl7.app/vdj/geneHit",
|
|
18
|
+
type: "String",
|
|
19
|
+
domain: { "pl7.app/vdj/reference": "VGene" },
|
|
20
|
+
annotations: {
|
|
21
21
|
"pl7.app/label": "Best V gene"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
column: "jGene",
|
|
27
|
+
spec: {
|
|
28
|
+
name: "pl7.app/vdj/geneHit",
|
|
29
|
+
type: "String",
|
|
30
|
+
domain: { "pl7.app/vdj/reference": "JGene" },
|
|
31
|
+
annotations: {
|
|
32
32
|
"pl7.app/label": "Best J gene"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
|
-
|
|
37
|
+
columns: [
|
|
38
38
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
column: "count",
|
|
40
|
+
spec: {
|
|
41
|
+
name: "pl7.app/vdj/vjGeneUsage",
|
|
42
|
+
valueType: "Int",
|
|
43
|
+
annotations: { "pl7.app/label": "V/J usage" }
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
storageFormat: "Binary",
|
|
48
|
+
partitionKeyLength: 0
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
2
|
|
|
3
|
-
getColumns := func(datasetSpec
|
|
4
|
-
axes := [
|
|
5
|
-
{
|
|
6
|
-
"column": "clonotypeKey",
|
|
7
|
-
"spec": datasetSpec.axesSpec[1]
|
|
8
|
-
}]
|
|
9
|
-
|
|
10
|
-
if len(linkerAxisSpec) > 0 {
|
|
11
|
-
for key, val in linkerAxisSpec {
|
|
12
|
-
axes = axes + [
|
|
13
|
-
{
|
|
14
|
-
"column": key,
|
|
15
|
-
"spec": val
|
|
16
|
-
}]
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
3
|
+
getColumns := func(datasetSpec) {
|
|
20
4
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
axes: [
|
|
6
|
+
{
|
|
7
|
+
column: "clonotypeKey",
|
|
8
|
+
spec: datasetSpec.axesSpec[1]
|
|
9
|
+
}],
|
|
10
|
+
columns: [
|
|
23
11
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
column: "top",
|
|
13
|
+
id: "link",
|
|
14
|
+
allowNA: false,
|
|
15
|
+
spec: {
|
|
16
|
+
name: "pl7.app/vdj/sampling-column",
|
|
17
|
+
valueType: "Int",
|
|
18
|
+
domain: {},
|
|
19
|
+
annotations: {
|
|
32
20
|
"pl7.app/label": "Sampling column",
|
|
33
|
-
"pl7.app/table/visibility": "optional"
|
|
21
|
+
"pl7.app/table/visibility": "optional",
|
|
22
|
+
"pl7.app/isSubset": "true"
|
|
34
23
|
}
|
|
35
24
|
}
|
|
36
25
|
}
|
|
37
26
|
],
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
storageFormat: "Binary",
|
|
28
|
+
partitionKeyLength: 0
|
|
40
29
|
}
|
|
41
30
|
}
|
|
42
31
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.top-antibodies.workflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Block Workflow",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@platforma-sdk/workflow-tengo": "^4.
|
|
8
|
-
"@platforma-open/milaboratories.top-antibodies.sample-clonotypes": "1.0.
|
|
9
|
-
"@platforma-open/milaboratories.top-antibodies.umap": "1.0.
|
|
10
|
-
"@platforma-open/milaboratories.top-antibodies.spectratype": "1.
|
|
7
|
+
"@platforma-sdk/workflow-tengo": "^4.6.2",
|
|
8
|
+
"@platforma-open/milaboratories.top-antibodies.sample-clonotypes": "1.0.2",
|
|
9
|
+
"@platforma-open/milaboratories.top-antibodies.umap": "1.0.2",
|
|
10
|
+
"@platforma-open/milaboratories.top-antibodies.spectratype": "1.3.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@platforma-sdk/tengo-builder": "^2.1.
|
|
14
|
-
"@platforma-sdk/test": "^1.
|
|
13
|
+
"@platforma-sdk/tengo-builder": "^2.1.5",
|
|
14
|
+
"@platforma-sdk/test": "^1.31.18",
|
|
15
15
|
"vitest": "^2.1.8"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
package/src/main.tpl.tengo
CHANGED
|
@@ -5,11 +5,9 @@ assets:= import("@platforma-sdk/workflow-tengo:assets")
|
|
|
5
5
|
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
|
-
sampledColsUmapConv := import(":sampled-cols-umap-conv")
|
|
9
8
|
spectratypeConv := import(":pf-spectratype-conv")
|
|
10
9
|
vjUsageConv := import(":pf-vj-usage-conv")
|
|
11
10
|
slices := import("@platforma-sdk/workflow-tengo:slices")
|
|
12
|
-
umapConv := import(":pf-umap-conv")
|
|
13
11
|
|
|
14
12
|
wf.prepare(func(args){
|
|
15
13
|
// We need a table with cluster ID (optional) | clonotype id | selected ranking columns
|
|
@@ -19,7 +17,8 @@ wf.prepare(func(args){
|
|
|
19
17
|
bundleBuilder.addAnchor("main", args.inputAnchor)
|
|
20
18
|
|
|
21
19
|
for col in args.rankingOrder {
|
|
22
|
-
bundleBuilder.
|
|
20
|
+
bundleBuilder.addAnchor(col.value.anchorName, col.value.anchorRef)
|
|
21
|
+
bundleBuilder.addSingle(col.value.column)
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
// Add linker column
|
|
@@ -91,14 +90,14 @@ wf.body(func(args) {
|
|
|
91
90
|
////////// Clonotype Filtering //////////
|
|
92
91
|
|
|
93
92
|
// Build clonotype table
|
|
94
|
-
cloneTable :=
|
|
93
|
+
cloneTable := pframes.csvFileBuilder()
|
|
95
94
|
cloneTable.setAxisHeader(datasetSpec.axesSpec[1].name, "clonotypeKey")
|
|
96
95
|
|
|
97
96
|
for i, col in args.rankingOrder {
|
|
98
|
-
cloneTable.add(col, {header: "Col" + string(i)})
|
|
97
|
+
cloneTable.add(columns.getColumn(col.value.column), {header: "Col" + string(i)})
|
|
99
98
|
|
|
100
99
|
// If column does not have main anchor axis we have to include theirs
|
|
101
|
-
colsSpec := columns.getSpec(col)
|
|
100
|
+
colsSpec := columns.getSpec(col.value.column)
|
|
102
101
|
axesNames := slices.map(colsSpec.axesSpec, func (a) { return a.name})
|
|
103
102
|
if !slices.hasElement(axesNames, datasetSpec.axesSpec[1].name) {
|
|
104
103
|
for na, ax in colsSpec.axesSpec {
|
|
@@ -113,16 +112,18 @@ wf.body(func(args) {
|
|
|
113
112
|
linkerAxisSpec := {}
|
|
114
113
|
for i, col in columns.getColumns("linkers") {
|
|
115
114
|
if datasetSpec.axesSpec[1].name == col.spec.axesSpec[1].name {
|
|
116
|
-
cloneTable.add(col
|
|
115
|
+
cloneTable.add(col, {header: "linker." + string(i)})
|
|
117
116
|
cloneTable.setAxisHeader(col.spec.axesSpec[0].name, "cluster_" + string(i))
|
|
118
117
|
linkerAxisSpec["cluster_" + string(i)] = col.spec.axesSpec[0]
|
|
119
118
|
} else if datasetSpec.axesSpec[1].name == col.spec.axesSpec[0].name {
|
|
120
|
-
cloneTable.add(col
|
|
119
|
+
cloneTable.add(col, {header: "linker." + string(i)})
|
|
121
120
|
cloneTable.setAxisHeader(col.spec.axesSpec[1].name, "cluster_" + string(i))
|
|
122
121
|
linkerAxisSpec["cluster_" + string(i)] = col.spec.axesSpec[1]
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
|
-
cloneTable = cloneTable.build(
|
|
124
|
+
cloneTable = cloneTable.build()
|
|
125
|
+
|
|
126
|
+
topClonotypesCsv := undefined
|
|
126
127
|
|
|
127
128
|
if topClonotypes != undefined {
|
|
128
129
|
// Run sampling script
|
|
@@ -137,53 +138,19 @@ wf.body(func(args) {
|
|
|
137
138
|
saveStdoutContent().
|
|
138
139
|
cache(24 * 60 * 60 * 1000).
|
|
139
140
|
run()
|
|
140
|
-
|
|
141
|
+
|
|
142
|
+
// Save top clonotypes CSV file
|
|
143
|
+
topClonotypesCsv = sampleClones.getFile("sampledClonotypes_top.csv")
|
|
144
|
+
|
|
141
145
|
// Store outputs
|
|
142
|
-
sampledColsParams := sampledColsConv.getColumns(datasetSpec
|
|
143
|
-
sampledColumnsPf := xsv.importFile(
|
|
146
|
+
sampledColsParams := sampledColsConv.getColumns(datasetSpec)
|
|
147
|
+
sampledColumnsPf := xsv.importFile(topClonotypesCsv, "csv", sampledColsParams)
|
|
144
148
|
outputs["sampledRows"] = pframes.exportFrame(sampledColumnsPf)
|
|
145
|
-
|
|
146
|
-
// Prepare filter col subset for UMAP
|
|
147
|
-
// Avoid taking cluster axis using other params
|
|
148
|
-
sampledColsUmapParams := sampledColsUmapConv.getColumns(datasetSpec)
|
|
149
|
-
sampledColsUmapPf := xsv.importFile(sampleClones.getFile("sampledClonotypes_top.csv"), "csv", sampledColsUmapParams)
|
|
150
|
-
outputs["sampledRowsUmap"] = pframes.exportFrame(sampledColsUmapPf)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
////////// UMAP //////////
|
|
154
|
-
// Generate input TSV with Clonotype ID and aa sequence
|
|
155
|
-
umapTable := columns.xsvTableBuilder()
|
|
156
|
-
umapTable.setAxisHeader(datasetSpec.axesSpec[1].name, "clonotypeKey")
|
|
157
|
-
for col in columns.getColumns("aaSequence") {
|
|
158
|
-
if isSingleCell {
|
|
159
|
-
chainLabel := col.spec.domain["pl7.app/vdj/scClonotypeChain"]
|
|
160
|
-
umapTable.add(col.key, {header: "aaSequence." + chainLabel})
|
|
161
|
-
} else {
|
|
162
|
-
chainLabel := col.spec.axesSpec[0].domain["pl7.app/vdj/chain"]
|
|
163
|
-
umapTable.add(col.key, {header: "aaSequence." + chainLabel})
|
|
164
|
-
}
|
|
165
149
|
}
|
|
166
|
-
umapTable = umapTable.build("tsv")
|
|
167
|
-
|
|
168
|
-
// UMAP script should go here
|
|
169
|
-
umapClones := exec.builder().
|
|
170
|
-
software(assets.importSoftware("@platforma-open/milaboratories.top-antibodies.umap:main")).
|
|
171
|
-
addFile("sequences.tsv", umapTable).
|
|
172
|
-
arg("-i").arg("sequences.tsv").
|
|
173
|
-
arg("-u").arg("umap.tsv").
|
|
174
|
-
saveFile("umap.tsv").
|
|
175
|
-
printErrStreamToStdout().
|
|
176
|
-
saveStdoutContent().
|
|
177
|
-
cache(24 * 60 * 60 * 1000).
|
|
178
|
-
run()
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
umapPf := xsv.importFile(umapClones.getFile("umap.tsv"), "tsv", umapConv.getColumns(datasetSpec))
|
|
182
|
-
outputs["umap"] = pframes.exportFrame(umapPf)
|
|
183
150
|
|
|
184
151
|
////////// CDR3 Length Calculation //////////
|
|
185
152
|
|
|
186
|
-
cdr3SeqTable :=
|
|
153
|
+
cdr3SeqTable := pframes.tsvFileBuilder()
|
|
187
154
|
cdr3SeqTable.setAxisHeader(datasetSpec.axesSpec[1].name, "clonotypeKey")
|
|
188
155
|
|
|
189
156
|
// Must deal with multiple CDR3 sequences (two for each cell in single cell data)
|
|
@@ -218,7 +185,7 @@ wf.body(func(args) {
|
|
|
218
185
|
|
|
219
186
|
for col in cdr3Sequences {
|
|
220
187
|
headerName := makeHeaderName(col, "cdr3Sequence", isSingleCell)
|
|
221
|
-
cdr3SeqTable.add(col
|
|
188
|
+
cdr3SeqTable.add(col, {header: headerName})
|
|
222
189
|
}
|
|
223
190
|
|
|
224
191
|
// Process V genes
|
|
@@ -226,7 +193,7 @@ wf.body(func(args) {
|
|
|
226
193
|
|
|
227
194
|
for col in vGenes {
|
|
228
195
|
headerName := makeHeaderName(col, "vGene", isSingleCell)
|
|
229
|
-
cdr3SeqTable.add(col
|
|
196
|
+
cdr3SeqTable.add(col, {header: headerName})
|
|
230
197
|
}
|
|
231
198
|
|
|
232
199
|
// Process J genes
|
|
@@ -234,17 +201,26 @@ wf.body(func(args) {
|
|
|
234
201
|
|
|
235
202
|
for col in jGenes {
|
|
236
203
|
headerName := makeHeaderName(col, "jGene", isSingleCell)
|
|
237
|
-
cdr3SeqTable.add(col
|
|
204
|
+
cdr3SeqTable.add(col, {header: headerName})
|
|
238
205
|
}
|
|
239
206
|
|
|
240
|
-
cdr3SeqTableBuilt := cdr3SeqTable.build(
|
|
207
|
+
cdr3SeqTableBuilt := cdr3SeqTable.build()
|
|
241
208
|
|
|
242
209
|
cdr3VspectratypeCmd := exec.builder().
|
|
243
210
|
software(assets.importSoftware("@platforma-open/milaboratories.top-antibodies.spectratype:main")).
|
|
244
211
|
addFile("cdr3_sequences_input.tsv", cdr3SeqTableBuilt).
|
|
245
212
|
arg("--input_tsv").arg("cdr3_sequences_input.tsv").
|
|
246
213
|
arg("--spectratype_tsv").arg("spectratype.tsv").
|
|
247
|
-
arg("--vj_usage_tsv").arg("vj_usage.tsv")
|
|
214
|
+
arg("--vj_usage_tsv").arg("vj_usage.tsv") // no dot here
|
|
215
|
+
|
|
216
|
+
// Add top clonotypes argument and file to the builder if provided
|
|
217
|
+
if topClonotypes != undefined {
|
|
218
|
+
cdr3VspectratypeCmd = cdr3VspectratypeCmd.
|
|
219
|
+
arg("--top_clonotypes_csv").arg("topClonotypes.csv").
|
|
220
|
+
addFile("topClonotypes.csv", topClonotypesCsv)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
cdr3VspectratypeCmd = cdr3VspectratypeCmd. // continue building the command
|
|
248
224
|
saveFile("spectratype.tsv").
|
|
249
225
|
saveFile("vj_usage.tsv").
|
|
250
226
|
printErrStreamToStdout().
|
|
@@ -2,55 +2,55 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
|
2
2
|
|
|
3
3
|
getColumns := func() {
|
|
4
4
|
return {
|
|
5
|
-
|
|
5
|
+
axes: [
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
column: "chain",
|
|
8
|
+
spec: {
|
|
9
|
+
name: "pl7.app/vdj/chain",
|
|
10
|
+
type: "String",
|
|
11
|
+
annotations: { "pl7.app/label": "CDR3 chain" }
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
column: "cdr3Length",
|
|
16
|
+
spec: {
|
|
17
|
+
name: "pl7.app/vdj/sequenceLength",
|
|
18
|
+
type: "Int",
|
|
19
|
+
domain: {
|
|
20
20
|
"pl7.app/vdj/feature": "CDR3",
|
|
21
21
|
"pl7.app/alphabet": "aminoacid"
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
annotations: { "pl7.app/label": "CDR3 aa Length" }
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
column: "vGene",
|
|
28
|
+
spec: {
|
|
29
|
+
name: "pl7.app/vdj/geneHit",
|
|
30
|
+
type: "String",
|
|
31
|
+
domain: { "pl7.app/vdj/reference": "VGene" },
|
|
32
|
+
annotations: {
|
|
33
33
|
"pl7.app/label": "Best V gene"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
-
|
|
38
|
+
columns: [
|
|
39
39
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
column: "count",
|
|
41
|
+
spec: {
|
|
42
|
+
name: "pl7.app/vdj/vSpectratype",
|
|
43
|
+
valueType: "Int",
|
|
44
|
+
domain: {
|
|
45
45
|
"pl7.app/vdj/feature": "CDR3",
|
|
46
46
|
"pl7.app/alphabet": "aminoacid"
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
annotations: { "pl7.app/label": "CDR3 V Spectratype" }
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
storageFormat: "Binary",
|
|
53
|
+
partitionKeyLength: 0
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -2,50 +2,50 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
|
2
2
|
|
|
3
3
|
getColumns := func() {
|
|
4
4
|
return {
|
|
5
|
-
|
|
5
|
+
axes: [
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
column: "chain",
|
|
8
|
+
spec: {
|
|
9
|
+
name: "pl7.app/vdj/chain",
|
|
10
|
+
type: "String",
|
|
11
|
+
annotations: { "pl7.app/label": "CDR3 chain" }
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
column: "vGene",
|
|
16
|
+
spec: {
|
|
17
|
+
name: "pl7.app/vdj/geneHit",
|
|
18
|
+
type: "String",
|
|
19
|
+
domain: { "pl7.app/vdj/reference": "VGene" },
|
|
20
|
+
annotations: {
|
|
21
21
|
"pl7.app/label": "Best V gene"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
column: "jGene",
|
|
27
|
+
spec: {
|
|
28
|
+
name: "pl7.app/vdj/geneHit",
|
|
29
|
+
type: "String",
|
|
30
|
+
domain: { "pl7.app/vdj/reference": "JGene" },
|
|
31
|
+
annotations: {
|
|
32
32
|
"pl7.app/label": "Best J gene"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
|
-
|
|
37
|
+
columns: [
|
|
38
38
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
column: "count",
|
|
40
|
+
spec: {
|
|
41
|
+
name: "pl7.app/vdj/vjGeneUsage",
|
|
42
|
+
valueType: "Int",
|
|
43
|
+
annotations: { "pl7.app/label": "V/J usage" }
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
storageFormat: "Binary",
|
|
48
|
+
partitionKeyLength: 0
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
2
|
|
|
3
|
-
getColumns := func(datasetSpec
|
|
4
|
-
axes := [
|
|
5
|
-
{
|
|
6
|
-
"column": "clonotypeKey",
|
|
7
|
-
"spec": datasetSpec.axesSpec[1]
|
|
8
|
-
}]
|
|
9
|
-
|
|
10
|
-
if len(linkerAxisSpec) > 0 {
|
|
11
|
-
for key, val in linkerAxisSpec {
|
|
12
|
-
axes = axes + [
|
|
13
|
-
{
|
|
14
|
-
"column": key,
|
|
15
|
-
"spec": val
|
|
16
|
-
}]
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
3
|
+
getColumns := func(datasetSpec) {
|
|
20
4
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
axes: [
|
|
6
|
+
{
|
|
7
|
+
column: "clonotypeKey",
|
|
8
|
+
spec: datasetSpec.axesSpec[1]
|
|
9
|
+
}],
|
|
10
|
+
columns: [
|
|
23
11
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
column: "top",
|
|
13
|
+
id: "link",
|
|
14
|
+
allowNA: false,
|
|
15
|
+
spec: {
|
|
16
|
+
name: "pl7.app/vdj/sampling-column",
|
|
17
|
+
valueType: "Int",
|
|
18
|
+
domain: {},
|
|
19
|
+
annotations: {
|
|
32
20
|
"pl7.app/label": "Sampling column",
|
|
33
|
-
"pl7.app/table/visibility": "optional"
|
|
21
|
+
"pl7.app/table/visibility": "optional",
|
|
22
|
+
"pl7.app/isSubset": "true"
|
|
34
23
|
}
|
|
35
24
|
}
|
|
36
25
|
}
|
|
37
26
|
],
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
storageFormat: "Binary",
|
|
28
|
+
partitionKeyLength: 0
|
|
40
29
|
}
|
|
41
30
|
}
|
|
42
31
|
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
-
|
|
3
|
-
getColumns := func(datasetSpec) {
|
|
4
|
-
return {
|
|
5
|
-
"axes": [
|
|
6
|
-
{
|
|
7
|
-
"column": "clonotypeKey",
|
|
8
|
-
"spec": datasetSpec.axesSpec[1]
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
"columns": [
|
|
12
|
-
{
|
|
13
|
-
"column": "UMAP1",
|
|
14
|
-
"id": "umap1",
|
|
15
|
-
"allowNA": false,
|
|
16
|
-
"spec": {
|
|
17
|
-
"name": "pl7.app/vdj/umap1",
|
|
18
|
-
"valueType": "Double",
|
|
19
|
-
"annotations": {
|
|
20
|
-
"pl7.app/label": "UMAP Dim1"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"column": "UMAP2",
|
|
26
|
-
"id": "umap2",
|
|
27
|
-
"allowNA": false,
|
|
28
|
-
"spec": {
|
|
29
|
-
"name": "pl7.app/vdj/umap2",
|
|
30
|
-
"valueType": "Double",
|
|
31
|
-
"annotations": {
|
|
32
|
-
"pl7.app/label": "UMAP Dim2"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}],
|
|
36
|
-
"storageFormat": "Binary",
|
|
37
|
-
"partitionKeyLength": 0
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export ll.toStrict({
|
|
42
|
-
getColumns: getColumns
|
|
43
|
-
})
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
getColumns := func(datasetSpec) {
|
|
6
|
-
axes := [
|
|
7
|
-
{
|
|
8
|
-
"column": "clonotypeKey",
|
|
9
|
-
"spec": datasetSpec.axesSpec[1]
|
|
10
|
-
}]
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
"axes": axes,
|
|
14
|
-
"columns": [
|
|
15
|
-
{
|
|
16
|
-
"column": "top",
|
|
17
|
-
"id": "link2", // temporal change
|
|
18
|
-
"allowNA": false,
|
|
19
|
-
"spec": {
|
|
20
|
-
"name": "pl7.app/vdj/sampling-column-umap",
|
|
21
|
-
"valueType": "Int",
|
|
22
|
-
"domain": {},
|
|
23
|
-
"annotations": {
|
|
24
|
-
"pl7.app/label": "Top clonotypes",
|
|
25
|
-
"pl7.app/table/visibility": "optional",
|
|
26
|
-
"pl7.app/isSubset": "true"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"storageFormat": "Binary",
|
|
32
|
-
"partitionKeyLength": 0
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export ll.toStrict({
|
|
37
|
-
getColumns: getColumns
|
|
38
|
-
})
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
-
|
|
3
|
-
getColumns := func(datasetSpec) {
|
|
4
|
-
return {
|
|
5
|
-
"axes": [
|
|
6
|
-
{
|
|
7
|
-
"column": "clonotypeKey",
|
|
8
|
-
"spec": datasetSpec.axesSpec[1]
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
"columns": [
|
|
12
|
-
{
|
|
13
|
-
"column": "UMAP1",
|
|
14
|
-
"id": "umap1",
|
|
15
|
-
"allowNA": false,
|
|
16
|
-
"spec": {
|
|
17
|
-
"name": "pl7.app/vdj/umap1",
|
|
18
|
-
"valueType": "Double",
|
|
19
|
-
"annotations": {
|
|
20
|
-
"pl7.app/label": "UMAP Dim1"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"column": "UMAP2",
|
|
26
|
-
"id": "umap2",
|
|
27
|
-
"allowNA": false,
|
|
28
|
-
"spec": {
|
|
29
|
-
"name": "pl7.app/vdj/umap2",
|
|
30
|
-
"valueType": "Double",
|
|
31
|
-
"annotations": {
|
|
32
|
-
"pl7.app/label": "UMAP Dim2"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}],
|
|
36
|
-
"storageFormat": "Binary",
|
|
37
|
-
"partitionKeyLength": 0
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export ll.toStrict({
|
|
42
|
-
getColumns: getColumns
|
|
43
|
-
})
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
-
|
|
3
|
-
// modified from sampled-cols-conv.lib.tengo
|
|
4
|
-
|
|
5
|
-
getColumns := func(datasetSpec) {
|
|
6
|
-
axes := [
|
|
7
|
-
{
|
|
8
|
-
"column": "clonotypeKey",
|
|
9
|
-
"spec": datasetSpec.axesSpec[1]
|
|
10
|
-
}]
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
"axes": axes,
|
|
14
|
-
"columns": [
|
|
15
|
-
{
|
|
16
|
-
"column": "top",
|
|
17
|
-
"id": "link2", // temporal change
|
|
18
|
-
"allowNA": false,
|
|
19
|
-
"spec": {
|
|
20
|
-
"name": "pl7.app/vdj/sampling-column-umap",
|
|
21
|
-
"valueType": "Int",
|
|
22
|
-
"domain": {},
|
|
23
|
-
"annotations": {
|
|
24
|
-
"pl7.app/label": "Top clonotypes",
|
|
25
|
-
"pl7.app/table/visibility": "optional",
|
|
26
|
-
"pl7.app/isSubset": "true"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"storageFormat": "Binary",
|
|
32
|
-
"partitionKeyLength": 0
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export ll.toStrict({
|
|
37
|
-
getColumns: getColumns
|
|
38
|
-
})
|