@sjcrh/proteinpaint-types 2.171.0 → 2.172.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-JKELINOM.js +179 -0
- package/dist/index.js +13 -5
- package/dist/termdb.runChart.js +11 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/routes/routeApi.ts +5 -1
- package/src/routes/termdb.runChart.ts +47 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__toESM,
|
|
3
|
+
require_lib
|
|
4
|
+
} from "./chunk-YNHC5SXO.js";
|
|
5
|
+
|
|
6
|
+
// dist/termdb.runChart.ts
|
|
7
|
+
var import_typia = __toESM(require_lib(), 1);
|
|
8
|
+
|
|
9
|
+
// src/routes/termdb.runChart.ts
|
|
10
|
+
var runChartPayload = {
|
|
11
|
+
request: {
|
|
12
|
+
typeId: "RunChartRequest"
|
|
13
|
+
},
|
|
14
|
+
response: {
|
|
15
|
+
typeId: "RunChartResponse"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// dist/termdb.runChart.ts
|
|
20
|
+
var validRunChartRequest = (input) => {
|
|
21
|
+
const errors = [];
|
|
22
|
+
const __is = (input2) => {
|
|
23
|
+
const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && ("object" === typeof input3.term && null !== input3.term && "string" === typeof input3.term.id) && ("object" === typeof input3.term2 && null !== input3.term2 && "string" === typeof input3.term2.id) && ("median" === input3.aggregation || "mean" === input3.aggregation || "count" === input3.aggregation) && true && true;
|
|
24
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
25
|
+
};
|
|
26
|
+
if (false === __is(input)) {
|
|
27
|
+
const $report = import_typia.createValidate.report(errors);
|
|
28
|
+
((input2, _path, _exceptionable = true) => {
|
|
29
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.genome || $report(_exceptionable2, {
|
|
30
|
+
path: _path2 + ".genome",
|
|
31
|
+
expected: "string",
|
|
32
|
+
value: input3.genome
|
|
33
|
+
}), "string" === typeof input3.dslabel || $report(_exceptionable2, {
|
|
34
|
+
path: _path2 + ".dslabel",
|
|
35
|
+
expected: "string",
|
|
36
|
+
value: input3.dslabel
|
|
37
|
+
}), ("object" === typeof input3.term && null !== input3.term || $report(_exceptionable2, {
|
|
38
|
+
path: _path2 + ".term",
|
|
39
|
+
expected: "__type",
|
|
40
|
+
value: input3.term
|
|
41
|
+
})) && $vo1(input3.term, _path2 + ".term", _exceptionable2) || $report(_exceptionable2, {
|
|
42
|
+
path: _path2 + ".term",
|
|
43
|
+
expected: "__type",
|
|
44
|
+
value: input3.term
|
|
45
|
+
}), ("object" === typeof input3.term2 && null !== input3.term2 || $report(_exceptionable2, {
|
|
46
|
+
path: _path2 + ".term2",
|
|
47
|
+
expected: "__type.o1",
|
|
48
|
+
value: input3.term2
|
|
49
|
+
})) && $vo2(input3.term2, _path2 + ".term2", _exceptionable2) || $report(_exceptionable2, {
|
|
50
|
+
path: _path2 + ".term2",
|
|
51
|
+
expected: "__type.o1",
|
|
52
|
+
value: input3.term2
|
|
53
|
+
}), "median" === input3.aggregation || "mean" === input3.aggregation || "count" === input3.aggregation || $report(_exceptionable2, {
|
|
54
|
+
path: _path2 + ".aggregation",
|
|
55
|
+
expected: '("count" | "mean" | "median")',
|
|
56
|
+
value: input3.aggregation
|
|
57
|
+
}), true, true].every((flag) => flag);
|
|
58
|
+
const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.id || $report(_exceptionable2, {
|
|
59
|
+
path: _path2 + ".id",
|
|
60
|
+
expected: "string",
|
|
61
|
+
value: input3.id
|
|
62
|
+
})].every((flag) => flag);
|
|
63
|
+
const $vo2 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.id || $report(_exceptionable2, {
|
|
64
|
+
path: _path2 + ".id",
|
|
65
|
+
expected: "string",
|
|
66
|
+
value: input3.id
|
|
67
|
+
})].every((flag) => flag);
|
|
68
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
69
|
+
path: _path + "",
|
|
70
|
+
expected: "RunChartRequest",
|
|
71
|
+
value: input2
|
|
72
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
73
|
+
path: _path + "",
|
|
74
|
+
expected: "RunChartRequest",
|
|
75
|
+
value: input2
|
|
76
|
+
});
|
|
77
|
+
})(input, "$input", true);
|
|
78
|
+
}
|
|
79
|
+
const success = 0 === errors.length;
|
|
80
|
+
return {
|
|
81
|
+
success,
|
|
82
|
+
errors,
|
|
83
|
+
data: success ? input : void 0
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
var validRunChartResponse = (input) => {
|
|
87
|
+
const errors = [];
|
|
88
|
+
const __is = (input2) => {
|
|
89
|
+
const $io0 = (input3) => ("ok" === input3.status || "error" === input3.status) && (Array.isArray(input3.series) && input3.series.every((elem) => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
90
|
+
const $io1 = (input3) => "number" === typeof input3.median && (Array.isArray(input3.points) && input3.points.every((elem) => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
91
|
+
const $io2 = (input3) => "number" === typeof input3.x && "string" === typeof input3.xName && "number" === typeof input3.y && "number" === typeof input3.sampleCount;
|
|
92
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
93
|
+
};
|
|
94
|
+
if (false === __is(input)) {
|
|
95
|
+
const $report = import_typia.createValidate.report(errors);
|
|
96
|
+
((input2, _path, _exceptionable = true) => {
|
|
97
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["ok" === input3.status || "error" === input3.status || $report(_exceptionable2, {
|
|
98
|
+
path: _path2 + ".status",
|
|
99
|
+
expected: '("error" | "ok")',
|
|
100
|
+
value: input3.status
|
|
101
|
+
}), (Array.isArray(input3.series) || $report(_exceptionable2, {
|
|
102
|
+
path: _path2 + ".series",
|
|
103
|
+
expected: "Array<__type>",
|
|
104
|
+
value: input3.series
|
|
105
|
+
})) && input3.series.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
106
|
+
path: _path2 + ".series[" + _index1 + "]",
|
|
107
|
+
expected: "__type",
|
|
108
|
+
value: elem
|
|
109
|
+
})) && $vo1(elem, _path2 + ".series[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
110
|
+
path: _path2 + ".series[" + _index1 + "]",
|
|
111
|
+
expected: "__type",
|
|
112
|
+
value: elem
|
|
113
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
114
|
+
path: _path2 + ".series",
|
|
115
|
+
expected: "Array<__type>",
|
|
116
|
+
value: input3.series
|
|
117
|
+
})].every((flag) => flag);
|
|
118
|
+
const $vo1 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.median || $report(_exceptionable2, {
|
|
119
|
+
path: _path2 + ".median",
|
|
120
|
+
expected: "number",
|
|
121
|
+
value: input3.median
|
|
122
|
+
}), (Array.isArray(input3.points) || $report(_exceptionable2, {
|
|
123
|
+
path: _path2 + ".points",
|
|
124
|
+
expected: "Array<Point>",
|
|
125
|
+
value: input3.points
|
|
126
|
+
})) && input3.points.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
127
|
+
path: _path2 + ".points[" + _index2 + "]",
|
|
128
|
+
expected: "Point",
|
|
129
|
+
value: elem
|
|
130
|
+
})) && $vo2(elem, _path2 + ".points[" + _index2 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
131
|
+
path: _path2 + ".points[" + _index2 + "]",
|
|
132
|
+
expected: "Point",
|
|
133
|
+
value: elem
|
|
134
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
135
|
+
path: _path2 + ".points",
|
|
136
|
+
expected: "Array<Point>",
|
|
137
|
+
value: input3.points
|
|
138
|
+
})].every((flag) => flag);
|
|
139
|
+
const $vo2 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.x || $report(_exceptionable2, {
|
|
140
|
+
path: _path2 + ".x",
|
|
141
|
+
expected: "number",
|
|
142
|
+
value: input3.x
|
|
143
|
+
}), "string" === typeof input3.xName || $report(_exceptionable2, {
|
|
144
|
+
path: _path2 + ".xName",
|
|
145
|
+
expected: "string",
|
|
146
|
+
value: input3.xName
|
|
147
|
+
}), "number" === typeof input3.y || $report(_exceptionable2, {
|
|
148
|
+
path: _path2 + ".y",
|
|
149
|
+
expected: "number",
|
|
150
|
+
value: input3.y
|
|
151
|
+
}), "number" === typeof input3.sampleCount || $report(_exceptionable2, {
|
|
152
|
+
path: _path2 + ".sampleCount",
|
|
153
|
+
expected: "number",
|
|
154
|
+
value: input3.sampleCount
|
|
155
|
+
})].every((flag) => flag);
|
|
156
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
157
|
+
path: _path + "",
|
|
158
|
+
expected: "RunChartResponse",
|
|
159
|
+
value: input2
|
|
160
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
161
|
+
path: _path + "",
|
|
162
|
+
expected: "RunChartResponse",
|
|
163
|
+
value: input2
|
|
164
|
+
});
|
|
165
|
+
})(input, "$input", true);
|
|
166
|
+
}
|
|
167
|
+
const success = 0 === errors.length;
|
|
168
|
+
return {
|
|
169
|
+
success,
|
|
170
|
+
errors,
|
|
171
|
+
data: success ? input : void 0
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export {
|
|
176
|
+
runChartPayload,
|
|
177
|
+
validRunChartRequest,
|
|
178
|
+
validRunChartResponse
|
|
179
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
termsByIdsPayload,
|
|
3
|
+
validTermsByIdsRequest,
|
|
4
|
+
validTermsByIdsResponse
|
|
5
|
+
} from "./chunk-CUU7POGC.js";
|
|
1
6
|
import {
|
|
2
7
|
topMutatedGenePayload,
|
|
3
8
|
validtopMutatedGeneRequest,
|
|
@@ -33,6 +38,11 @@ import {
|
|
|
33
38
|
validWSISamplesResponse,
|
|
34
39
|
wsiSamplesPayload
|
|
35
40
|
} from "./chunk-2744ACBX.js";
|
|
41
|
+
import {
|
|
42
|
+
runChartPayload,
|
|
43
|
+
validRunChartRequest,
|
|
44
|
+
validRunChartResponse
|
|
45
|
+
} from "./chunk-JKELINOM.js";
|
|
36
46
|
import {
|
|
37
47
|
termdbSampleImagesPayload,
|
|
38
48
|
validTermdbSampleImagesRequest,
|
|
@@ -68,11 +78,6 @@ import {
|
|
|
68
78
|
validTermChildrenRequest,
|
|
69
79
|
validTermChildrenResponse
|
|
70
80
|
} from "./chunk-P25WDNMD.js";
|
|
71
|
-
import {
|
|
72
|
-
termsByIdsPayload,
|
|
73
|
-
validTermsByIdsRequest,
|
|
74
|
-
validTermsByIdsResponse
|
|
75
|
-
} from "./chunk-CUU7POGC.js";
|
|
76
81
|
import {
|
|
77
82
|
termdbCohortsPayload,
|
|
78
83
|
validTermdbCohortsRequest,
|
|
@@ -349,6 +354,7 @@ export {
|
|
|
349
354
|
pdomainPayload,
|
|
350
355
|
percentilePayload,
|
|
351
356
|
rootTermPayload,
|
|
357
|
+
runChartPayload,
|
|
352
358
|
runGRIN2Payload,
|
|
353
359
|
sampleWSImagesPayload,
|
|
354
360
|
saveWSIAnnotationPayload,
|
|
@@ -443,6 +449,8 @@ export {
|
|
|
443
449
|
validProfileScoresResponse,
|
|
444
450
|
validRootTermRequest,
|
|
445
451
|
validRootTermResponse,
|
|
452
|
+
validRunChartRequest,
|
|
453
|
+
validRunChartResponse,
|
|
446
454
|
validRunGRIN2Request,
|
|
447
455
|
validRunGRIN2Response,
|
|
448
456
|
validSampleWSImagesRequest,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './routes/termdb.DE.ts'
|
|
|
47
47
|
export * from './routes/termdb.descrstats.ts'
|
|
48
48
|
export * from './routes/termdb.numericcategories.ts'
|
|
49
49
|
export * from './routes/termdb.percentile.ts'
|
|
50
|
+
export * from './routes/termdb.runChart.ts'
|
|
50
51
|
export * from './routes/termdb.rootterm.ts'
|
|
51
52
|
export * from './routes/termdb.termchildren.ts'
|
|
52
53
|
export * from './routes/termdb.sampleImages.ts'
|
package/src/routes/routeApi.ts
CHANGED
|
@@ -15,11 +15,15 @@ export type RoutePayload = {
|
|
|
15
15
|
/** if examples are not provided, will not test */
|
|
16
16
|
examples?: PayloadExample[]
|
|
17
17
|
}
|
|
18
|
-
|
|
19
18
|
export type RouteMethod = {
|
|
20
19
|
typeId: string
|
|
21
20
|
checker?: any
|
|
22
21
|
}
|
|
22
|
+
/* later replace actual values */
|
|
23
|
+
export type Point = {
|
|
24
|
+
x: string
|
|
25
|
+
y: string | number
|
|
26
|
+
}
|
|
23
27
|
|
|
24
28
|
type RouteInitArg = {
|
|
25
29
|
app: any
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
|
|
3
|
+
export type RunChartRequest = {
|
|
4
|
+
genome: string
|
|
5
|
+
dslabel: string
|
|
6
|
+
/** date term for x axis */
|
|
7
|
+
term: {
|
|
8
|
+
id: string
|
|
9
|
+
}
|
|
10
|
+
/** timeline/duration term for y axis */
|
|
11
|
+
term2: {
|
|
12
|
+
id: string
|
|
13
|
+
}
|
|
14
|
+
aggregation: 'mean' | 'median' | 'count'
|
|
15
|
+
filter?: any
|
|
16
|
+
__protected__?: any // auth token for accessing protected data
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type RunChartResponse = {
|
|
20
|
+
status: 'ok' | 'error'
|
|
21
|
+
/** each series is one curve, with a median. a runchart may show 1 or multiple curves */
|
|
22
|
+
series: {
|
|
23
|
+
/** calculated Y median value for this curve */
|
|
24
|
+
median: number
|
|
25
|
+
points: Point[]
|
|
26
|
+
}[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type Point = {
|
|
30
|
+
/** decimal year, e.g. 2024.21321321 */
|
|
31
|
+
x: number
|
|
32
|
+
/** text of human-readable x value, e.g. "Jan 2024" which may be by the months, depends on dataset customization */
|
|
33
|
+
xName: string
|
|
34
|
+
/** timeline, e.g. number of days */
|
|
35
|
+
y: number
|
|
36
|
+
/** number of samples with this timeline at this time point */
|
|
37
|
+
sampleCount: number
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const runChartPayload: RoutePayload = {
|
|
41
|
+
request: {
|
|
42
|
+
typeId: 'RunChartRequest'
|
|
43
|
+
},
|
|
44
|
+
response: {
|
|
45
|
+
typeId: 'RunChartResponse'
|
|
46
|
+
}
|
|
47
|
+
}
|