@platforma-open/milaboratories.tcrdisco-enrichment.workflow 1.1.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 +27 -0
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -0
- package/dist/tengo/lib/libs.cd_subset_params.lib.tengo +42 -0
- package/dist/tengo/lib/libs.tcr_pairs_params.lib.tengo +159 -0
- package/dist/tengo/lib/libs.tcrdisco_da_pfconv_params.lib.tengo +54 -0
- package/dist/tengo/lib/libs.top_frequencies.lib.tengo +46 -0
- package/dist/tengo/lib/libs.top_table_pfconv_params.lib.tengo +238 -0
- package/dist/tengo/tpl/main.plj.gz +0 -0
- package/dist/tengo/tpl/tcr-ab-pairs.plj.gz +0 -0
- package/dist/tengo/tpl/tcr-analysis.plj.gz +0 -0
- package/format.el +43 -0
- package/index.d.ts +4 -0
- package/index.js +3 -0
- package/package.json +20 -0
- package/src/libs/cd_subset_params.lib.tengo +42 -0
- package/src/libs/tcr_pairs_params.lib.tengo +159 -0
- package/src/libs/tcrdisco_da_pfconv_params.lib.tengo +54 -0
- package/src/libs/top_frequencies.lib.tengo +46 -0
- package/src/libs/top_table_pfconv_params.lib.tengo +238 -0
- package/src/main.tpl.tengo +579 -0
- package/src/tcr-ab-pairs.tpl.tengo +60 -0
- package/src/tcr-analysis.tpl.tengo +226 -0
- package/src/wf.test.ts +13 -0
- package/tsconfig.json +16 -0
- package/vitest.config.mts +9 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
WARN Issue while reading "/home/runner/work/tcr-disco/tcr-disco/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
|
+
|
|
3
|
+
> @platforma-open/milaboratories.tcrdisco-enrichment.workflow@1.1.0 build /home/runner/work/tcr-disco/tcr-disco/workflow
|
|
4
|
+
> rm -rf dist && pl-tengo check && pl-tengo build
|
|
5
|
+
|
|
6
|
+
info: Skipping unknown file type: wf.test.ts
|
|
7
|
+
Processing "src/libs/cd_subset_params.lib.tengo"...
|
|
8
|
+
Processing "src/libs/tcr_pairs_params.lib.tengo"...
|
|
9
|
+
Processing "src/libs/tcrdisco_da_pfconv_params.lib.tengo"...
|
|
10
|
+
Processing "src/libs/top_frequencies.lib.tengo"...
|
|
11
|
+
Processing "src/libs/top_table_pfconv_params.lib.tengo"...
|
|
12
|
+
Processing "src/main.tpl.tengo"...
|
|
13
|
+
Processing "src/tcr-ab-pairs.tpl.tengo"...
|
|
14
|
+
Processing "src/tcr-analysis.tpl.tengo"...
|
|
15
|
+
No syntax errors found.
|
|
16
|
+
info: Skipping unknown file type: wf.test.ts
|
|
17
|
+
info: Compiling 'dist'...
|
|
18
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/lib/libs.cd_subset_params.lib.tengo
|
|
19
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/lib/libs.tcr_pairs_params.lib.tengo
|
|
20
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/lib/libs.tcrdisco_da_pfconv_params.lib.tengo
|
|
21
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/lib/libs.top_frequencies.lib.tengo
|
|
22
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/lib/libs.top_table_pfconv_params.lib.tengo
|
|
23
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/tpl/tcr-ab-pairs.plj.gz
|
|
24
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/tpl/tcr-analysis.plj.gz
|
|
25
|
+
info: - writing /home/runner/work/tcr-disco/tcr-disco/workflow/dist/tengo/tpl/main.plj.gz
|
|
26
|
+
info: Template Pack build done.
|
|
27
|
+
info: Template Pack build done.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @platforma-open/milaboratories.tcrdisco-enrichment.workflow
|
|
2
|
+
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ede2472: First block version
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [ede2472]
|
|
12
|
+
- @platforma-open/milaboratories.run-tcrdisco-enrichment.software@1.1.0
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
module.exports = { Templates: {
|
|
2
|
+
'tcr-ab-pairs': { type: 'from-file', path: require.resolve('./tengo/tpl/tcr-ab-pairs.plj.gz') },
|
|
3
|
+
'tcr-analysis': { type: 'from-file', path: require.resolve('./tengo/tpl/tcr-analysis.plj.gz') },
|
|
4
|
+
'main': { type: 'from-file', path: require.resolve('./tengo/tpl/main.plj.gz') }
|
|
5
|
+
}};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
export const Templates = {
|
|
3
|
+
'tcr-ab-pairs': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/tcr-ab-pairs.plj.gz') },
|
|
4
|
+
'tcr-analysis': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/tcr-analysis.plj.gz') },
|
|
5
|
+
'main': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/main.plj.gz') }
|
|
6
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
|
|
3
|
+
getColumns := func(countsSpec) {
|
|
4
|
+
field := "differentialTCRAbundance"
|
|
5
|
+
degName := "log2foldchange"
|
|
6
|
+
|
|
7
|
+
axes := [
|
|
8
|
+
{
|
|
9
|
+
column: "clonotypeKey",
|
|
10
|
+
spec: countsSpec.axesSpec[1]
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
columns := [
|
|
15
|
+
{
|
|
16
|
+
column: "subset",
|
|
17
|
+
id: "subset",
|
|
18
|
+
allowNA: true,
|
|
19
|
+
spec: {
|
|
20
|
+
name: "pl7.app/" + field + "/subset",
|
|
21
|
+
valueType: "String",
|
|
22
|
+
annotations: {
|
|
23
|
+
"pl7.app/label": "CD4/CD8 subset",
|
|
24
|
+
"pl7.app/table/visibility": "default",
|
|
25
|
+
"pl7.app/table/orderPriority": "60"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
axes: axes,
|
|
33
|
+
columns: columns,
|
|
34
|
+
"storageFormat": "Parquet",
|
|
35
|
+
"partitionKeyLength": 0
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export ll.toStrict({
|
|
40
|
+
getColumns: getColumns
|
|
41
|
+
})
|
|
42
|
+
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
math := import("math")
|
|
3
|
+
|
|
4
|
+
getColumns := func(countsSpecAlpha, countsSpecBeta) {
|
|
5
|
+
field := "differentialTCRAbundance"
|
|
6
|
+
degName := "log2foldchange"
|
|
7
|
+
|
|
8
|
+
axes := [
|
|
9
|
+
{
|
|
10
|
+
column: "Numerator",
|
|
11
|
+
id: "numerator",
|
|
12
|
+
allowNA: false,
|
|
13
|
+
spec: {
|
|
14
|
+
name: "pl7.app/" + field + "/numerator",
|
|
15
|
+
type: "String",
|
|
16
|
+
annotations: {
|
|
17
|
+
"pl7.app/label": "Numerator"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
column: "tra",
|
|
23
|
+
spec: countsSpecAlpha.axesSpec[1]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
column: "trb",
|
|
27
|
+
spec: countsSpecBeta.axesSpec[1]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
columns := [
|
|
32
|
+
{
|
|
33
|
+
column: "estimate",
|
|
34
|
+
id: "estimate",
|
|
35
|
+
allowNA: true,
|
|
36
|
+
spec: {
|
|
37
|
+
name: "pl7.app/" + field + "/estimate",
|
|
38
|
+
valueType: "Double",
|
|
39
|
+
annotations: {
|
|
40
|
+
"pl7.app/label": "Correlation",
|
|
41
|
+
"pl7.app/table/orderPriority": "70",
|
|
42
|
+
"pl7.app/min":"0",
|
|
43
|
+
"pl7.app/max": "1",
|
|
44
|
+
"pl7.app/table/visibility": "default"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
column: "p.value",
|
|
50
|
+
id: "pvalue",
|
|
51
|
+
allowNA: true,
|
|
52
|
+
spec: {
|
|
53
|
+
name: "pl7.app/" + field + "/pvalue",
|
|
54
|
+
valueType: "Double",
|
|
55
|
+
annotations: {
|
|
56
|
+
"pl7.app/label": "P-value",
|
|
57
|
+
"pl7.app/table/orderPriority": "60",
|
|
58
|
+
"pl7.app/graph/axis/symmetricRange": "0",
|
|
59
|
+
"pl7.app/table/visibility": "optional"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
column: "p.adj",
|
|
65
|
+
id: "padj",
|
|
66
|
+
allowNA: true,
|
|
67
|
+
spec: {
|
|
68
|
+
name: "pl7.app/" + field + "/padj",
|
|
69
|
+
valueType: "Double",
|
|
70
|
+
annotations: {
|
|
71
|
+
"pl7.app/label": "Adjusted p-value",
|
|
72
|
+
"pl7.app/table/orderPriority": "50",
|
|
73
|
+
"pl7.app/table/visibility": "default"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
column: "tra_CDR3aa",
|
|
79
|
+
id: "tra_CDR3aa",
|
|
80
|
+
allowNA: true,
|
|
81
|
+
spec: {
|
|
82
|
+
name: "pl7.app/" + field + "/tra_CDR3aa",
|
|
83
|
+
valueType: "String",
|
|
84
|
+
annotations: {
|
|
85
|
+
"pl7.app/label": "TCR Alpha CDR3 aa",
|
|
86
|
+
"pl7.app/table/orderPriority": "40",
|
|
87
|
+
"pl7.app/table/visibility": "default"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
column: "trb_CDR3aa",
|
|
93
|
+
id: "trb_CDR3aa",
|
|
94
|
+
allowNA: true,
|
|
95
|
+
spec: {
|
|
96
|
+
name: "pl7.app/" + field + "/trb_CDR3aa",
|
|
97
|
+
valueType: "String",
|
|
98
|
+
annotations: {
|
|
99
|
+
"pl7.app/label": "TCR Beta CDR3 aa",
|
|
100
|
+
"pl7.app/table/orderPriority": "30",
|
|
101
|
+
"pl7.app/table/visibility": "default"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
column: "tra_VGene",
|
|
107
|
+
id: "tra_VGene",
|
|
108
|
+
allowNA: true,
|
|
109
|
+
spec: {
|
|
110
|
+
name: "pl7.app/" + field + "/tra_VGene",
|
|
111
|
+
valueType: "String",
|
|
112
|
+
annotations: {
|
|
113
|
+
"pl7.app/label": "TCR Alpha VGene",
|
|
114
|
+
"pl7.app/table/orderPriority": "20",
|
|
115
|
+
"pl7.app/table/visibility": "optional"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
column: "trb_VGene",
|
|
121
|
+
id: "trb_VGene",
|
|
122
|
+
allowNA: true,
|
|
123
|
+
spec: {
|
|
124
|
+
name: "pl7.app/" + field + "/trb_VGene",
|
|
125
|
+
valueType: "String",
|
|
126
|
+
annotations: {
|
|
127
|
+
"pl7.app/label": "TCR Beta VGene",
|
|
128
|
+
"pl7.app/table/orderPriority": "10",
|
|
129
|
+
"pl7.app/table/visibility": "optional"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
column: "is_max_correlation",
|
|
135
|
+
id: "is_max_correlation",
|
|
136
|
+
allowNA: true,
|
|
137
|
+
spec: {
|
|
138
|
+
name: "pl7.app/" + field + "/max_cc_info",
|
|
139
|
+
valueType: "String",
|
|
140
|
+
annotations: {
|
|
141
|
+
"pl7.app/label": "Maximum correlation",
|
|
142
|
+
"pl7.app/table/orderPriority": "5",
|
|
143
|
+
"pl7.app/table/visibility": "optional"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
axes: axes,
|
|
151
|
+
columns: columns,
|
|
152
|
+
"storageFormat": "Parquet",
|
|
153
|
+
"partitionKeyLength": 1
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export ll.toStrict({
|
|
158
|
+
getColumns: getColumns
|
|
159
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
json := import("json")
|
|
3
|
+
|
|
4
|
+
getColumns := func(countsSpec, cdSubsetCol, numerator, comparison) {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
runIdLabel := countsSpec.axesSpec[1].domain["pl7.app/vdj/clonotypingRunId"]
|
|
8
|
+
if runIdLabel == undefined {
|
|
9
|
+
runIdLabel = "pl7.app/vdj/vdjImport"
|
|
10
|
+
} else {
|
|
11
|
+
runIdLabel = "pl7.app/vdj/clonotypingRunId"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
columns := [
|
|
15
|
+
{
|
|
16
|
+
column: "Robust_Enrichment",
|
|
17
|
+
id: "robustEnrichment",
|
|
18
|
+
allowNA: true,
|
|
19
|
+
spec: {
|
|
20
|
+
name: "pl7.app/differentialTCRAbundance/robustEnrichment",
|
|
21
|
+
valueType: "String",
|
|
22
|
+
annotations: {
|
|
23
|
+
"pl7.app/label": "Robust enrichment - " + numerator,
|
|
24
|
+
"pl7.app/table/visibility": "optional",
|
|
25
|
+
"pl7.app/table/orderPriority": "84000",
|
|
26
|
+
"pl7.app/hideDataFromGraphs": "true",
|
|
27
|
+
"pl7.app/isDiscreteFilter": "true",
|
|
28
|
+
"pl7.app/discreteValues": string(json.encode(["Robust", "Non-robust"]))
|
|
29
|
+
},
|
|
30
|
+
domain: {
|
|
31
|
+
runIdLabel: countsSpec.axesSpec[1].domain[runIdLabel],
|
|
32
|
+
"pl7.app/differentialTCRAbundance/comparison": comparison
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
"axes": [
|
|
40
|
+
{
|
|
41
|
+
column: "clonotypeKey",
|
|
42
|
+
spec: countsSpec.axesSpec[1]
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"columns": columns,
|
|
46
|
+
"storageFormat": "Parquet",
|
|
47
|
+
"partitionKeyLength": 0
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export ll.toStrict({
|
|
52
|
+
getColumns: getColumns
|
|
53
|
+
})
|
|
54
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
math := import("math")
|
|
3
|
+
|
|
4
|
+
getColumns := func(countsSpec) {
|
|
5
|
+
field := "differentialTCRAbundance"
|
|
6
|
+
degName := "log2foldchange"
|
|
7
|
+
|
|
8
|
+
axes := [
|
|
9
|
+
{
|
|
10
|
+
column: "internalSampleId",
|
|
11
|
+
spec: countsSpec.axesSpec[0]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
column: "clonotypeKey",
|
|
15
|
+
spec: countsSpec.axesSpec[1]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
columns := [
|
|
20
|
+
{
|
|
21
|
+
column: "fraction",
|
|
22
|
+
id: "fraction",
|
|
23
|
+
allowNA: true,
|
|
24
|
+
spec: {
|
|
25
|
+
name: "pl7.app/" + field + "/countFraction",
|
|
26
|
+
valueType: "Double",
|
|
27
|
+
annotations: {
|
|
28
|
+
"pl7.app/label": "Fraction of counts",
|
|
29
|
+
"pl7.app/table/orderPriority": "100",
|
|
30
|
+
"pl7.app/table/visibility": "default"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
axes: axes,
|
|
38
|
+
columns: columns,
|
|
39
|
+
"storageFormat": "Parquet",
|
|
40
|
+
"partitionKeyLength": 1
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export ll.toStrict({
|
|
45
|
+
getColumns: getColumns
|
|
46
|
+
})
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
math := import("math")
|
|
3
|
+
|
|
4
|
+
getColumns := func(countsSpec, inputType, log2FCThreshold, pAdjFCThreshold, cdSubsetCol, denominators) {
|
|
5
|
+
field := "differentialTCRAbundance"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
thresholds := "[{\"columnId\": {\"name\": \"pl7.app/" + field + "/log2foldchange_mean\",\"valueType\": \"Double\"},\"label\": \"Min LogFC (left vertical)\",\"value\": " + string(-log2FCThreshold) + "},"
|
|
9
|
+
thresholds = thresholds + "{\"columnId\": {\"name\": \"pl7.app/" + field + "/log2foldchange_mean\",\"valueType\": \"Double\"},\"label\": \"Max LogFC (right vertical)\",\"value\": " + string(log2FCThreshold) + "},"
|
|
10
|
+
thresholds = thresholds + "{\"columnId\": {\"name\": \"pl7.app/" + field + "/minlog10padj_mean\",\"valueType\": \"Double\"},\"label\": \"Y bound\",\"value\": " + string(-math.log10(pAdjFCThreshold)) + "}]"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
axes := [
|
|
14
|
+
{
|
|
15
|
+
column: "Contrast",
|
|
16
|
+
id: "contrast",
|
|
17
|
+
allowNA: false,
|
|
18
|
+
spec: {
|
|
19
|
+
name: "pl7.app/" + field + "/contrastGroup",
|
|
20
|
+
type: "String",
|
|
21
|
+
annotations: {
|
|
22
|
+
"pl7.app/label": "Contrast"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
column: "clonotypeKey",
|
|
28
|
+
spec: countsSpec.axesSpec[1]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
columns := [
|
|
33
|
+
{
|
|
34
|
+
column: "CDR3aa",
|
|
35
|
+
id: "cdr3aa",
|
|
36
|
+
allowNA: true,
|
|
37
|
+
spec: {
|
|
38
|
+
name: "pl7.app/" + field + "/cdr3aa",
|
|
39
|
+
valueType: "String",
|
|
40
|
+
annotations: {
|
|
41
|
+
"pl7.app/label": "CDR3 aa",
|
|
42
|
+
"pl7.app/table/orderPriority": "200",
|
|
43
|
+
"pl7.app/table/visibility": "default"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
column: "VGene",
|
|
49
|
+
id: "vgene",
|
|
50
|
+
allowNA: true,
|
|
51
|
+
spec: {
|
|
52
|
+
name: "pl7.app/" + field + "/vgene",
|
|
53
|
+
valueType: "String",
|
|
54
|
+
annotations: {
|
|
55
|
+
"pl7.app/label": "VGene",
|
|
56
|
+
"pl7.app/table/orderPriority": "195",
|
|
57
|
+
"pl7.app/table/visibility": "default"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
column: "log2FoldChange",
|
|
63
|
+
id: "log2foldchange",
|
|
64
|
+
allowNA: true,
|
|
65
|
+
spec: {
|
|
66
|
+
name: "pl7.app/" + field + "/log2foldchange",
|
|
67
|
+
valueType: "Double",
|
|
68
|
+
annotations: {
|
|
69
|
+
"pl7.app/label": "Log2FC",
|
|
70
|
+
"pl7.app/table/orderPriority": "95",
|
|
71
|
+
"pl7.app/graph/axis/symmetricRange": "0",
|
|
72
|
+
"pl7.app/table/visibility": "default"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
column: "pvalue",
|
|
78
|
+
id: "pvalue",
|
|
79
|
+
allowNA: true,
|
|
80
|
+
spec: {
|
|
81
|
+
name: "pl7.app/" + field + "/pvalue",
|
|
82
|
+
valueType: "Double",
|
|
83
|
+
annotations: {
|
|
84
|
+
"pl7.app/label": "P-value",
|
|
85
|
+
"pl7.app/table/orderPriority": "110",
|
|
86
|
+
"pl7.app/table/visibility": "optional"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
column: "padj",
|
|
92
|
+
id: "padj",
|
|
93
|
+
allowNA: true,
|
|
94
|
+
spec: {
|
|
95
|
+
name: "pl7.app/" + field + "/padj",
|
|
96
|
+
valueType: "Double",
|
|
97
|
+
annotations: {
|
|
98
|
+
"pl7.app/label": "Adjusted p-value",
|
|
99
|
+
"pl7.app/table/orderPriority": "105",
|
|
100
|
+
"pl7.app/table/visibility": "default"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
column: "minlog10padj",
|
|
106
|
+
id: "minlog10padj",
|
|
107
|
+
allowNA: true,
|
|
108
|
+
spec: {
|
|
109
|
+
name: "pl7.app/" + field + "/minlog10padj",
|
|
110
|
+
valueType: "Double",
|
|
111
|
+
annotations: {
|
|
112
|
+
"pl7.app/label": "-log10 adjusted p-value",
|
|
113
|
+
"pl7.app/table/orderPriority": "100",
|
|
114
|
+
"pl7.app/table/visibility": "optional"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
column: "Regulation",
|
|
120
|
+
id: "regulationDirection",
|
|
121
|
+
spec: {
|
|
122
|
+
name: "pl7.app/" + field + "/regulationDirection",
|
|
123
|
+
valueType: "String",
|
|
124
|
+
annotations: {
|
|
125
|
+
"pl7.app/label": "Regulation direction",
|
|
126
|
+
"pl7.app/graph/palette": "{\"name\":\"triadic\",\"mapping\":{\"Up\":\"19\",\"Down\":\"22\",\"NS\":\"25\"}}",
|
|
127
|
+
"pl7.app/graph/thresholds": thresholds,
|
|
128
|
+
"pl7.app/table/orderPriority": "80",
|
|
129
|
+
"pl7.app/table/visibility": "optional"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
column: "Robust_Enrichment",
|
|
135
|
+
id: "robustEnrichment",
|
|
136
|
+
spec: {
|
|
137
|
+
name: "pl7.app/" + field + "/robustEnrichment",
|
|
138
|
+
valueType: "String",
|
|
139
|
+
annotations: {
|
|
140
|
+
"pl7.app/label": "Robust enrichment",
|
|
141
|
+
"pl7.app/table/orderPriority": "155",
|
|
142
|
+
"pl7.app/table/visibility": "optional"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
if cdSubsetCol != undefined {
|
|
148
|
+
columns += [{
|
|
149
|
+
column: "subset",
|
|
150
|
+
id: "subset",
|
|
151
|
+
spec: {
|
|
152
|
+
name: "pl7.app/" + field + "/cdsubset",
|
|
153
|
+
valueType: "String",
|
|
154
|
+
annotations: {
|
|
155
|
+
"pl7.app/label": "CD4/CD8 subset",
|
|
156
|
+
"pl7.app/table/visibility": "default",
|
|
157
|
+
"pl7.app/table/orderPriority": "150"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
column: "umi_count_CD4",
|
|
163
|
+
id: "umi_count_CD4",
|
|
164
|
+
spec: {
|
|
165
|
+
name: "pl7.app/" + field + "/umi_count_CD4",
|
|
166
|
+
valueType: "Double",
|
|
167
|
+
annotations: {
|
|
168
|
+
"pl7.app/label": "UMI count CD4",
|
|
169
|
+
"pl7.app/table/visibility": "optional",
|
|
170
|
+
"pl7.app/table/orderPriority": "145"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
column: "umi_freq_CD4",
|
|
176
|
+
id: "umi_freq_CD4",
|
|
177
|
+
spec: {
|
|
178
|
+
name: "pl7.app/" + field + "/umi_freq_CD4",
|
|
179
|
+
valueType: "Double",
|
|
180
|
+
annotations: {
|
|
181
|
+
"pl7.app/label": "UMI frequency CD4",
|
|
182
|
+
"pl7.app/table/visibility": "optional",
|
|
183
|
+
"pl7.app/table/orderPriority": "140"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
column: "umi_count_CD8",
|
|
189
|
+
id: "umi_count_CD8",
|
|
190
|
+
spec: {
|
|
191
|
+
name: "pl7.app/" + field + "/umi_count_CD8",
|
|
192
|
+
valueType: "Double",
|
|
193
|
+
annotations: {
|
|
194
|
+
"pl7.app/label": "UMI count CD8",
|
|
195
|
+
"pl7.app/table/visibility": "optional",
|
|
196
|
+
"pl7.app/table/orderPriority": "135"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
column: "umi_freq_CD8",
|
|
202
|
+
id: "umi_freq_CD8",
|
|
203
|
+
spec: {
|
|
204
|
+
name: "pl7.app/" + field + "/umi_freq_CD8",
|
|
205
|
+
valueType: "Double",
|
|
206
|
+
annotations: {
|
|
207
|
+
"pl7.app/label": "UMI frequency CD8",
|
|
208
|
+
"pl7.app/table/visibility": "optional",
|
|
209
|
+
"pl7.app/table/orderPriority": "130"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
column: "subset_frequency",
|
|
215
|
+
id: "subset_frequency",
|
|
216
|
+
spec: {
|
|
217
|
+
name: "pl7.app/" + field + "/cdsubset_frequency",
|
|
218
|
+
valueType: "Double",
|
|
219
|
+
annotations: {
|
|
220
|
+
"pl7.app/label": "Log(10) major subset frequency",
|
|
221
|
+
"pl7.app/table/visibility": "optional",
|
|
222
|
+
"pl7.app/table/orderPriority": "125"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}]
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
axes: axes,
|
|
230
|
+
columns: columns,
|
|
231
|
+
"storageFormat": "Parquet",
|
|
232
|
+
"partitionKeyLength": 1
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export ll.toStrict({
|
|
237
|
+
getColumns: getColumns
|
|
238
|
+
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/format.el
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
;; This program formats all files inside src directory. Usage: emacs --script ./format.el
|
|
2
|
+
|
|
3
|
+
(defun install-go-mode ()
|
|
4
|
+
"Installs go-mode"
|
|
5
|
+
(require 'package)
|
|
6
|
+
(add-to-list 'package-archives
|
|
7
|
+
'("melpa-stable" . "https://stable.melpa.org/packages/"))
|
|
8
|
+
(package-initialize)
|
|
9
|
+
(unless package-archive-contents
|
|
10
|
+
(package-refresh-contents))
|
|
11
|
+
|
|
12
|
+
(package-install 'go-mode t)
|
|
13
|
+
(require 'go-mode))
|
|
14
|
+
|
|
15
|
+
;; spaces -> tabs only at the beginning of lines
|
|
16
|
+
(setq tabify-regexp "^\t* [ \t]+")
|
|
17
|
+
|
|
18
|
+
(defun format-file (file)
|
|
19
|
+
"Formats a file according to slightly changed Go rules"
|
|
20
|
+
(message "Format %s" file)
|
|
21
|
+
(save-excursion
|
|
22
|
+
(find-file file)
|
|
23
|
+
(delete-trailing-whitespace) ;; deletes whitespaces
|
|
24
|
+
(go-mode) ;; sets golang rules for indentation
|
|
25
|
+
(tabify (point-min) (point-max)) ;; spaces -> tabs in the whole file
|
|
26
|
+
(indent-region (point-min) (point-max)) ;; indentation in the whole file
|
|
27
|
+
(save-buffer))) ;; save file
|
|
28
|
+
|
|
29
|
+
(install-go-mode)
|
|
30
|
+
|
|
31
|
+
;; change syntax of a standard go-mode a bit
|
|
32
|
+
(advice-add
|
|
33
|
+
'go--in-composite-literal-p
|
|
34
|
+
:filter-return
|
|
35
|
+
(lambda (&rest r) t))
|
|
36
|
+
|
|
37
|
+
;; find all files in src
|
|
38
|
+
(setq files (directory-files-recursively "src" "\\.tengo\\'"))
|
|
39
|
+
|
|
40
|
+
;; call format on every file.
|
|
41
|
+
(dolist (file files)
|
|
42
|
+
(format-file file))
|
|
43
|
+
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@platforma-open/milaboratories.tcrdisco-enrichment.workflow",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Block Workflow",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@platforma-sdk/workflow-tengo": "^5.6.4",
|
|
8
|
+
"@platforma-open/milaboratories.run-tcrdisco-enrichment.software": "1.1.0"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@platforma-sdk/tengo-builder": "^2.3.14",
|
|
12
|
+
"@platforma-sdk/test": "^1.46.3",
|
|
13
|
+
"vitest": "~2.1.9"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "rm -rf dist && pl-tengo check && pl-tengo build",
|
|
17
|
+
"test": "vitest",
|
|
18
|
+
"format": "/usr/bin/env emacs --script ./format.el"
|
|
19
|
+
}
|
|
20
|
+
}
|