@sjcrh/proteinpaint-types 2.129.2 → 2.129.6
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-UWNYHMCA.js → chunk-5VCMJ7QL.js} +53 -1
- package/dist/gdc.grin2.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/dataset.ts +52 -34
- package/src/routes/gdc.grin2.ts +12 -0
|
@@ -70,13 +70,15 @@ var validGdcGRIN2listRequest = (input) => {
|
|
|
70
70
|
var validGdcGRIN2listResponse = (input) => {
|
|
71
71
|
const errors = [];
|
|
72
72
|
const __is = (input2) => {
|
|
73
|
-
const $io0 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem)) && "number" === typeof input3.filesTotal && "number" === typeof input3.maxTotalSizeCompressed && (void 0 === input3.fileCounts || "object" === typeof input3.fileCounts && null !== input3.fileCounts && $io2(input3.fileCounts)) && (void 0 === input3.appliedFilters || "object" === typeof input3.appliedFilters && null !== input3.appliedFilters && false === Array.isArray(input3.appliedFilters) && $io3(input3.appliedFilters)) && (void 0 === input3.deduplicationStats || "object" === typeof input3.deduplicationStats && null !== input3.deduplicationStats && $io4(input3.deduplicationStats));
|
|
73
|
+
const $io0 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem)) && "number" === typeof input3.filesTotal && "number" === typeof input3.maxTotalSizeCompressed && (void 0 === input3.fileCounts || "object" === typeof input3.fileCounts && null !== input3.fileCounts && $io2(input3.fileCounts)) && (void 0 === input3.appliedFilters || "object" === typeof input3.appliedFilters && null !== input3.appliedFilters && false === Array.isArray(input3.appliedFilters) && $io3(input3.appliedFilters)) && (void 0 === input3.deduplicationStats || "object" === typeof input3.deduplicationStats && null !== input3.deduplicationStats && $io4(input3.deduplicationStats)) && (void 0 === input3.mafFiles || "object" === typeof input3.mafFiles && null !== input3.mafFiles && $io7(input3.mafFiles)) && (void 0 === input3.cnvFiles || "object" === typeof input3.cnvFiles && null !== input3.cnvFiles && $io8(input3.cnvFiles));
|
|
74
74
|
const $io1 = (input3) => "string" === typeof input3.id && "string" === typeof input3.case_submitter_id && "string" === typeof input3.case_uuid && "number" === typeof input3.file_size && (Array.isArray(input3.sample_types) && input3.sample_types.every((elem) => "string" === typeof elem)) && "string" === typeof input3.project_id && (void 0 === input3.file_format || "MAF" === input3.file_format);
|
|
75
75
|
const $io2 = (input3) => "number" === typeof input3.maf;
|
|
76
76
|
const $io3 = (input3) => void 0 === input3.experimentalStrategy || "WXS" === input3.experimentalStrategy;
|
|
77
77
|
const $io4 = (input3) => "number" === typeof input3.originalFileCount && "number" === typeof input3.deduplicatedFileCount && "number" === typeof input3.duplicatesRemoved && (void 0 === input3.caseDetails || Array.isArray(input3.caseDetails) && input3.caseDetails.every((elem) => "object" === typeof elem && null !== elem && $io5(elem))) && (Array.isArray(input3.filteredFiles) && input3.filteredFiles.every((elem) => "object" === typeof elem && null !== elem && $io6(elem)));
|
|
78
78
|
const $io5 = (input3) => "string" === typeof input3.caseName && "number" === typeof input3.fileCount && "number" === typeof input3.keptFileSize;
|
|
79
79
|
const $io6 = (input3) => "string" === typeof input3.fileId && "number" === typeof input3.fileSize && "string" === typeof input3.reason;
|
|
80
|
+
const $io7 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
|
|
81
|
+
const $io8 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
|
|
80
82
|
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
81
83
|
};
|
|
82
84
|
if (false === __is(input)) {
|
|
@@ -130,6 +132,22 @@ var validGdcGRIN2listResponse = (input) => {
|
|
|
130
132
|
path: _path2 + ".deduplicationStats",
|
|
131
133
|
expected: "(__type.o2 | undefined)",
|
|
132
134
|
value: input3.deduplicationStats
|
|
135
|
+
}), void 0 === input3.mafFiles || ("object" === typeof input3.mafFiles && null !== input3.mafFiles || $report(_exceptionable2, {
|
|
136
|
+
path: _path2 + ".mafFiles",
|
|
137
|
+
expected: "(__type.o5 | undefined)",
|
|
138
|
+
value: input3.mafFiles
|
|
139
|
+
})) && $vo7(input3.mafFiles, _path2 + ".mafFiles", _exceptionable2) || $report(_exceptionable2, {
|
|
140
|
+
path: _path2 + ".mafFiles",
|
|
141
|
+
expected: "(__type.o5 | undefined)",
|
|
142
|
+
value: input3.mafFiles
|
|
143
|
+
}), void 0 === input3.cnvFiles || ("object" === typeof input3.cnvFiles && null !== input3.cnvFiles || $report(_exceptionable2, {
|
|
144
|
+
path: _path2 + ".cnvFiles",
|
|
145
|
+
expected: "(__type.o6 | undefined)",
|
|
146
|
+
value: input3.cnvFiles
|
|
147
|
+
})) && $vo8(input3.cnvFiles, _path2 + ".cnvFiles", _exceptionable2) || $report(_exceptionable2, {
|
|
148
|
+
path: _path2 + ".cnvFiles",
|
|
149
|
+
expected: "(__type.o6 | undefined)",
|
|
150
|
+
value: input3.cnvFiles
|
|
133
151
|
})].every((flag) => flag);
|
|
134
152
|
const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.id || $report(_exceptionable2, {
|
|
135
153
|
path: _path2 + ".id",
|
|
@@ -249,6 +267,40 @@ var validGdcGRIN2listResponse = (input) => {
|
|
|
249
267
|
expected: "string",
|
|
250
268
|
value: input3.reason
|
|
251
269
|
})].every((flag) => flag);
|
|
270
|
+
const $vo7 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.files) || $report(_exceptionable2, {
|
|
271
|
+
path: _path2 + ".files",
|
|
272
|
+
expected: "Array<GdcGRIN2File>",
|
|
273
|
+
value: input3.files
|
|
274
|
+
})) && input3.files.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
275
|
+
path: _path2 + ".files[" + _index5 + "]",
|
|
276
|
+
expected: "GdcGRIN2File",
|
|
277
|
+
value: elem
|
|
278
|
+
})) && $vo1(elem, _path2 + ".files[" + _index5 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
279
|
+
path: _path2 + ".files[" + _index5 + "]",
|
|
280
|
+
expected: "GdcGRIN2File",
|
|
281
|
+
value: elem
|
|
282
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
283
|
+
path: _path2 + ".files",
|
|
284
|
+
expected: "Array<GdcGRIN2File>",
|
|
285
|
+
value: input3.files
|
|
286
|
+
})].every((flag) => flag);
|
|
287
|
+
const $vo8 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.files) || $report(_exceptionable2, {
|
|
288
|
+
path: _path2 + ".files",
|
|
289
|
+
expected: "Array<GdcGRIN2File>",
|
|
290
|
+
value: input3.files
|
|
291
|
+
})) && input3.files.map((elem, _index6) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
292
|
+
path: _path2 + ".files[" + _index6 + "]",
|
|
293
|
+
expected: "GdcGRIN2File",
|
|
294
|
+
value: elem
|
|
295
|
+
})) && $vo1(elem, _path2 + ".files[" + _index6 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
296
|
+
path: _path2 + ".files[" + _index6 + "]",
|
|
297
|
+
expected: "GdcGRIN2File",
|
|
298
|
+
value: elem
|
|
299
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
300
|
+
path: _path2 + ".files",
|
|
301
|
+
expected: "Array<GdcGRIN2File>",
|
|
302
|
+
value: input3.files
|
|
303
|
+
})].every((flag) => flag);
|
|
252
304
|
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
253
305
|
path: _path + "",
|
|
254
306
|
expected: "GdcGRIN2listResponse",
|
package/dist/gdc.grin2.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -78,12 +78,6 @@ type GenomicPositionEntry = {
|
|
|
78
78
|
}
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
|
-
type Chr2bcffile = {
|
|
82
|
-
/** index is the chr (e.g. 'chr1', 'chr2', etc.)
|
|
83
|
-
* value is the bcf file path */
|
|
84
|
-
[index: string]: string
|
|
85
|
-
}
|
|
86
|
-
|
|
87
81
|
type bcfMafFile = {
|
|
88
82
|
/** bcf file for only variants, no samples and FORMAT */
|
|
89
83
|
bcffile: string
|
|
@@ -113,8 +107,14 @@ type SnvindelByRange = {
|
|
|
113
107
|
//local ds can have following different setup
|
|
114
108
|
/** one single bcf file */
|
|
115
109
|
bcffile?: string
|
|
116
|
-
/** one bcf file per chr
|
|
117
|
-
|
|
110
|
+
/** one bcf file per chr
|
|
111
|
+
after loading, this is transformed into byrange._tk.chr2files{}, and deleted!
|
|
112
|
+
*/
|
|
113
|
+
chr2bcffile?: {
|
|
114
|
+
/** index is the chr (e.g. 'chr1', 'chr2', etc.)
|
|
115
|
+
* value is the bcf file path */
|
|
116
|
+
[index: string]: string
|
|
117
|
+
}
|
|
118
118
|
/** bcf+maf combined */
|
|
119
119
|
bcfMafFile?: bcfMafFile
|
|
120
120
|
/** allow to apply special configurations to certain INFO fields of the bcf file */
|
|
@@ -1495,41 +1495,51 @@ type MutationSet = {
|
|
|
1495
1495
|
fusion: string
|
|
1496
1496
|
}
|
|
1497
1497
|
|
|
1498
|
-
|
|
1498
|
+
/** different methods to return samples with assay availability info */
|
|
1499
|
+
type DtAssayAvailability = DtAssayAvailabilityGetter | DtAssayAvailabilityTerm
|
|
1500
|
+
|
|
1501
|
+
/** using ds-supplied getter */
|
|
1502
|
+
type DtAssayAvailabilityGetter = {
|
|
1503
|
+
get: (q: any) => any
|
|
1504
|
+
}
|
|
1505
|
+
/** using dictionary term */
|
|
1506
|
+
type DtAssayAvailabilityTerm = {
|
|
1507
|
+
/** id of this assay term for this dt */
|
|
1499
1508
|
term_id: string
|
|
1509
|
+
/** optional label */
|
|
1510
|
+
label?: string
|
|
1511
|
+
/** categories meaning the sample has this assay */
|
|
1500
1512
|
yes: { value: string[] }
|
|
1513
|
+
/** categories meaning the sample doesn't have this assay */
|
|
1501
1514
|
no: { value: string[] }
|
|
1502
|
-
label?: string
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
type SNVByOrigin = {
|
|
1506
|
-
[index: string]: BaseDtEntry
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
type DtEntrySNV = {
|
|
1510
|
-
byOrigin: SNVByOrigin
|
|
1511
1515
|
}
|
|
1512
1516
|
|
|
1513
|
-
type
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
type AssayValuesEntry = {
|
|
1519
|
-
[index: string]: { label: string; color: string }
|
|
1517
|
+
type DtAssayAvailabilityByOrigin = {
|
|
1518
|
+
byOrigin: {
|
|
1519
|
+
/** each key is an origin value or category */
|
|
1520
|
+
[index: string]: DtAssayAvailability
|
|
1521
|
+
}
|
|
1520
1522
|
}
|
|
1521
1523
|
|
|
1522
|
-
type
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1524
|
+
type Mds3AssayAvailability = {
|
|
1525
|
+
/** object of key-value pairs. keys are dt values */
|
|
1526
|
+
byDt: {
|
|
1527
|
+
/** each index is a dt value */
|
|
1528
|
+
[index: number]: DtAssayAvailabilityByOrigin | DtAssayAvailability
|
|
1529
|
+
}
|
|
1527
1530
|
}
|
|
1528
1531
|
|
|
1529
|
-
|
|
1530
|
-
|
|
1532
|
+
// mds legacy; delete when all are migrated to mds3
|
|
1533
|
+
type LegacyAssayAvailability = {
|
|
1531
1534
|
file?: string
|
|
1532
|
-
assays?:
|
|
1535
|
+
assays?: {
|
|
1536
|
+
id: string
|
|
1537
|
+
name: string
|
|
1538
|
+
type: string
|
|
1539
|
+
values?: {
|
|
1540
|
+
[index: string]: { label: string; color: string }
|
|
1541
|
+
}
|
|
1542
|
+
}[]
|
|
1533
1543
|
}
|
|
1534
1544
|
|
|
1535
1545
|
export type CumBurdenData = {
|
|
@@ -1887,7 +1897,7 @@ type ViewMode = {
|
|
|
1887
1897
|
/*** types supporting Mds Dataset types ***/
|
|
1888
1898
|
type BaseMds = {
|
|
1889
1899
|
genome?: string //Not declared in TermdbTest
|
|
1890
|
-
assayAvailability?:
|
|
1900
|
+
assayAvailability?: Mds3AssayAvailability | LegacyAssayAvailability
|
|
1891
1901
|
}
|
|
1892
1902
|
|
|
1893
1903
|
export type Mds = BaseMds & {
|
|
@@ -1965,6 +1975,14 @@ export type isSupportedChartCallbacks = {
|
|
|
1965
1975
|
}
|
|
1966
1976
|
|
|
1967
1977
|
export type Mds3 = BaseMds & {
|
|
1978
|
+
/** set in initGenomesDs.js during launch, should use .genomename instead of .genome */
|
|
1979
|
+
genomename?: string // use this
|
|
1980
|
+
genome?: string // avoid using it
|
|
1981
|
+
/** server-side genome obj to which this ds belongs to is attached here in initGenomesDs.js during launch,
|
|
1982
|
+
so this obj can be conveniently available to server side functions without having to introduce extra param
|
|
1983
|
+
TODO apply Genome type
|
|
1984
|
+
*/
|
|
1985
|
+
genomeObj?: any
|
|
1968
1986
|
label?: Title
|
|
1969
1987
|
isMds3: boolean
|
|
1970
1988
|
loadWithoutBlocking?: boolean
|
package/src/routes/gdc.grin2.ts
CHANGED
|
@@ -70,6 +70,18 @@ export type GdcGRIN2listResponse = {
|
|
|
70
70
|
caseDetails?: Array<{ caseName: string; fileCount: number; keptFileSize: number }>
|
|
71
71
|
filteredFiles: Array<{ fileId: string; fileSize: number; reason: string }>
|
|
72
72
|
}
|
|
73
|
+
/** all maf-related results when mafOptions is supplied */
|
|
74
|
+
mafFiles?: {
|
|
75
|
+
// TODO suggest to move above maf-related results under mafFiles{}
|
|
76
|
+
/** list of maf files returned to client */
|
|
77
|
+
files: GdcGRIN2File[]
|
|
78
|
+
}
|
|
79
|
+
/** all cnv-related results when cnvOptions is supplied */
|
|
80
|
+
cnvFiles?: {
|
|
81
|
+
/** list of cnv files returned to client */
|
|
82
|
+
files: GdcGRIN2File[]
|
|
83
|
+
/** to add additional stats on cnv file listing */
|
|
84
|
+
}
|
|
73
85
|
}
|
|
74
86
|
|
|
75
87
|
/**
|