@sjcrh/proteinpaint-types 2.136.0 → 2.137.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/dist/chunk-Z2VOERJ2.js +339 -0
- package/dist/grin2.js +11 -0
- package/dist/index.js +25 -17
- package/package.json +1 -1
- package/src/dataset.ts +35 -1
- package/src/index.ts +1 -0
- package/src/routes/grin2.ts +119 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__toESM,
|
|
3
|
+
require_lib
|
|
4
|
+
} from "./chunk-CNSSF43V.js";
|
|
5
|
+
|
|
6
|
+
// dist/grin2.ts
|
|
7
|
+
var import_typia = __toESM(require_lib(), 1);
|
|
8
|
+
|
|
9
|
+
// src/routes/grin2.ts
|
|
10
|
+
var GRIN2Payload = {
|
|
11
|
+
request: {
|
|
12
|
+
typeId: "GRIN2Request"
|
|
13
|
+
},
|
|
14
|
+
response: {
|
|
15
|
+
typeId: "GRIN2Response"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// dist/grin2.ts
|
|
20
|
+
var validGRIN2Request = (input) => {
|
|
21
|
+
const errors = [];
|
|
22
|
+
const __is = (input2) => {
|
|
23
|
+
const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && true && (void 0 === input3.snvindelOptions || "object" === typeof input3.snvindelOptions && null !== input3.snvindelOptions && false === Array.isArray(input3.snvindelOptions) && $io1(input3.snvindelOptions)) && (void 0 === input3.cnvOptions || "object" === typeof input3.cnvOptions && null !== input3.cnvOptions && false === Array.isArray(input3.cnvOptions) && $io2(input3.cnvOptions)) && (void 0 === input3.fusionOptions || "object" === typeof input3.fusionOptions && null !== input3.fusionOptions && false === Array.isArray(input3.fusionOptions) && $io3(input3.fusionOptions));
|
|
24
|
+
const $io1 = (input3) => (void 0 === input3.minTotalDepth || "number" === typeof input3.minTotalDepth) && (void 0 === input3.minAltAlleleCount || "number" === typeof input3.minAltAlleleCount) && (void 0 === input3.consequences || Array.isArray(input3.consequences) && input3.consequences.every((elem) => "string" === typeof elem)) && (void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator);
|
|
25
|
+
const $io2 = (input3) => (void 0 === input3.lossThreshold || "number" === typeof input3.lossThreshold) && (void 0 === input3.gainThreshold || "number" === typeof input3.gainThreshold) && (void 0 === input3.maxSegLength || "number" === typeof input3.maxSegLength) && (void 0 === input3.minSegLength || "number" === typeof input3.minSegLength) && (void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator);
|
|
26
|
+
const $io3 = (input3) => (void 0 === input3.fusionTypes || Array.isArray(input3.fusionTypes) && input3.fusionTypes.every((elem) => "gene-gene" === elem || "gene-intergenic" === elem || "readthrough" === elem)) && (void 0 === input3.minConfidence || "number" === typeof input3.minConfidence);
|
|
27
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
28
|
+
};
|
|
29
|
+
if (false === __is(input)) {
|
|
30
|
+
const $report = import_typia.createValidate.report(errors);
|
|
31
|
+
((input2, _path, _exceptionable = true) => {
|
|
32
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.genome || $report(_exceptionable2, {
|
|
33
|
+
path: _path2 + ".genome",
|
|
34
|
+
expected: "string",
|
|
35
|
+
value: input3.genome
|
|
36
|
+
}), "string" === typeof input3.dslabel || $report(_exceptionable2, {
|
|
37
|
+
path: _path2 + ".dslabel",
|
|
38
|
+
expected: "string",
|
|
39
|
+
value: input3.dslabel
|
|
40
|
+
}), true, void 0 === input3.snvindelOptions || ("object" === typeof input3.snvindelOptions && null !== input3.snvindelOptions && false === Array.isArray(input3.snvindelOptions) || $report(_exceptionable2, {
|
|
41
|
+
path: _path2 + ".snvindelOptions",
|
|
42
|
+
expected: "(__type | undefined)",
|
|
43
|
+
value: input3.snvindelOptions
|
|
44
|
+
})) && $vo1(input3.snvindelOptions, _path2 + ".snvindelOptions", _exceptionable2) || $report(_exceptionable2, {
|
|
45
|
+
path: _path2 + ".snvindelOptions",
|
|
46
|
+
expected: "(__type | undefined)",
|
|
47
|
+
value: input3.snvindelOptions
|
|
48
|
+
}), void 0 === input3.cnvOptions || ("object" === typeof input3.cnvOptions && null !== input3.cnvOptions && false === Array.isArray(input3.cnvOptions) || $report(_exceptionable2, {
|
|
49
|
+
path: _path2 + ".cnvOptions",
|
|
50
|
+
expected: "(__type.o1 | undefined)",
|
|
51
|
+
value: input3.cnvOptions
|
|
52
|
+
})) && $vo2(input3.cnvOptions, _path2 + ".cnvOptions", _exceptionable2) || $report(_exceptionable2, {
|
|
53
|
+
path: _path2 + ".cnvOptions",
|
|
54
|
+
expected: "(__type.o1 | undefined)",
|
|
55
|
+
value: input3.cnvOptions
|
|
56
|
+
}), void 0 === input3.fusionOptions || ("object" === typeof input3.fusionOptions && null !== input3.fusionOptions && false === Array.isArray(input3.fusionOptions) || $report(_exceptionable2, {
|
|
57
|
+
path: _path2 + ".fusionOptions",
|
|
58
|
+
expected: "(__type.o2 | undefined)",
|
|
59
|
+
value: input3.fusionOptions
|
|
60
|
+
})) && $vo3(input3.fusionOptions, _path2 + ".fusionOptions", _exceptionable2) || $report(_exceptionable2, {
|
|
61
|
+
path: _path2 + ".fusionOptions",
|
|
62
|
+
expected: "(__type.o2 | undefined)",
|
|
63
|
+
value: input3.fusionOptions
|
|
64
|
+
})].every((flag) => flag);
|
|
65
|
+
const $vo1 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.minTotalDepth || "number" === typeof input3.minTotalDepth || $report(_exceptionable2, {
|
|
66
|
+
path: _path2 + ".minTotalDepth",
|
|
67
|
+
expected: "(number | undefined)",
|
|
68
|
+
value: input3.minTotalDepth
|
|
69
|
+
}), void 0 === input3.minAltAlleleCount || "number" === typeof input3.minAltAlleleCount || $report(_exceptionable2, {
|
|
70
|
+
path: _path2 + ".minAltAlleleCount",
|
|
71
|
+
expected: "(number | undefined)",
|
|
72
|
+
value: input3.minAltAlleleCount
|
|
73
|
+
}), void 0 === input3.consequences || (Array.isArray(input3.consequences) || $report(_exceptionable2, {
|
|
74
|
+
path: _path2 + ".consequences",
|
|
75
|
+
expected: "(Array<string> | undefined)",
|
|
76
|
+
value: input3.consequences
|
|
77
|
+
})) && input3.consequences.map((elem, _index1) => "string" === typeof elem || $report(_exceptionable2, {
|
|
78
|
+
path: _path2 + ".consequences[" + _index1 + "]",
|
|
79
|
+
expected: "string",
|
|
80
|
+
value: elem
|
|
81
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
82
|
+
path: _path2 + ".consequences",
|
|
83
|
+
expected: "(Array<string> | undefined)",
|
|
84
|
+
value: input3.consequences
|
|
85
|
+
}), void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator || $report(_exceptionable2, {
|
|
86
|
+
path: _path2 + ".hyperMutator",
|
|
87
|
+
expected: "(number | undefined)",
|
|
88
|
+
value: input3.hyperMutator
|
|
89
|
+
})].every((flag) => flag);
|
|
90
|
+
const $vo2 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.lossThreshold || "number" === typeof input3.lossThreshold || $report(_exceptionable2, {
|
|
91
|
+
path: _path2 + ".lossThreshold",
|
|
92
|
+
expected: "(number | undefined)",
|
|
93
|
+
value: input3.lossThreshold
|
|
94
|
+
}), void 0 === input3.gainThreshold || "number" === typeof input3.gainThreshold || $report(_exceptionable2, {
|
|
95
|
+
path: _path2 + ".gainThreshold",
|
|
96
|
+
expected: "(number | undefined)",
|
|
97
|
+
value: input3.gainThreshold
|
|
98
|
+
}), void 0 === input3.maxSegLength || "number" === typeof input3.maxSegLength || $report(_exceptionable2, {
|
|
99
|
+
path: _path2 + ".maxSegLength",
|
|
100
|
+
expected: "(number | undefined)",
|
|
101
|
+
value: input3.maxSegLength
|
|
102
|
+
}), void 0 === input3.minSegLength || "number" === typeof input3.minSegLength || $report(_exceptionable2, {
|
|
103
|
+
path: _path2 + ".minSegLength",
|
|
104
|
+
expected: "(number | undefined)",
|
|
105
|
+
value: input3.minSegLength
|
|
106
|
+
}), void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator || $report(_exceptionable2, {
|
|
107
|
+
path: _path2 + ".hyperMutator",
|
|
108
|
+
expected: "(number | undefined)",
|
|
109
|
+
value: input3.hyperMutator
|
|
110
|
+
})].every((flag) => flag);
|
|
111
|
+
const $vo3 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.fusionTypes || (Array.isArray(input3.fusionTypes) || $report(_exceptionable2, {
|
|
112
|
+
path: _path2 + ".fusionTypes",
|
|
113
|
+
expected: '(Array<"gene-gene" | "gene-intergenic" | "readthrough"> | undefined)',
|
|
114
|
+
value: input3.fusionTypes
|
|
115
|
+
})) && input3.fusionTypes.map((elem, _index2) => "gene-gene" === elem || "gene-intergenic" === elem || "readthrough" === elem || $report(_exceptionable2, {
|
|
116
|
+
path: _path2 + ".fusionTypes[" + _index2 + "]",
|
|
117
|
+
expected: '("gene-gene" | "gene-intergenic" | "readthrough")',
|
|
118
|
+
value: elem
|
|
119
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
120
|
+
path: _path2 + ".fusionTypes",
|
|
121
|
+
expected: '(Array<"gene-gene" | "gene-intergenic" | "readthrough"> | undefined)',
|
|
122
|
+
value: input3.fusionTypes
|
|
123
|
+
}), void 0 === input3.minConfidence || "number" === typeof input3.minConfidence || $report(_exceptionable2, {
|
|
124
|
+
path: _path2 + ".minConfidence",
|
|
125
|
+
expected: "(number | undefined)",
|
|
126
|
+
value: input3.minConfidence
|
|
127
|
+
})].every((flag) => flag);
|
|
128
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
129
|
+
path: _path + "",
|
|
130
|
+
expected: "GRIN2Request",
|
|
131
|
+
value: input2
|
|
132
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
133
|
+
path: _path + "",
|
|
134
|
+
expected: "GRIN2Request",
|
|
135
|
+
value: input2
|
|
136
|
+
});
|
|
137
|
+
})(input, "$input", true);
|
|
138
|
+
}
|
|
139
|
+
const success = 0 === errors.length;
|
|
140
|
+
return {
|
|
141
|
+
success,
|
|
142
|
+
errors,
|
|
143
|
+
data: success ? input : void 0
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
var validGRIN2Response = (input) => {
|
|
147
|
+
const errors = [];
|
|
148
|
+
const __is = (input2) => {
|
|
149
|
+
const $io0 = (input3) => ("success" === input3.status || "error" === input3.status) && (void 0 === input3.error || "string" === typeof input3.error) && (void 0 === input3.pngImg || "string" === typeof input3.pngImg) && true && (void 0 === input3.topGeneTable || "object" === typeof input3.topGeneTable && null !== input3.topGeneTable && $io1(input3.topGeneTable)) && (void 0 === input3.totalGenes || "number" === typeof input3.totalGenes) && (void 0 === input3.showingTop || "number" === typeof input3.showingTop) && (void 0 === input3.timing || "object" === typeof input3.timing && null !== input3.timing && $io4(input3.timing)) && (void 0 === input3.processingSummary || "object" === typeof input3.processingSummary && null !== input3.processingSummary && $io5(input3.processingSummary));
|
|
150
|
+
const $io1 = (input3) => Array.isArray(input3.columns) && input3.columns.every((elem) => "object" === typeof elem && null !== elem && $io2(elem)) && (Array.isArray(input3.rows) && input3.rows.every((elem) => Array.isArray(elem) && elem.every((elem2) => "object" === typeof elem2 && null !== elem2 && $io3(elem2))));
|
|
151
|
+
const $io2 = (input3) => "string" === typeof input3.label && "boolean" === typeof input3.sortable;
|
|
152
|
+
const $io3 = (input3) => "string" === typeof input3.value || "number" === typeof input3.value;
|
|
153
|
+
const $io4 = (input3) => "number" === typeof input3.processingTime && "number" === typeof input3.grin2Time && "number" === typeof input3.totalTime;
|
|
154
|
+
const $io5 = (input3) => "number" === typeof input3.totalSamples && "number" === typeof input3.successfulSamples && "number" === typeof input3.failedSamples && (Array.isArray(input3.failedFiles) && input3.failedFiles.every((elem) => "object" === typeof elem && null !== elem && $io6(elem)));
|
|
155
|
+
const $io6 = (input3) => "string" === typeof input3.sampleName && "string" === typeof input3.filePath && "string" === typeof input3.error;
|
|
156
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
157
|
+
};
|
|
158
|
+
if (false === __is(input)) {
|
|
159
|
+
const $report = import_typia.createValidate.report(errors);
|
|
160
|
+
((input2, _path, _exceptionable = true) => {
|
|
161
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["success" === input3.status || "error" === input3.status || $report(_exceptionable2, {
|
|
162
|
+
path: _path2 + ".status",
|
|
163
|
+
expected: '("error" | "success")',
|
|
164
|
+
value: input3.status
|
|
165
|
+
}), void 0 === input3.error || "string" === typeof input3.error || $report(_exceptionable2, {
|
|
166
|
+
path: _path2 + ".error",
|
|
167
|
+
expected: "(string | undefined)",
|
|
168
|
+
value: input3.error
|
|
169
|
+
}), void 0 === input3.pngImg || "string" === typeof input3.pngImg || $report(_exceptionable2, {
|
|
170
|
+
path: _path2 + ".pngImg",
|
|
171
|
+
expected: "(string | undefined)",
|
|
172
|
+
value: input3.pngImg
|
|
173
|
+
}), true, void 0 === input3.topGeneTable || ("object" === typeof input3.topGeneTable && null !== input3.topGeneTable || $report(_exceptionable2, {
|
|
174
|
+
path: _path2 + ".topGeneTable",
|
|
175
|
+
expected: "(__type | undefined)",
|
|
176
|
+
value: input3.topGeneTable
|
|
177
|
+
})) && $vo1(input3.topGeneTable, _path2 + ".topGeneTable", _exceptionable2) || $report(_exceptionable2, {
|
|
178
|
+
path: _path2 + ".topGeneTable",
|
|
179
|
+
expected: "(__type | undefined)",
|
|
180
|
+
value: input3.topGeneTable
|
|
181
|
+
}), void 0 === input3.totalGenes || "number" === typeof input3.totalGenes || $report(_exceptionable2, {
|
|
182
|
+
path: _path2 + ".totalGenes",
|
|
183
|
+
expected: "(number | undefined)",
|
|
184
|
+
value: input3.totalGenes
|
|
185
|
+
}), void 0 === input3.showingTop || "number" === typeof input3.showingTop || $report(_exceptionable2, {
|
|
186
|
+
path: _path2 + ".showingTop",
|
|
187
|
+
expected: "(number | undefined)",
|
|
188
|
+
value: input3.showingTop
|
|
189
|
+
}), void 0 === input3.timing || ("object" === typeof input3.timing && null !== input3.timing || $report(_exceptionable2, {
|
|
190
|
+
path: _path2 + ".timing",
|
|
191
|
+
expected: "(__type.o3 | undefined)",
|
|
192
|
+
value: input3.timing
|
|
193
|
+
})) && $vo4(input3.timing, _path2 + ".timing", _exceptionable2) || $report(_exceptionable2, {
|
|
194
|
+
path: _path2 + ".timing",
|
|
195
|
+
expected: "(__type.o3 | undefined)",
|
|
196
|
+
value: input3.timing
|
|
197
|
+
}), void 0 === input3.processingSummary || ("object" === typeof input3.processingSummary && null !== input3.processingSummary || $report(_exceptionable2, {
|
|
198
|
+
path: _path2 + ".processingSummary",
|
|
199
|
+
expected: "(__type.o4 | undefined)",
|
|
200
|
+
value: input3.processingSummary
|
|
201
|
+
})) && $vo5(input3.processingSummary, _path2 + ".processingSummary", _exceptionable2) || $report(_exceptionable2, {
|
|
202
|
+
path: _path2 + ".processingSummary",
|
|
203
|
+
expected: "(__type.o4 | undefined)",
|
|
204
|
+
value: input3.processingSummary
|
|
205
|
+
})].every((flag) => flag);
|
|
206
|
+
const $vo1 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.columns) || $report(_exceptionable2, {
|
|
207
|
+
path: _path2 + ".columns",
|
|
208
|
+
expected: "Array<__type>",
|
|
209
|
+
value: input3.columns
|
|
210
|
+
})) && input3.columns.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
211
|
+
path: _path2 + ".columns[" + _index1 + "]",
|
|
212
|
+
expected: "__type.o1",
|
|
213
|
+
value: elem
|
|
214
|
+
})) && $vo2(elem, _path2 + ".columns[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
215
|
+
path: _path2 + ".columns[" + _index1 + "]",
|
|
216
|
+
expected: "__type.o1",
|
|
217
|
+
value: elem
|
|
218
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
219
|
+
path: _path2 + ".columns",
|
|
220
|
+
expected: "Array<__type>",
|
|
221
|
+
value: input3.columns
|
|
222
|
+
}), (Array.isArray(input3.rows) || $report(_exceptionable2, {
|
|
223
|
+
path: _path2 + ".rows",
|
|
224
|
+
expected: "Array<Array<__type>>",
|
|
225
|
+
value: input3.rows
|
|
226
|
+
})) && input3.rows.map((elem, _index2) => (Array.isArray(elem) || $report(_exceptionable2, {
|
|
227
|
+
path: _path2 + ".rows[" + _index2 + "]",
|
|
228
|
+
expected: "Array<__type>.o1",
|
|
229
|
+
value: elem
|
|
230
|
+
})) && elem.map((elem2, _index3) => ("object" === typeof elem2 && null !== elem2 || $report(_exceptionable2, {
|
|
231
|
+
path: _path2 + ".rows[" + _index2 + "][" + _index3 + "]",
|
|
232
|
+
expected: "__type.o2",
|
|
233
|
+
value: elem2
|
|
234
|
+
})) && $vo3(elem2, _path2 + ".rows[" + _index2 + "][" + _index3 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
235
|
+
path: _path2 + ".rows[" + _index2 + "][" + _index3 + "]",
|
|
236
|
+
expected: "__type.o2",
|
|
237
|
+
value: elem2
|
|
238
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
239
|
+
path: _path2 + ".rows[" + _index2 + "]",
|
|
240
|
+
expected: "Array<__type>.o1",
|
|
241
|
+
value: elem
|
|
242
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
243
|
+
path: _path2 + ".rows",
|
|
244
|
+
expected: "Array<Array<__type>>",
|
|
245
|
+
value: input3.rows
|
|
246
|
+
})].every((flag) => flag);
|
|
247
|
+
const $vo2 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.label || $report(_exceptionable2, {
|
|
248
|
+
path: _path2 + ".label",
|
|
249
|
+
expected: "string",
|
|
250
|
+
value: input3.label
|
|
251
|
+
}), "boolean" === typeof input3.sortable || $report(_exceptionable2, {
|
|
252
|
+
path: _path2 + ".sortable",
|
|
253
|
+
expected: "boolean",
|
|
254
|
+
value: input3.sortable
|
|
255
|
+
})].every((flag) => flag);
|
|
256
|
+
const $vo3 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.value || "number" === typeof input3.value || $report(_exceptionable2, {
|
|
257
|
+
path: _path2 + ".value",
|
|
258
|
+
expected: "(number | string)",
|
|
259
|
+
value: input3.value
|
|
260
|
+
})].every((flag) => flag);
|
|
261
|
+
const $vo4 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.processingTime || $report(_exceptionable2, {
|
|
262
|
+
path: _path2 + ".processingTime",
|
|
263
|
+
expected: "number",
|
|
264
|
+
value: input3.processingTime
|
|
265
|
+
}), "number" === typeof input3.grin2Time || $report(_exceptionable2, {
|
|
266
|
+
path: _path2 + ".grin2Time",
|
|
267
|
+
expected: "number",
|
|
268
|
+
value: input3.grin2Time
|
|
269
|
+
}), "number" === typeof input3.totalTime || $report(_exceptionable2, {
|
|
270
|
+
path: _path2 + ".totalTime",
|
|
271
|
+
expected: "number",
|
|
272
|
+
value: input3.totalTime
|
|
273
|
+
})].every((flag) => flag);
|
|
274
|
+
const $vo5 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.totalSamples || $report(_exceptionable2, {
|
|
275
|
+
path: _path2 + ".totalSamples",
|
|
276
|
+
expected: "number",
|
|
277
|
+
value: input3.totalSamples
|
|
278
|
+
}), "number" === typeof input3.successfulSamples || $report(_exceptionable2, {
|
|
279
|
+
path: _path2 + ".successfulSamples",
|
|
280
|
+
expected: "number",
|
|
281
|
+
value: input3.successfulSamples
|
|
282
|
+
}), "number" === typeof input3.failedSamples || $report(_exceptionable2, {
|
|
283
|
+
path: _path2 + ".failedSamples",
|
|
284
|
+
expected: "number",
|
|
285
|
+
value: input3.failedSamples
|
|
286
|
+
}), (Array.isArray(input3.failedFiles) || $report(_exceptionable2, {
|
|
287
|
+
path: _path2 + ".failedFiles",
|
|
288
|
+
expected: "Array<__type>.o2",
|
|
289
|
+
value: input3.failedFiles
|
|
290
|
+
})) && input3.failedFiles.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
291
|
+
path: _path2 + ".failedFiles[" + _index4 + "]",
|
|
292
|
+
expected: "__type.o5",
|
|
293
|
+
value: elem
|
|
294
|
+
})) && $vo6(elem, _path2 + ".failedFiles[" + _index4 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
295
|
+
path: _path2 + ".failedFiles[" + _index4 + "]",
|
|
296
|
+
expected: "__type.o5",
|
|
297
|
+
value: elem
|
|
298
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
299
|
+
path: _path2 + ".failedFiles",
|
|
300
|
+
expected: "Array<__type>.o2",
|
|
301
|
+
value: input3.failedFiles
|
|
302
|
+
})].every((flag) => flag);
|
|
303
|
+
const $vo6 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.sampleName || $report(_exceptionable2, {
|
|
304
|
+
path: _path2 + ".sampleName",
|
|
305
|
+
expected: "string",
|
|
306
|
+
value: input3.sampleName
|
|
307
|
+
}), "string" === typeof input3.filePath || $report(_exceptionable2, {
|
|
308
|
+
path: _path2 + ".filePath",
|
|
309
|
+
expected: "string",
|
|
310
|
+
value: input3.filePath
|
|
311
|
+
}), "string" === typeof input3.error || $report(_exceptionable2, {
|
|
312
|
+
path: _path2 + ".error",
|
|
313
|
+
expected: "string",
|
|
314
|
+
value: input3.error
|
|
315
|
+
})].every((flag) => flag);
|
|
316
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
317
|
+
path: _path + "",
|
|
318
|
+
expected: "GRIN2Response",
|
|
319
|
+
value: input2
|
|
320
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
321
|
+
path: _path + "",
|
|
322
|
+
expected: "GRIN2Response",
|
|
323
|
+
value: input2
|
|
324
|
+
});
|
|
325
|
+
})(input, "$input", true);
|
|
326
|
+
}
|
|
327
|
+
const success = 0 === errors.length;
|
|
328
|
+
return {
|
|
329
|
+
success,
|
|
330
|
+
errors,
|
|
331
|
+
data: success ? input : void 0
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export {
|
|
336
|
+
GRIN2Payload,
|
|
337
|
+
validGRIN2Request,
|
|
338
|
+
validGRIN2Response
|
|
339
|
+
};
|
package/dist/grin2.js
ADDED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
topMutatedGenePayload,
|
|
3
|
+
validtopMutatedGeneRequest,
|
|
4
|
+
validtopMutatedGeneResponse
|
|
5
|
+
} from "./chunk-YGX6BZZY.js";
|
|
1
6
|
import {
|
|
2
7
|
termdbTopTermsByTypePayload,
|
|
3
8
|
validTermdbTopTermsByTypeRequest,
|
|
@@ -28,6 +33,11 @@ import {
|
|
|
28
33
|
validWSISamplesResponse,
|
|
29
34
|
wsiSamplesPayload
|
|
30
35
|
} from "./chunk-W6NLM363.js";
|
|
36
|
+
import {
|
|
37
|
+
rootTermPayload,
|
|
38
|
+
validRootTermRequest,
|
|
39
|
+
validRootTermResponse
|
|
40
|
+
} from "./chunk-AASWRJMS.js";
|
|
31
41
|
import {
|
|
32
42
|
termdbSampleImagesPayload,
|
|
33
43
|
validTermdbSampleImagesRequest,
|
|
@@ -64,10 +74,10 @@ import {
|
|
|
64
74
|
validTermsByIdsResponse
|
|
65
75
|
} from "./chunk-HLGKC33X.js";
|
|
66
76
|
import {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} from "./chunk-
|
|
77
|
+
boxplotPayload,
|
|
78
|
+
validBoxPlotRequest,
|
|
79
|
+
validBoxPlotResponse
|
|
80
|
+
} from "./chunk-VMZC4IN7.js";
|
|
71
81
|
import {
|
|
72
82
|
termdbCategoriesPayload,
|
|
73
83
|
validCategoriesRequest,
|
|
@@ -104,10 +114,10 @@ import {
|
|
|
104
114
|
validPercentileResponse
|
|
105
115
|
} from "./chunk-GVBBTRW4.js";
|
|
106
116
|
import {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
} from "./chunk-
|
|
117
|
+
ntseqPayload,
|
|
118
|
+
validNtseqRequest,
|
|
119
|
+
validNtseqResponse
|
|
120
|
+
} from "./chunk-HIPWQ6AW.js";
|
|
111
121
|
import {
|
|
112
122
|
pdomainPayload,
|
|
113
123
|
validPdomainRequest,
|
|
@@ -144,10 +154,10 @@ import {
|
|
|
144
154
|
validDEResponse
|
|
145
155
|
} from "./chunk-3C26VWPU.js";
|
|
146
156
|
import {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} from "./chunk-
|
|
157
|
+
GRIN2Payload,
|
|
158
|
+
validGRIN2Request,
|
|
159
|
+
validGRIN2Response
|
|
160
|
+
} from "./chunk-Z2VOERJ2.js";
|
|
151
161
|
import {
|
|
152
162
|
healthcheckPayload,
|
|
153
163
|
validHealthCheckRequest,
|
|
@@ -178,11 +188,6 @@ import {
|
|
|
178
188
|
validIsoformLstRequest,
|
|
179
189
|
validIsoformLstResponse
|
|
180
190
|
} from "./chunk-B43GFRT4.js";
|
|
181
|
-
import {
|
|
182
|
-
ntseqPayload,
|
|
183
|
-
validNtseqRequest,
|
|
184
|
-
validNtseqResponse
|
|
185
|
-
} from "./chunk-HIPWQ6AW.js";
|
|
186
191
|
import {
|
|
187
192
|
dzImagesPayload,
|
|
188
193
|
validDZImagesRequest,
|
|
@@ -267,6 +272,7 @@ import "./chunk-CNSSF43V.js";
|
|
|
267
272
|
export {
|
|
268
273
|
CorrelationVolcanoPayload,
|
|
269
274
|
FilterTermValuesPayload,
|
|
275
|
+
GRIN2Payload,
|
|
270
276
|
GdcMafPayload,
|
|
271
277
|
ProfileFormScoresPayload,
|
|
272
278
|
ProfileScoresPayload,
|
|
@@ -341,6 +347,8 @@ export {
|
|
|
341
347
|
validDsDataResponse,
|
|
342
348
|
validFilterTermValuesRequest,
|
|
343
349
|
validFilterTermValuesResponse,
|
|
350
|
+
validGRIN2Request,
|
|
351
|
+
validGRIN2Response,
|
|
344
352
|
validGdcGRIN2listRequest,
|
|
345
353
|
validGdcGRIN2listResponse,
|
|
346
354
|
validGdcMafBuildRequest,
|
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -371,11 +371,45 @@ type SvFusion = {
|
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
type SingleSampleMutationQuery = {
|
|
374
|
+
/** for native ds, each file should contain a stringified json array with elements below
|
|
375
|
+
for non-native ds, the getter should return an json array with same structure:
|
|
376
|
+
|
|
377
|
+
cnv example entry:
|
|
378
|
+
{
|
|
379
|
+
"chromosome": "chr1",
|
|
380
|
+
"start": 123456,
|
|
381
|
+
"end": 123789,
|
|
382
|
+
"type": "cnv",
|
|
383
|
+
"log2Ratio": null
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
snvindel example entry:
|
|
387
|
+
{
|
|
388
|
+
"chromosome": "chr1",
|
|
389
|
+
"start": 123456,
|
|
390
|
+
"end": 123789,
|
|
391
|
+
"type": "snvindel"
|
|
392
|
+
}
|
|
393
|
+
TODO specify property names for read depth; needed for grin2 filtering
|
|
394
|
+
|
|
395
|
+
fusion example entry:
|
|
396
|
+
{
|
|
397
|
+
"chromosome": "chr1",
|
|
398
|
+
"start": 123456,
|
|
399
|
+
"end": 123789,
|
|
400
|
+
"type": "fusion",
|
|
401
|
+
"fusionType": null,
|
|
402
|
+
"confidence": null
|
|
403
|
+
}
|
|
404
|
+
*/
|
|
374
405
|
src: 'native' | 'gdcapi' | string
|
|
375
406
|
/** which property of client mutation object to retrieve sample identifier for
|
|
376
407
|
* querying single sample data with */
|
|
377
408
|
sample_id_key: string
|
|
378
|
-
/** only required for src=native
|
|
409
|
+
/** only required for src=native
|
|
410
|
+
folder contains a set of files, one file per sample, file named by sample name
|
|
411
|
+
each file contains a stringified json array of mutation/cnv/sv entries (aka mlst)
|
|
412
|
+
*/
|
|
379
413
|
folder?: string
|
|
380
414
|
/** disco plot will be launched when singleSampleMutation is enabled. supply customization options here */
|
|
381
415
|
discoPlot?: {
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './routes/filter.gdc.ts'
|
|
|
18
18
|
export * from './routes/gdc.maf.ts'
|
|
19
19
|
export * from './routes/gdc.mafBuild.ts'
|
|
20
20
|
export * from './routes/gdc.grin2.ts'
|
|
21
|
+
export * from './routes/grin2.ts'
|
|
21
22
|
export * from './routes/termdb.topMutatedGenes.ts'
|
|
22
23
|
export * from './routes/genelookup.ts'
|
|
23
24
|
export * from './routes/genesetEnrichment.ts'
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/** General GRIN2 route
|
|
2
|
+
* This route handles the GRIN2 analysis for any non-GDC data.
|
|
3
|
+
* It processes the incoming data structure via PP's existing filter infrastructure
|
|
4
|
+
* and returns the same structured results as GDC-GRIN2.
|
|
5
|
+
* Specifically it will return a sortable table of top mutated genes and
|
|
6
|
+
* a static PNG manhattan-like plot of the -log10(q-value).
|
|
7
|
+
* We allow the user to customize the snvindel, CNV, and fusion filtering options.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { RoutePayload } from './routeApi.js'
|
|
11
|
+
|
|
12
|
+
/** GRIN2 request */
|
|
13
|
+
export type GRIN2Request = {
|
|
14
|
+
/** Genome build identifier (e.g., 'hg38', 'hg19') */
|
|
15
|
+
genome: string
|
|
16
|
+
|
|
17
|
+
/** Dataset label within the genome */
|
|
18
|
+
dslabel: string
|
|
19
|
+
|
|
20
|
+
/** Filter from existing PP infrastructure */
|
|
21
|
+
filter: any // Filter object passed to get_samples(filter, ds)
|
|
22
|
+
|
|
23
|
+
/** Options for filtering SNV/indel file content */
|
|
24
|
+
snvindelOptions?: {
|
|
25
|
+
/** Minimum total depth of returned SNV/indel files */
|
|
26
|
+
minTotalDepth?: number // Default: 10
|
|
27
|
+
/** Minimum alternate allele count of returned SNV/indel files */
|
|
28
|
+
minAltAlleleCount?: number // Default: 2
|
|
29
|
+
/** String array of consequence types to include */
|
|
30
|
+
consequences?: string[]
|
|
31
|
+
/** Maximum mutation count cutoff for highly mutated scenarios */
|
|
32
|
+
hyperMutator?: number // Default: 1000
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Options for filtering CNV file content */
|
|
36
|
+
cnvOptions?: {
|
|
37
|
+
/** Threshold for copy number loss detection */
|
|
38
|
+
lossThreshold?: number // Default: -0.4
|
|
39
|
+
/** Threshold for copy number gain detection */
|
|
40
|
+
gainThreshold?: number // Default: 0.3
|
|
41
|
+
/** Maximum segment length to include (0 = no filter) */
|
|
42
|
+
maxSegLength?: number // Default: 0
|
|
43
|
+
/** Minimum segment length to include (0 = no filter) */
|
|
44
|
+
minSegLength?: number // Default: 0
|
|
45
|
+
/** Hypermutator max cut off for CNVs per case */
|
|
46
|
+
hyperMutator?: number // Default: 500
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Options for filtering fusion file content */
|
|
50
|
+
fusionOptions?: {
|
|
51
|
+
/** Filter by fusion type */
|
|
52
|
+
fusionTypes?: ('gene-gene' | 'gene-intergenic' | 'readthrough')[]
|
|
53
|
+
/** Minimum confidence score (0-1) */
|
|
54
|
+
minConfidence?: number // Default: 0.7
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Response for GRIN2 analysis run
|
|
60
|
+
*/
|
|
61
|
+
export type GRIN2Response = {
|
|
62
|
+
/** Status of the analysis */
|
|
63
|
+
status: 'success' | 'error'
|
|
64
|
+
/** Error message if status is 'error' */
|
|
65
|
+
error?: string
|
|
66
|
+
/** Base64-encoded PNG Manhattan plot image */
|
|
67
|
+
pngImg?: string
|
|
68
|
+
/** Download status/info */
|
|
69
|
+
download?: any
|
|
70
|
+
/** Sortable table of top genes identified by GRIN2 */
|
|
71
|
+
topGeneTable?: {
|
|
72
|
+
/** Column definitions with labels and sort capabilities */
|
|
73
|
+
columns: Array<{
|
|
74
|
+
label: string
|
|
75
|
+
sortable: boolean
|
|
76
|
+
}>
|
|
77
|
+
/** Data rows with gene information and statistics */
|
|
78
|
+
rows: Array<
|
|
79
|
+
Array<{
|
|
80
|
+
value: string | number
|
|
81
|
+
}>
|
|
82
|
+
>
|
|
83
|
+
}
|
|
84
|
+
/** Summary statistics */
|
|
85
|
+
totalGenes?: number
|
|
86
|
+
showingTop?: number
|
|
87
|
+
/** Timing info for the analysis */
|
|
88
|
+
timing?: {
|
|
89
|
+
/** Time taken to run data processing */
|
|
90
|
+
processingTime: number
|
|
91
|
+
/** Time taken to run GRIN2 processing */
|
|
92
|
+
grin2Time: number
|
|
93
|
+
/** Total time taken for the entire run */
|
|
94
|
+
totalTime: number
|
|
95
|
+
}
|
|
96
|
+
/** Detailed processing summary */
|
|
97
|
+
processingSummary?: {
|
|
98
|
+
totalSamples: number
|
|
99
|
+
successfulSamples: number
|
|
100
|
+
failedSamples: number
|
|
101
|
+
failedFiles: Array<{
|
|
102
|
+
sampleName: string
|
|
103
|
+
filePath: string
|
|
104
|
+
error: string
|
|
105
|
+
}>
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Route payload definitions for type checking
|
|
111
|
+
*/
|
|
112
|
+
export const GRIN2Payload: RoutePayload = {
|
|
113
|
+
request: {
|
|
114
|
+
typeId: 'GRIN2Request'
|
|
115
|
+
},
|
|
116
|
+
response: {
|
|
117
|
+
typeId: 'GRIN2Response'
|
|
118
|
+
}
|
|
119
|
+
}
|