@sjcrh/proteinpaint-types 2.161.0 → 2.163.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.
- package/dist/{chunk-CSPVFAJ7.js → chunk-VQOCGHP2.js} +9 -9
- package/dist/grin2.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/dataset.ts +62 -12
- package/src/routes/grin2.ts +4 -4
|
@@ -207,7 +207,7 @@ var validGRIN2Response = (input) => {
|
|
|
207
207
|
const $io5 = (input3) => Array.isArray(input3.columns) && input3.columns.every((elem) => "object" === typeof elem && null !== elem && $io6(elem)) && (Array.isArray(input3.rows) && input3.rows.every((elem) => Array.isArray(elem) && elem.every((elem2) => "object" === typeof elem2 && null !== elem2 && $io7(elem2))));
|
|
208
208
|
const $io6 = (input3) => "string" === typeof input3.label && "boolean" === typeof input3.sortable;
|
|
209
209
|
const $io7 = (input3) => "string" === typeof input3.value || "number" === typeof input3.value;
|
|
210
|
-
const $io8 = (input3) => "
|
|
210
|
+
const $io8 = (input3) => "string" === typeof input3.processingTime && "string" === typeof input3.grin2Time && "string" === typeof input3.plottingTime && "string" === typeof input3.totalTime;
|
|
211
211
|
const $io9 = (input3) => (void 0 === input3.totalSamples || "number" === typeof input3.totalSamples) && (void 0 === input3.processedSamples || "number" === typeof input3.processedSamples) && (void 0 === input3.failedSamples || "number" === typeof input3.failedSamples) && (void 0 === input3.failedFiles || Array.isArray(input3.failedFiles) && input3.failedFiles.every((elem) => "object" === typeof elem && null !== elem && $io10(elem))) && (void 0 === input3.totalLesions || "number" === typeof input3.totalLesions) && (void 0 === input3.processedLesions || "number" === typeof input3.processedLesions) && (void 0 === input3.unprocessedSamples || "number" === typeof input3.unprocessedSamples) && (void 0 === input3.lesionCounts || "object" === typeof input3.lesionCounts && null !== input3.lesionCounts && false === Array.isArray(input3.lesionCounts) && $io11(input3.lesionCounts));
|
|
212
212
|
const $io10 = (input3) => "string" === typeof input3.sampleName && "string" === typeof input3.filePath && "string" === typeof input3.error;
|
|
213
213
|
const $io11 = (input3) => (void 0 === input3.total || "number" === typeof input3.total) && (void 0 === input3.byType || "object" === typeof input3.byType && null !== input3.byType && false === Array.isArray(input3.byType) && $io12(input3.byType));
|
|
@@ -436,21 +436,21 @@ var validGRIN2Response = (input) => {
|
|
|
436
436
|
expected: "(number | string)",
|
|
437
437
|
value: input3.value
|
|
438
438
|
})].every((flag) => flag);
|
|
439
|
-
const $vo8 = (input3, _path2, _exceptionable2 = true) => ["
|
|
439
|
+
const $vo8 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.processingTime || $report(_exceptionable2, {
|
|
440
440
|
path: _path2 + ".processingTime",
|
|
441
|
-
expected: "
|
|
441
|
+
expected: "string",
|
|
442
442
|
value: input3.processingTime
|
|
443
|
-
}), "
|
|
443
|
+
}), "string" === typeof input3.grin2Time || $report(_exceptionable2, {
|
|
444
444
|
path: _path2 + ".grin2Time",
|
|
445
|
-
expected: "
|
|
445
|
+
expected: "string",
|
|
446
446
|
value: input3.grin2Time
|
|
447
|
-
}), "
|
|
447
|
+
}), "string" === typeof input3.plottingTime || $report(_exceptionable2, {
|
|
448
448
|
path: _path2 + ".plottingTime",
|
|
449
|
-
expected: "
|
|
449
|
+
expected: "string",
|
|
450
450
|
value: input3.plottingTime
|
|
451
|
-
}), "
|
|
451
|
+
}), "string" === typeof input3.totalTime || $report(_exceptionable2, {
|
|
452
452
|
path: _path2 + ".totalTime",
|
|
453
|
-
expected: "
|
|
453
|
+
expected: "string",
|
|
454
454
|
value: input3.totalTime
|
|
455
455
|
})].every((flag) => flag);
|
|
456
456
|
const $vo9 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.totalSamples || "number" === typeof input3.totalSamples || $report(_exceptionable2, {
|
package/dist/grin2.js
CHANGED
package/dist/index.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 = {
|
|
@@ -1405,6 +1408,12 @@ export type Termdb = {
|
|
|
1405
1408
|
}
|
|
1406
1409
|
/** if true, backend is allowed to send sample names to client in charts */
|
|
1407
1410
|
displaySampleIds?: (clientAuthResult: any) => boolean
|
|
1411
|
+
/** ds-supplied async callback to build dictionary
|
|
1412
|
+
argument: dataset object
|
|
1413
|
+
sets termdb.q{}
|
|
1414
|
+
no return
|
|
1415
|
+
*/
|
|
1416
|
+
buildDictionary?: (ds: any) => void
|
|
1408
1417
|
converSampleIds?: boolean
|
|
1409
1418
|
alwaysShowBranchTerms?: boolean
|
|
1410
1419
|
minimumSampleAllowed4filter?: number
|
|
@@ -1566,6 +1575,25 @@ keep this setting here for reason of:
|
|
|
1566
1575
|
isTermVisible?: (clientAuthResult: any, ids: string) => boolean
|
|
1567
1576
|
hiddenIds?: string[]
|
|
1568
1577
|
getAdditionalFilter?: (__protected__: any, term: any) => Filter | undefined
|
|
1578
|
+
/** collections of numeric dictionary terms that are related and can be used together in some plots
|
|
1579
|
+
*/
|
|
1580
|
+
numericTermCollections?: NumericTermCollection[]
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
type NumericTermCollection = {
|
|
1584
|
+
/** human readable name for this collection */
|
|
1585
|
+
name: string
|
|
1586
|
+
/** array of dictionary numeric term ids belonging to this collection */
|
|
1587
|
+
termIds: string[]
|
|
1588
|
+
/** array of branch term ids belonging to this collection */
|
|
1589
|
+
branchIds: string[]
|
|
1590
|
+
/** preconfigured cohort-level plots for this collection */
|
|
1591
|
+
plots?: {
|
|
1592
|
+
/** name of this plot */
|
|
1593
|
+
name: string
|
|
1594
|
+
/** json file path of this plot */
|
|
1595
|
+
file: string
|
|
1596
|
+
}[]
|
|
1569
1597
|
}
|
|
1570
1598
|
|
|
1571
1599
|
type SampleType = {
|
|
@@ -1605,6 +1633,8 @@ type Variant2Samples = GdcApi & {
|
|
|
1605
1633
|
variantkey: string
|
|
1606
1634
|
twLst?: Tw[]
|
|
1607
1635
|
sunburst_twLst?: Tw[]
|
|
1636
|
+
/** ds-supplied getter */
|
|
1637
|
+
getMutatedSamples?: (q: any, ds: any) => void
|
|
1608
1638
|
}
|
|
1609
1639
|
|
|
1610
1640
|
type MutationSet = {
|
|
@@ -1781,7 +1811,6 @@ export type Mds = BaseMds & {
|
|
|
1781
1811
|
cohort?: any
|
|
1782
1812
|
queries?: any
|
|
1783
1813
|
mutationAttribute?: any
|
|
1784
|
-
dbFile?: string
|
|
1785
1814
|
version?: { label: string; link: string }
|
|
1786
1815
|
gene2mutcount?: any
|
|
1787
1816
|
locusAttribute?: any
|
|
@@ -1917,6 +1946,21 @@ export type Mds3 = BaseMds & {
|
|
|
1917
1946
|
data during post-processing */
|
|
1918
1947
|
postProcessDtFilter?: boolean
|
|
1919
1948
|
}
|
|
1949
|
+
demoJwtInput?: {
|
|
1950
|
+
[role: string]: {
|
|
1951
|
+
datasets?: string[]
|
|
1952
|
+
clientAuthResult?: // sjcares, panMB, SJLife
|
|
1953
|
+
| ClientAuthResult
|
|
1954
|
+
// profile
|
|
1955
|
+
| {
|
|
1956
|
+
[cohort: string]: ClientAuthResult
|
|
1957
|
+
}
|
|
1958
|
+
// below will be assigned by /demoToken route handler if not specified
|
|
1959
|
+
iat?: number // jwt issued at time, unix time in seconds
|
|
1960
|
+
exp?: number // jwt expiration, unix time in seconds
|
|
1961
|
+
email?: string
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1920
1964
|
// !!! TODO: improve these type definitions below !!!
|
|
1921
1965
|
getHostHeaders?: (q?: any) => any
|
|
1922
1966
|
serverconfigFeatures?: any
|
|
@@ -1925,6 +1969,12 @@ export type Mds3 = BaseMds & {
|
|
|
1925
1969
|
}
|
|
1926
1970
|
}
|
|
1927
1971
|
|
|
1972
|
+
export type ClientAuthResult = {
|
|
1973
|
+
role?: string
|
|
1974
|
+
datasets?: string[]
|
|
1975
|
+
sites?: string[]
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1928
1978
|
export type Mds3WithCohort = Mds3 & {
|
|
1929
1979
|
cohort: Cohort
|
|
1930
1980
|
}
|
package/src/routes/grin2.ts
CHANGED
|
@@ -148,13 +148,13 @@ export type GRIN2Response = {
|
|
|
148
148
|
/** Timing info for the analysis */
|
|
149
149
|
timing?: {
|
|
150
150
|
/** Time taken to run data processing */
|
|
151
|
-
processingTime:
|
|
151
|
+
processingTime: string
|
|
152
152
|
/** Time taken to run GRIN2 processing */
|
|
153
|
-
grin2Time:
|
|
153
|
+
grin2Time: string
|
|
154
154
|
/** Time taken to run Manhattan plot generation */
|
|
155
|
-
plottingTime:
|
|
155
|
+
plottingTime: string
|
|
156
156
|
/** Total time taken for the entire run */
|
|
157
|
-
totalTime:
|
|
157
|
+
totalTime: string
|
|
158
158
|
}
|
|
159
159
|
/** Detailed processing summary */
|
|
160
160
|
processingSummary?: {
|