@sjcrh/proteinpaint-types 2.135.2-0 → 2.136.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.
|
@@ -21,13 +21,31 @@ var termdbSingleCellDataPayload = {
|
|
|
21
21
|
var validTermdbSingleCellDataRequest = (input) => {
|
|
22
22
|
const errors = [];
|
|
23
23
|
const __is = (input2) => {
|
|
24
|
-
const $
|
|
24
|
+
const $join = import_typia.createValidate.join;
|
|
25
|
+
const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && ("object" === typeof input3.sample && null !== input3.sample && $io1(input3.sample)) && (Array.isArray(input3.plots) && input3.plots.every((elem) => "string" === typeof elem)) && (void 0 === input3.gene || "string" === typeof input3.gene) && (void 0 === input3.colorBy || "object" === typeof input3.colorBy && null !== input3.colorBy && false === Array.isArray(input3.colorBy) && $io2(input3.colorBy)) && (void 0 === input3.colorMap || "object" === typeof input3.colorMap && null !== input3.colorMap && false === Array.isArray(input3.colorMap) && $io3(input3.colorMap));
|
|
25
26
|
const $io1 = (input3) => (void 0 === input3.eID || "string" === typeof input3.eID) && "string" === typeof input3.sID;
|
|
27
|
+
const $io2 = (input3) => Object.keys(input3).every((key) => {
|
|
28
|
+
const value = input3[key];
|
|
29
|
+
if (void 0 === value)
|
|
30
|
+
return true;
|
|
31
|
+
if (RegExp(/(.*)/).test(key))
|
|
32
|
+
return "string" === typeof value;
|
|
33
|
+
return true;
|
|
34
|
+
});
|
|
35
|
+
const $io3 = (input3) => Object.keys(input3).every((key) => {
|
|
36
|
+
const value = input3[key];
|
|
37
|
+
if (void 0 === value)
|
|
38
|
+
return true;
|
|
39
|
+
if (RegExp(/(.*)/).test(key))
|
|
40
|
+
return "string" === typeof value;
|
|
41
|
+
return true;
|
|
42
|
+
});
|
|
26
43
|
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
27
44
|
};
|
|
28
45
|
if (false === __is(input)) {
|
|
29
46
|
const $report = import_typia.createValidate.report(errors);
|
|
30
47
|
((input2, _path, _exceptionable = true) => {
|
|
48
|
+
const $join = import_typia.createValidate.join;
|
|
31
49
|
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.genome || $report(_exceptionable2, {
|
|
32
50
|
path: _path2 + ".genome",
|
|
33
51
|
expected: "string",
|
|
@@ -60,6 +78,22 @@ var validTermdbSingleCellDataRequest = (input) => {
|
|
|
60
78
|
path: _path2 + ".gene",
|
|
61
79
|
expected: "(string | undefined)",
|
|
62
80
|
value: input3.gene
|
|
81
|
+
}), void 0 === input3.colorBy || ("object" === typeof input3.colorBy && null !== input3.colorBy && false === Array.isArray(input3.colorBy) || $report(_exceptionable2, {
|
|
82
|
+
path: _path2 + ".colorBy",
|
|
83
|
+
expected: "(__type.o1 | undefined)",
|
|
84
|
+
value: input3.colorBy
|
|
85
|
+
})) && $vo2(input3.colorBy, _path2 + ".colorBy", _exceptionable2) || $report(_exceptionable2, {
|
|
86
|
+
path: _path2 + ".colorBy",
|
|
87
|
+
expected: "(__type.o1 | undefined)",
|
|
88
|
+
value: input3.colorBy
|
|
89
|
+
}), void 0 === input3.colorMap || ("object" === typeof input3.colorMap && null !== input3.colorMap && false === Array.isArray(input3.colorMap) || $report(_exceptionable2, {
|
|
90
|
+
path: _path2 + ".colorMap",
|
|
91
|
+
expected: "(__type.o2 | undefined)",
|
|
92
|
+
value: input3.colorMap
|
|
93
|
+
})) && $vo3(input3.colorMap, _path2 + ".colorMap", _exceptionable2) || $report(_exceptionable2, {
|
|
94
|
+
path: _path2 + ".colorMap",
|
|
95
|
+
expected: "(__type.o2 | undefined)",
|
|
96
|
+
value: input3.colorMap
|
|
63
97
|
})].every((flag) => flag);
|
|
64
98
|
const $vo1 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.eID || "string" === typeof input3.eID || $report(_exceptionable2, {
|
|
65
99
|
path: _path2 + ".eID",
|
|
@@ -70,6 +104,30 @@ var validTermdbSingleCellDataRequest = (input) => {
|
|
|
70
104
|
expected: "string",
|
|
71
105
|
value: input3.sID
|
|
72
106
|
})].every((flag) => flag);
|
|
107
|
+
const $vo2 = (input3, _path2, _exceptionable2 = true) => [false === _exceptionable2 || Object.keys(input3).map((key) => {
|
|
108
|
+
const value = input3[key];
|
|
109
|
+
if (void 0 === value)
|
|
110
|
+
return true;
|
|
111
|
+
if (RegExp(/(.*)/).test(key))
|
|
112
|
+
return "string" === typeof value || $report(_exceptionable2, {
|
|
113
|
+
path: _path2 + $join(key),
|
|
114
|
+
expected: "string",
|
|
115
|
+
value
|
|
116
|
+
});
|
|
117
|
+
return true;
|
|
118
|
+
}).every((flag) => flag)].every((flag) => flag);
|
|
119
|
+
const $vo3 = (input3, _path2, _exceptionable2 = true) => [false === _exceptionable2 || Object.keys(input3).map((key) => {
|
|
120
|
+
const value = input3[key];
|
|
121
|
+
if (void 0 === value)
|
|
122
|
+
return true;
|
|
123
|
+
if (RegExp(/(.*)/).test(key))
|
|
124
|
+
return "string" === typeof value || $report(_exceptionable2, {
|
|
125
|
+
path: _path2 + $join(key),
|
|
126
|
+
expected: "string",
|
|
127
|
+
value
|
|
128
|
+
});
|
|
129
|
+
return true;
|
|
130
|
+
}).every((flag) => flag)].every((flag) => flag);
|
|
73
131
|
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
74
132
|
path: _path + "",
|
|
75
133
|
expected: "TermdbSingleCellDataRequest",
|
|
@@ -91,20 +149,11 @@ var validTermdbSingleCellDataRequest = (input) => {
|
|
|
91
149
|
var validTermdbSingleCellDataResponse = (input) => {
|
|
92
150
|
const errors = [];
|
|
93
151
|
const __is = (input2) => {
|
|
94
|
-
const $join = import_typia.createValidate.join;
|
|
95
152
|
const $io0 = (input3) => "number" === typeof input3.status && "string" === typeof input3.error;
|
|
96
153
|
const $io1 = (input3) => "boolean" === typeof input3.nodata;
|
|
97
154
|
const $io2 = (input3) => Array.isArray(input3.plots) && input3.plots.every((elem) => "object" === typeof elem && null !== elem && $io3(elem));
|
|
98
|
-
const $io3 = (input3) => "string" === typeof input3.name && (
|
|
155
|
+
const $io3 = (input3) => "string" === typeof input3.name && (Array.isArray(input3.expCells) && input3.expCells.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && (Array.isArray(input3.noExpCells) && input3.noExpCells.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && (Array.isArray(input3.colorColumns) && input3.colorColumns.every((elem) => "string" === typeof elem)) && "string" === typeof input3.colorBy && true;
|
|
99
156
|
const $io4 = (input3) => "string" === typeof input3.cellId && "number" === typeof input3.x && "number" === typeof input3.y && (void 0 === input3.z || "number" === typeof input3.z) && "string" === typeof input3.category && (void 0 === input3.geneExp || "number" === typeof input3.geneExp);
|
|
100
|
-
const $io5 = (input3) => Object.keys(input3).every((key) => {
|
|
101
|
-
const value = input3[key];
|
|
102
|
-
if (void 0 === value)
|
|
103
|
-
return true;
|
|
104
|
-
if (RegExp(/(.*)/).test(key))
|
|
105
|
-
return "string" === typeof value;
|
|
106
|
-
return true;
|
|
107
|
-
});
|
|
108
157
|
const $iu0 = (input3) => (() => {
|
|
109
158
|
if (void 0 !== input3.status)
|
|
110
159
|
return $io0(input3);
|
|
@@ -119,7 +168,6 @@ var validTermdbSingleCellDataResponse = (input) => {
|
|
|
119
168
|
if (false === __is(input)) {
|
|
120
169
|
const $report = import_typia.createValidate.report(errors);
|
|
121
170
|
((input2, _path, _exceptionable = true) => {
|
|
122
|
-
const $join = import_typia.createValidate.join;
|
|
123
171
|
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.status || $report(_exceptionable2, {
|
|
124
172
|
path: _path2 + ".status",
|
|
125
173
|
expected: "number",
|
|
@@ -155,9 +203,9 @@ var validTermdbSingleCellDataResponse = (input) => {
|
|
|
155
203
|
path: _path2 + ".name",
|
|
156
204
|
expected: "string",
|
|
157
205
|
value: input3.name
|
|
158
|
-
}),
|
|
206
|
+
}), (Array.isArray(input3.expCells) || $report(_exceptionable2, {
|
|
159
207
|
path: _path2 + ".expCells",
|
|
160
|
-
expected: "
|
|
208
|
+
expected: "Array<Cell>",
|
|
161
209
|
value: input3.expCells
|
|
162
210
|
})) && input3.expCells.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
163
211
|
path: _path2 + ".expCells[" + _index2 + "]",
|
|
@@ -169,11 +217,11 @@ var validTermdbSingleCellDataResponse = (input) => {
|
|
|
169
217
|
value: elem
|
|
170
218
|
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
171
219
|
path: _path2 + ".expCells",
|
|
172
|
-
expected: "
|
|
220
|
+
expected: "Array<Cell>",
|
|
173
221
|
value: input3.expCells
|
|
174
|
-
}),
|
|
222
|
+
}), (Array.isArray(input3.noExpCells) || $report(_exceptionable2, {
|
|
175
223
|
path: _path2 + ".noExpCells",
|
|
176
|
-
expected: "
|
|
224
|
+
expected: "Array<Cell>",
|
|
177
225
|
value: input3.noExpCells
|
|
178
226
|
})) && input3.noExpCells.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
179
227
|
path: _path2 + ".noExpCells[" + _index3 + "]",
|
|
@@ -185,12 +233,8 @@ var validTermdbSingleCellDataResponse = (input) => {
|
|
|
185
233
|
value: elem
|
|
186
234
|
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
187
235
|
path: _path2 + ".noExpCells",
|
|
188
|
-
expected: "
|
|
236
|
+
expected: "Array<Cell>",
|
|
189
237
|
value: input3.noExpCells
|
|
190
|
-
}), "string" === typeof input3.colorBy || $report(_exceptionable2, {
|
|
191
|
-
path: _path2 + ".colorBy",
|
|
192
|
-
expected: "string",
|
|
193
|
-
value: input3.colorBy
|
|
194
238
|
}), (Array.isArray(input3.colorColumns) || $report(_exceptionable2, {
|
|
195
239
|
path: _path2 + ".colorColumns",
|
|
196
240
|
expected: "Array<string>",
|
|
@@ -203,15 +247,11 @@ var validTermdbSingleCellDataResponse = (input) => {
|
|
|
203
247
|
path: _path2 + ".colorColumns",
|
|
204
248
|
expected: "Array<string>",
|
|
205
249
|
value: input3.colorColumns
|
|
206
|
-
}),
|
|
207
|
-
path: _path2 + ".
|
|
208
|
-
expected: "
|
|
209
|
-
value: input3.
|
|
210
|
-
})
|
|
211
|
-
path: _path2 + ".colorMap",
|
|
212
|
-
expected: "(__type | undefined)",
|
|
213
|
-
value: input3.colorMap
|
|
214
|
-
})].every((flag) => flag);
|
|
250
|
+
}), "string" === typeof input3.colorBy || $report(_exceptionable2, {
|
|
251
|
+
path: _path2 + ".colorBy",
|
|
252
|
+
expected: "string",
|
|
253
|
+
value: input3.colorBy
|
|
254
|
+
}), true].every((flag) => flag);
|
|
215
255
|
const $vo4 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.cellId || $report(_exceptionable2, {
|
|
216
256
|
path: _path2 + ".cellId",
|
|
217
257
|
expected: "string",
|
|
@@ -237,18 +277,6 @@ var validTermdbSingleCellDataResponse = (input) => {
|
|
|
237
277
|
expected: "(number | undefined)",
|
|
238
278
|
value: input3.geneExp
|
|
239
279
|
})].every((flag) => flag);
|
|
240
|
-
const $vo5 = (input3, _path2, _exceptionable2 = true) => [false === _exceptionable2 || Object.keys(input3).map((key) => {
|
|
241
|
-
const value = input3[key];
|
|
242
|
-
if (void 0 === value)
|
|
243
|
-
return true;
|
|
244
|
-
if (RegExp(/(.*)/).test(key))
|
|
245
|
-
return "string" === typeof value || $report(_exceptionable2, {
|
|
246
|
-
path: _path2 + $join(key),
|
|
247
|
-
expected: "string",
|
|
248
|
-
value
|
|
249
|
-
});
|
|
250
|
-
return true;
|
|
251
|
-
}).every((flag) => flag)].every((flag) => flag);
|
|
252
280
|
const $vu0 = (input3, _path2, _exceptionable2 = true) => (() => {
|
|
253
281
|
if (void 0 !== input3.status)
|
|
254
282
|
return $vo0(input3, _path2, _exceptionable2);
|
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
termdbSingleCellDataPayload,
|
|
48
48
|
validTermdbSingleCellDataRequest,
|
|
49
49
|
validTermdbSingleCellDataResponse
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-K5POIB3P.js";
|
|
51
51
|
import {
|
|
52
52
|
termdbSingleCellSamplesPayload,
|
|
53
53
|
validTermdbSingleCellSamplesRequest,
|
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -766,24 +766,26 @@ type ColorColumn = {
|
|
|
766
766
|
|
|
767
767
|
/** defines a tsne type of plot for cells from one sample */
|
|
768
768
|
type SingleCellPlot = {
|
|
769
|
-
/**
|
|
769
|
+
/** value is display as plot name on ui and also used as identifier for a plot, must be unique */
|
|
770
770
|
name: string
|
|
771
771
|
/** folder in which per-sample files are stored.
|
|
772
|
-
each file is a tabular text file with all cells (rows) from that sample.
|
|
773
|
-
all files must have same set of columns
|
|
774
|
-
|
|
775
|
-
|
|
772
|
+
each file is a tabular text file with all cells (rows) from that sample.
|
|
773
|
+
all files must have same set of columns:
|
|
774
|
+
- 1st column is cell barcode
|
|
775
|
+
- x/y coordinate column number is defined in coordsColumns{x,y} below
|
|
776
|
+
- additional columns for cell annotations, corresponds to colorColumns
|
|
777
|
+
*/
|
|
776
778
|
folder: string
|
|
779
|
+
/** 0-based column number for x/y coordinate for this plot */
|
|
780
|
+
coordsColumns: { x: number; y: number }
|
|
777
781
|
/** optional suffix to locate the file for a sample, via ${folder}/${sampleName}${fileSuffix}
|
|
778
|
-
assumes that file name always start with sample name.
|
|
779
|
-
if not introduce filePrefix
|
|
780
|
-
*/
|
|
782
|
+
assumes that file name always start with sample name.
|
|
783
|
+
if not introduce filePrefix
|
|
784
|
+
*/
|
|
781
785
|
fileSuffix?: string
|
|
782
786
|
/** list of columns in tabular text file that define cell categories and can be used to color the cells in the plot. must have categorical values
|
|
783
787
|
*/
|
|
784
788
|
colorColumns: ColorColumn[]
|
|
785
|
-
/** 0-based column number for x/y coordinate for this plot */
|
|
786
|
-
coordsColumns: { x: number; y: number }
|
|
787
789
|
/** if true the plot is shown by default. otherwise hidden */
|
|
788
790
|
selected?: boolean
|
|
789
791
|
}
|
|
@@ -20,13 +20,12 @@ export type Plot = {
|
|
|
20
20
|
/** name of the plot */
|
|
21
21
|
name: string
|
|
22
22
|
/** List of cells with gene expression */
|
|
23
|
-
expCells
|
|
23
|
+
expCells: Cell[]
|
|
24
24
|
/** List of cells with no gene expression, if no gene provided all cells will be here */
|
|
25
|
-
noExpCells
|
|
26
|
-
/** Column name to color by, e.g Cell type, CNV, Fusion */
|
|
27
|
-
colorBy: string
|
|
25
|
+
noExpCells: Cell[]
|
|
28
26
|
colorColumns: string[]
|
|
29
|
-
|
|
27
|
+
colorBy: string
|
|
28
|
+
colorMap: any
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
export type TermdbSingleCellDataRequest = {
|
|
@@ -41,14 +40,17 @@ export type TermdbSingleCellDataRequest = {
|
|
|
41
40
|
plots: string[]
|
|
42
41
|
/** Gene name to retrieve expression data for all cells of the given sample, and to overlay on maps */
|
|
43
42
|
gene?: string
|
|
43
|
+
/** in each plot, what Column name to color by
|
|
44
|
+
key: plot.name, value: column name
|
|
45
|
+
if missing, use default setting of the plot
|
|
46
|
+
*/
|
|
47
|
+
colorBy?: { [key: string]: string }
|
|
48
|
+
colorMap?: { [key: string]: string }
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
export type HasdataResponse = {
|
|
47
52
|
/** List of plots from singlecell experiment of this sample */
|
|
48
53
|
plots: Plot[]
|
|
49
|
-
|
|
50
|
-
/** Terms used to annotate cells */
|
|
51
|
-
//terms: Term[]
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export type NodataResponse = {
|