@sjcrh/proteinpaint-types 2.163.0 → 2.164.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/aiProjectSelectedWSImages.js +1 -1
- package/dist/{chunk-225Q2ZUA.js → chunk-C6EUYXHJ.js} +5 -1
- package/dist/{chunk-ETMCI34A.js → chunk-ZFEV22KC.js} +5 -1
- package/dist/index.js +2 -2
- package/dist/samplewsimages.js +1 -1
- package/package.json +1 -1
- package/src/dataset.ts +59 -11
- package/src/routes/aiProjectSelectedWSImages.ts +1 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
aiProjectSelectedWSImagesResponsePayload,
|
|
3
3
|
validAiProjectSelectedWSImagesRequest,
|
|
4
4
|
validAiProjectSelectedWSImagesResponse
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C6EUYXHJ.js";
|
|
6
6
|
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
aiProjectSelectedWSImagesResponsePayload,
|
|
@@ -74,7 +74,7 @@ var validAiProjectSelectedWSImagesResponse = (input) => {
|
|
|
74
74
|
const __is = (input2) => {
|
|
75
75
|
const $io0 = (input3) => Array.isArray(input3.wsimages) && input3.wsimages.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
|
|
76
76
|
const $io1 = (input3) => (void 0 === input3.id || "number" === typeof input3.id) && "string" === typeof input3.filename && (void 0 === input3.metadata || "string" === typeof input3.metadata) && (void 0 === input3.predictionLayers || Array.isArray(input3.predictionLayers) && input3.predictionLayers.every((elem) => "string" === typeof elem)) && (void 0 === input3.annotations || Array.isArray(input3.annotations) && input3.annotations.every((elem) => "object" === typeof elem && null !== elem && $io2(elem))) && (void 0 === input3.predictions || Array.isArray(input3.predictions) && input3.predictions.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && (void 0 === input3.classes || Array.isArray(input3.classes) && input3.classes.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && true && (void 0 === input3.activePatchColor || "string" === typeof input3.activePatchColor) && (void 0 === input3.tileSize || "number" === typeof input3.tileSize);
|
|
77
|
-
const $io2 = (input3) => "string" === typeof input3["class"] && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
|
|
77
|
+
const $io2 = (input3) => "string" === typeof input3["class"] && (void 0 === input3.timestamp || "string" === typeof input3.timestamp) && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
|
|
78
78
|
const $io3 = (input3) => "string" === typeof input3["class"] && "number" === typeof input3.uncertainty && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
|
|
79
79
|
const $io4 = (input3) => "number" === typeof input3.id && "string" === typeof input3.key_shortcut && "string" === typeof input3.label && "string" === typeof input3.color;
|
|
80
80
|
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
@@ -184,6 +184,10 @@ var validAiProjectSelectedWSImagesResponse = (input) => {
|
|
|
184
184
|
path: _path2 + '["class"]',
|
|
185
185
|
expected: "string",
|
|
186
186
|
value: input3["class"]
|
|
187
|
+
}), void 0 === input3.timestamp || "string" === typeof input3.timestamp || $report(_exceptionable2, {
|
|
188
|
+
path: _path2 + ".timestamp",
|
|
189
|
+
expected: "(string | undefined)",
|
|
190
|
+
value: input3.timestamp
|
|
187
191
|
}), (Array.isArray(input3.zoomCoordinates) || $report(_exceptionable2, {
|
|
188
192
|
path: _path2 + ".zoomCoordinates",
|
|
189
193
|
expected: "[number, number]",
|
|
@@ -66,7 +66,7 @@ var validSampleWSImagesResponse = (input) => {
|
|
|
66
66
|
const __is = (input2) => {
|
|
67
67
|
const $io0 = (input3) => Array.isArray(input3.sampleWSImages) && input3.sampleWSImages.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
|
|
68
68
|
const $io1 = (input3) => (void 0 === input3.id || "number" === typeof input3.id) && "string" === typeof input3.filename && (void 0 === input3.metadata || "string" === typeof input3.metadata) && (void 0 === input3.predictionLayers || Array.isArray(input3.predictionLayers) && input3.predictionLayers.every((elem) => "string" === typeof elem)) && (void 0 === input3.annotations || Array.isArray(input3.annotations) && input3.annotations.every((elem) => "object" === typeof elem && null !== elem && $io2(elem))) && (void 0 === input3.predictions || Array.isArray(input3.predictions) && input3.predictions.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && (void 0 === input3.classes || Array.isArray(input3.classes) && input3.classes.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && true && (void 0 === input3.activePatchColor || "string" === typeof input3.activePatchColor) && (void 0 === input3.tileSize || "number" === typeof input3.tileSize);
|
|
69
|
-
const $io2 = (input3) => "string" === typeof input3["class"] && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
|
|
69
|
+
const $io2 = (input3) => "string" === typeof input3["class"] && (void 0 === input3.timestamp || "string" === typeof input3.timestamp) && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
|
|
70
70
|
const $io3 = (input3) => "string" === typeof input3["class"] && "number" === typeof input3.uncertainty && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
|
|
71
71
|
const $io4 = (input3) => "number" === typeof input3.id && "string" === typeof input3.key_shortcut && "string" === typeof input3.label && "string" === typeof input3.color;
|
|
72
72
|
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
@@ -176,6 +176,10 @@ var validSampleWSImagesResponse = (input) => {
|
|
|
176
176
|
path: _path2 + '["class"]',
|
|
177
177
|
expected: "string",
|
|
178
178
|
value: input3["class"]
|
|
179
|
+
}), void 0 === input3.timestamp || "string" === typeof input3.timestamp || $report(_exceptionable2, {
|
|
180
|
+
path: _path2 + ".timestamp",
|
|
181
|
+
expected: "(string | undefined)",
|
|
182
|
+
value: input3.timestamp
|
|
179
183
|
}), (Array.isArray(input3.zoomCoordinates) || $report(_exceptionable2, {
|
|
180
184
|
path: _path2 + ".zoomCoordinates",
|
|
181
185
|
expected: "[number, number]",
|
package/dist/index.js
CHANGED
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
sampleWSImagesPayload,
|
|
188
188
|
validSampleWSImagesRequest,
|
|
189
189
|
validSampleWSImagesResponse
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-ZFEV22KC.js";
|
|
191
191
|
import {
|
|
192
192
|
gdcMafPayload,
|
|
193
193
|
validGdcMafRequest,
|
|
@@ -277,7 +277,7 @@ import {
|
|
|
277
277
|
aiProjectSelectedWSImagesResponsePayload,
|
|
278
278
|
validAiProjectSelectedWSImagesRequest,
|
|
279
279
|
validAiProjectSelectedWSImagesResponse
|
|
280
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-C6EUYXHJ.js";
|
|
281
281
|
import {
|
|
282
282
|
aiProjectTrainModelPayload,
|
|
283
283
|
validAIProjectTrainModelRequest,
|
package/dist/samplewsimages.js
CHANGED
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -384,19 +384,12 @@ type SvFusion = {
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
type SingleSampleMutationQuery = {
|
|
387
|
-
/**
|
|
388
|
-
|
|
389
|
-
for non-native ds, the getter should return an json array with same structure
|
|
387
|
+
/** ds supplied getter
|
|
388
|
+
returns same json array as native. see example below
|
|
390
389
|
*/
|
|
391
|
-
|
|
392
|
-
/** which property of client mutation object to retrieve sample identifier for
|
|
393
|
-
* querying single sample data with */
|
|
390
|
+
get?: (f: any) => void
|
|
391
|
+
/** which property of client mutation object to retrieve sample identifier for querying single sample data with */
|
|
394
392
|
sample_id_key: string
|
|
395
|
-
/** only required for src=native
|
|
396
|
-
folder contains a set of files, one file per sample, file named by sample name
|
|
397
|
-
each file contains a stringified json array of mutation/cnv/sv entries (aka mlst)
|
|
398
|
-
*/
|
|
399
|
-
folder?: string
|
|
400
393
|
/** disco plot will be launched when singleSampleMutation is enabled. supply customization options here */
|
|
401
394
|
discoPlot?: {
|
|
402
395
|
/** if true, disco plot will hide chrM, due to reason e.g. this dataset doesn't have data on chrM */
|
|
@@ -404,6 +397,16 @@ type SingleSampleMutationQuery = {
|
|
|
404
397
|
/** if true, filter mutations by predefined geneset by default */
|
|
405
398
|
prioritizeGeneLabelsByGeneSets?: true
|
|
406
399
|
}
|
|
400
|
+
/** rest of properties are required for native ds without ds-supplied getter
|
|
401
|
+
TODO migrate gdc to get() and delete .src=native
|
|
402
|
+
*/
|
|
403
|
+
src?: 'native' | 'gdcapi' | string
|
|
404
|
+
/** only required for src=native
|
|
405
|
+
folder contains a set of files, one file per sample, file named by sample name
|
|
406
|
+
each file contains a stringified json array of mutation/cnv/sv entries (aka mlst). see example
|
|
407
|
+
https://github.com/stjude/proteinpaint/blob/master/server/test/tp/files/hg38/TermdbTest/mutationpersample/3318
|
|
408
|
+
*/
|
|
409
|
+
folder?: string
|
|
407
410
|
}
|
|
408
411
|
|
|
409
412
|
type NIdataQuery = {
|
|
@@ -1047,6 +1050,9 @@ export type WSImages = {
|
|
|
1047
1050
|
/** dynamically added on launch with built in logic */
|
|
1048
1051
|
deleteWSIAnnotation?: (annotation: DeleteWSIAnnotationRequest) => Promise<void>
|
|
1049
1052
|
|
|
1053
|
+
/** dynamically added on launch with built in logic - returns all image filenames for a project */
|
|
1054
|
+
getAllWSImages?: (projectId: string) => Promise<string[]>
|
|
1055
|
+
|
|
1050
1056
|
/** either ds supplied or dynamically added on launch with built in logic (retrieve the sample list from the wsimages table) */
|
|
1051
1057
|
getSamples?: () => Promise<Array<WSISample>>
|
|
1052
1058
|
/** either ds supplied or dynamically added on launch with built in logic */
|
|
@@ -1572,6 +1578,25 @@ keep this setting here for reason of:
|
|
|
1572
1578
|
isTermVisible?: (clientAuthResult: any, ids: string) => boolean
|
|
1573
1579
|
hiddenIds?: string[]
|
|
1574
1580
|
getAdditionalFilter?: (__protected__: any, term: any) => Filter | undefined
|
|
1581
|
+
/** collections of numeric dictionary terms that are related and can be used together in some plots
|
|
1582
|
+
*/
|
|
1583
|
+
numericTermCollections?: NumericTermCollection[]
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
type NumericTermCollection = {
|
|
1587
|
+
/** human readable name for this collection */
|
|
1588
|
+
name: string
|
|
1589
|
+
/** array of dictionary numeric term ids belonging to this collection */
|
|
1590
|
+
termIds: string[]
|
|
1591
|
+
/** array of branch term ids belonging to this collection */
|
|
1592
|
+
branchIds: string[]
|
|
1593
|
+
/** preconfigured cohort-level plots for this collection */
|
|
1594
|
+
plots?: {
|
|
1595
|
+
/** name of this plot */
|
|
1596
|
+
name: string
|
|
1597
|
+
/** json file path of this plot */
|
|
1598
|
+
file: string
|
|
1599
|
+
}[]
|
|
1575
1600
|
}
|
|
1576
1601
|
|
|
1577
1602
|
type SampleType = {
|
|
@@ -1611,6 +1636,8 @@ type Variant2Samples = GdcApi & {
|
|
|
1611
1636
|
variantkey: string
|
|
1612
1637
|
twLst?: Tw[]
|
|
1613
1638
|
sunburst_twLst?: Tw[]
|
|
1639
|
+
/** ds-supplied getter */
|
|
1640
|
+
getMutatedSamples?: (q: any, ds: any) => void
|
|
1614
1641
|
}
|
|
1615
1642
|
|
|
1616
1643
|
type MutationSet = {
|
|
@@ -1922,6 +1949,21 @@ export type Mds3 = BaseMds & {
|
|
|
1922
1949
|
data during post-processing */
|
|
1923
1950
|
postProcessDtFilter?: boolean
|
|
1924
1951
|
}
|
|
1952
|
+
demoJwtInput?: {
|
|
1953
|
+
[role: string]: {
|
|
1954
|
+
datasets?: string[]
|
|
1955
|
+
clientAuthResult?: // sjcares, panMB, SJLife
|
|
1956
|
+
| ClientAuthResult
|
|
1957
|
+
// profile
|
|
1958
|
+
| {
|
|
1959
|
+
[cohort: string]: ClientAuthResult
|
|
1960
|
+
}
|
|
1961
|
+
// below will be assigned by /demoToken route handler if not specified
|
|
1962
|
+
iat?: number // jwt issued at time, unix time in seconds
|
|
1963
|
+
exp?: number // jwt expiration, unix time in seconds
|
|
1964
|
+
email?: string
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1925
1967
|
// !!! TODO: improve these type definitions below !!!
|
|
1926
1968
|
getHostHeaders?: (q?: any) => any
|
|
1927
1969
|
serverconfigFeatures?: any
|
|
@@ -1930,6 +1972,12 @@ export type Mds3 = BaseMds & {
|
|
|
1930
1972
|
}
|
|
1931
1973
|
}
|
|
1932
1974
|
|
|
1975
|
+
export type ClientAuthResult = {
|
|
1976
|
+
role?: string
|
|
1977
|
+
datasets?: string[]
|
|
1978
|
+
sites?: string[]
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1933
1981
|
export type Mds3WithCohort = Mds3 & {
|
|
1934
1982
|
cohort: Cohort
|
|
1935
1983
|
}
|