@sjcrh/proteinpaint-types 2.98.0 → 2.98.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.
@@ -1,311 +0,0 @@
1
- import {
2
- __toESM,
3
- require_lib
4
- } from "./chunk-Z6B6IQIY.js";
5
-
6
- // dist/termdb.boxplot.ts
7
- var import_typia = __toESM(require_lib(), 1);
8
-
9
- // src/routes/termdb.boxplot.ts
10
- var boxplotPayload = {
11
- request: {
12
- typeId: "BoxPlotRequest"
13
- },
14
- response: {
15
- typeId: "BoxPlotResponse"
16
- },
17
- examples: [
18
- {
19
- request: {
20
- body: {
21
- tw: {
22
- term: { id: "subcohort", type: "categorical" },
23
- values: [{ key: "ABC", label: "ABC" }]
24
- },
25
- genome: "hg38-test",
26
- dslabel: "TermdbTest",
27
- orderByMedian: true
28
- }
29
- },
30
- response: {
31
- body: {
32
- absMin: 0,
33
- absMax: 100,
34
- plots: [
35
- {
36
- boxplot: {
37
- label: "ABC",
38
- w1: 0,
39
- w2: 100,
40
- p05: 0,
41
- p25: 25,
42
- p50: 50,
43
- p75: 75,
44
- p95: 100,
45
- iqr: 50,
46
- out: [101, 102, 106]
47
- },
48
- color: "blue",
49
- descrStats: [
50
- { id: "total", label: "Total", value: 100 },
51
- { id: "min", label: "Min", value: 0 },
52
- { id: "p25", label: "25%", value: 25 },
53
- { id: "median", label: "Median", value: 50 },
54
- { id: "mean", label: "Mean", value: 50 },
55
- { id: "p75", label: "75%", value: 75 },
56
- { id: "max", label: "Max", value: 100 },
57
- { id: "sd", label: "SD", value: 0 },
58
- { id: "variance", label: "Variance", value: 0 },
59
- { id: "iqr", label: "IQR", value: 50 }
60
- ],
61
- key: "ABC"
62
- }
63
- ],
64
- uncomputableValues: [{ label: "uncomputable-test", value: 1 }]
65
- }
66
- }
67
- }
68
- ]
69
- };
70
-
71
- // dist/termdb.boxplot.ts
72
- var validBoxPlotRequest = (input) => {
73
- const errors = [];
74
- const __is = (input2) => {
75
- const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && "boolean" === typeof input3.orderByMedian && true && true && true;
76
- return "object" === typeof input2 && null !== input2 && $io0(input2);
77
- };
78
- if (false === __is(input)) {
79
- const $report = import_typia.createValidate.report(errors);
80
- ((input2, _path, _exceptionable = true) => {
81
- const $vo0 = (input3, _path2, _exceptionable2 = true) => [true, "string" === typeof input3.genome || $report(_exceptionable2, {
82
- path: _path2 + ".genome",
83
- expected: "string",
84
- value: input3.genome
85
- }), "string" === typeof input3.dslabel || $report(_exceptionable2, {
86
- path: _path2 + ".dslabel",
87
- expected: "string",
88
- value: input3.dslabel
89
- }), "boolean" === typeof input3.orderByMedian || $report(_exceptionable2, {
90
- path: _path2 + ".orderByMedian",
91
- expected: "boolean",
92
- value: input3.orderByMedian
93
- }), true, true, true].every((flag) => flag);
94
- return ("object" === typeof input2 && null !== input2 || $report(true, {
95
- path: _path + "",
96
- expected: "BoxPlotRequest",
97
- value: input2
98
- })) && $vo0(input2, _path + "", true) || $report(true, {
99
- path: _path + "",
100
- expected: "BoxPlotRequest",
101
- value: input2
102
- });
103
- })(input, "$input", true);
104
- }
105
- const success = 0 === errors.length;
106
- return {
107
- success,
108
- errors,
109
- data: success ? input : void 0
110
- };
111
- };
112
- var validBoxPlotResponse = (input) => {
113
- const errors = [];
114
- const __is = (input2) => {
115
- const $io0 = (input3) => (void 0 === input3.absMin || "number" === typeof input3.absMin) && (void 0 === input3.absMax || "number" === typeof input3.absMax) && (Array.isArray(input3.plots) && input3.plots.every((elem) => "object" === typeof elem && null !== elem && $io1(elem))) && (null === input3.uncomputableValues || Array.isArray(input3.uncomputableValues) && input3.uncomputableValues.every((elem) => "object" === typeof elem && null !== elem && $io5(elem)));
116
- const $io1 = (input3) => "object" === typeof input3.boxplot && null !== input3.boxplot && $io2(input3.boxplot) && (void 0 === input3.color || "string" === typeof input3.color) && (Array.isArray(input3.descrStats) && input3.descrStats.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && (void 0 === input3.isHidden || "boolean" === typeof input3.isHidden) && "string" === typeof input3.key && true && (void 0 === input3.seriesId || "string" === typeof input3.seriesId);
117
- const $io2 = (input3) => (void 0 === input3.w1 || "number" === typeof input3.w1) && (void 0 === input3.w2 || "number" === typeof input3.w2) && "number" === typeof input3.p05 && "number" === typeof input3.p25 && "number" === typeof input3.p50 && "number" === typeof input3.p75 && "number" === typeof input3.p95 && "number" === typeof input3.iqr && (Array.isArray(input3.out) && input3.out.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && "string" === typeof input3.label;
118
- const $io3 = (input3) => "number" === typeof input3.value;
119
- const $io4 = (input3) => "string" === typeof input3.id && "string" === typeof input3.label && "number" === typeof input3.value;
120
- const $io5 = (input3) => "string" === typeof input3.label && "number" === typeof input3.value;
121
- return "object" === typeof input2 && null !== input2 && $io0(input2);
122
- };
123
- if (false === __is(input)) {
124
- const $report = import_typia.createValidate.report(errors);
125
- ((input2, _path, _exceptionable = true) => {
126
- const $vo0 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.absMin || "number" === typeof input3.absMin || $report(_exceptionable2, {
127
- path: _path2 + ".absMin",
128
- expected: "(number | undefined)",
129
- value: input3.absMin
130
- }), void 0 === input3.absMax || "number" === typeof input3.absMax || $report(_exceptionable2, {
131
- path: _path2 + ".absMax",
132
- expected: "(number | undefined)",
133
- value: input3.absMax
134
- }), (Array.isArray(input3.plots) || $report(_exceptionable2, {
135
- path: _path2 + ".plots",
136
- expected: "Array<BoxPlotEntry>",
137
- value: input3.plots
138
- })) && input3.plots.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
139
- path: _path2 + ".plots[" + _index1 + "]",
140
- expected: "BoxPlotEntry",
141
- value: elem
142
- })) && $vo1(elem, _path2 + ".plots[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
143
- path: _path2 + ".plots[" + _index1 + "]",
144
- expected: "BoxPlotEntry",
145
- value: elem
146
- })).every((flag) => flag) || $report(_exceptionable2, {
147
- path: _path2 + ".plots",
148
- expected: "Array<BoxPlotEntry>",
149
- value: input3.plots
150
- }), null === input3.uncomputableValues || (Array.isArray(input3.uncomputableValues) || $report(_exceptionable2, {
151
- path: _path2 + ".uncomputableValues",
152
- expected: "(Array<__type>.o1 | null)",
153
- value: input3.uncomputableValues
154
- })) && input3.uncomputableValues.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
155
- path: _path2 + ".uncomputableValues[" + _index2 + "]",
156
- expected: "__type.o1",
157
- value: elem
158
- })) && $vo5(elem, _path2 + ".uncomputableValues[" + _index2 + "]", _exceptionable2) || $report(_exceptionable2, {
159
- path: _path2 + ".uncomputableValues[" + _index2 + "]",
160
- expected: "__type.o1",
161
- value: elem
162
- })).every((flag) => flag) || $report(_exceptionable2, {
163
- path: _path2 + ".uncomputableValues",
164
- expected: "(Array<__type>.o1 | null)",
165
- value: input3.uncomputableValues
166
- })].every((flag) => flag);
167
- const $vo1 = (input3, _path2, _exceptionable2 = true) => [("object" === typeof input3.boxplot && null !== input3.boxplot || $report(_exceptionable2, {
168
- path: _path2 + ".boxplot",
169
- expected: "BoxPlotData & { label: string; }",
170
- value: input3.boxplot
171
- })) && $vo2(input3.boxplot, _path2 + ".boxplot", _exceptionable2) || $report(_exceptionable2, {
172
- path: _path2 + ".boxplot",
173
- expected: "BoxPlotData & { label: string; }",
174
- value: input3.boxplot
175
- }), void 0 === input3.color || "string" === typeof input3.color || $report(_exceptionable2, {
176
- path: _path2 + ".color",
177
- expected: "(string | undefined)",
178
- value: input3.color
179
- }), (Array.isArray(input3.descrStats) || $report(_exceptionable2, {
180
- path: _path2 + ".descrStats",
181
- expected: "Array<BoxPlotDescrStatsEntry>",
182
- value: input3.descrStats
183
- })) && input3.descrStats.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
184
- path: _path2 + ".descrStats[" + _index3 + "]",
185
- expected: "BoxPlotDescrStatsEntry",
186
- value: elem
187
- })) && $vo4(elem, _path2 + ".descrStats[" + _index3 + "]", _exceptionable2) || $report(_exceptionable2, {
188
- path: _path2 + ".descrStats[" + _index3 + "]",
189
- expected: "BoxPlotDescrStatsEntry",
190
- value: elem
191
- })).every((flag) => flag) || $report(_exceptionable2, {
192
- path: _path2 + ".descrStats",
193
- expected: "Array<BoxPlotDescrStatsEntry>",
194
- value: input3.descrStats
195
- }), void 0 === input3.isHidden || "boolean" === typeof input3.isHidden || $report(_exceptionable2, {
196
- path: _path2 + ".isHidden",
197
- expected: "(boolean | undefined)",
198
- value: input3.isHidden
199
- }), "string" === typeof input3.key || $report(_exceptionable2, {
200
- path: _path2 + ".key",
201
- expected: "string",
202
- value: input3.key
203
- }), true, void 0 === input3.seriesId || "string" === typeof input3.seriesId || $report(_exceptionable2, {
204
- path: _path2 + ".seriesId",
205
- expected: "(string | undefined)",
206
- value: input3.seriesId
207
- })].every((flag) => flag);
208
- const $vo2 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.w1 || "number" === typeof input3.w1 || $report(_exceptionable2, {
209
- path: _path2 + ".w1",
210
- expected: "(number | undefined)",
211
- value: input3.w1
212
- }), void 0 === input3.w2 || "number" === typeof input3.w2 || $report(_exceptionable2, {
213
- path: _path2 + ".w2",
214
- expected: "(number | undefined)",
215
- value: input3.w2
216
- }), "number" === typeof input3.p05 || $report(_exceptionable2, {
217
- path: _path2 + ".p05",
218
- expected: "number",
219
- value: input3.p05
220
- }), "number" === typeof input3.p25 || $report(_exceptionable2, {
221
- path: _path2 + ".p25",
222
- expected: "number",
223
- value: input3.p25
224
- }), "number" === typeof input3.p50 || $report(_exceptionable2, {
225
- path: _path2 + ".p50",
226
- expected: "number",
227
- value: input3.p50
228
- }), "number" === typeof input3.p75 || $report(_exceptionable2, {
229
- path: _path2 + ".p75",
230
- expected: "number",
231
- value: input3.p75
232
- }), "number" === typeof input3.p95 || $report(_exceptionable2, {
233
- path: _path2 + ".p95",
234
- expected: "number",
235
- value: input3.p95
236
- }), "number" === typeof input3.iqr || $report(_exceptionable2, {
237
- path: _path2 + ".iqr",
238
- expected: "number",
239
- value: input3.iqr
240
- }), (Array.isArray(input3.out) || $report(_exceptionable2, {
241
- path: _path2 + ".out",
242
- expected: "Array<__type>",
243
- value: input3.out
244
- })) && input3.out.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
245
- path: _path2 + ".out[" + _index4 + "]",
246
- expected: "__type",
247
- value: elem
248
- })) && $vo3(elem, _path2 + ".out[" + _index4 + "]", _exceptionable2) || $report(_exceptionable2, {
249
- path: _path2 + ".out[" + _index4 + "]",
250
- expected: "__type",
251
- value: elem
252
- })).every((flag) => flag) || $report(_exceptionable2, {
253
- path: _path2 + ".out",
254
- expected: "Array<__type>",
255
- value: input3.out
256
- }), "string" === typeof input3.label || $report(_exceptionable2, {
257
- path: _path2 + ".label",
258
- expected: "string",
259
- value: input3.label
260
- })].every((flag) => flag);
261
- const $vo3 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.value || $report(_exceptionable2, {
262
- path: _path2 + ".value",
263
- expected: "number",
264
- value: input3.value
265
- })].every((flag) => flag);
266
- const $vo4 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.id || $report(_exceptionable2, {
267
- path: _path2 + ".id",
268
- expected: "string",
269
- value: input3.id
270
- }), "string" === typeof input3.label || $report(_exceptionable2, {
271
- path: _path2 + ".label",
272
- expected: "string",
273
- value: input3.label
274
- }), "number" === typeof input3.value || $report(_exceptionable2, {
275
- path: _path2 + ".value",
276
- expected: "number",
277
- value: input3.value
278
- })].every((flag) => flag);
279
- const $vo5 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.label || $report(_exceptionable2, {
280
- path: _path2 + ".label",
281
- expected: "string",
282
- value: input3.label
283
- }), "number" === typeof input3.value || $report(_exceptionable2, {
284
- path: _path2 + ".value",
285
- expected: "number",
286
- value: input3.value
287
- })].every((flag) => flag);
288
- return ("object" === typeof input2 && null !== input2 || $report(true, {
289
- path: _path + "",
290
- expected: "BoxPlotResponse",
291
- value: input2
292
- })) && $vo0(input2, _path + "", true) || $report(true, {
293
- path: _path + "",
294
- expected: "BoxPlotResponse",
295
- value: input2
296
- });
297
- })(input, "$input", true);
298
- }
299
- const success = 0 === errors.length;
300
- return {
301
- success,
302
- errors,
303
- data: success ? input : void 0
304
- };
305
- };
306
-
307
- export {
308
- boxplotPayload,
309
- validBoxPlotRequest,
310
- validBoxPlotResponse
311
- };