@sjcrh/proteinpaint-types 2.136.0 → 2.137.1-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.
Files changed (33) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-SLKGLGFE.js → chunk-3P6M5ZNJ.js} +10 -6
  3. package/dist/{chunk-HLGKC33X.js → chunk-AKJWBIUV.js} +10 -6
  4. package/dist/{chunk-3E73QFTY.js → chunk-B2FSTXLW.js} +10 -6
  5. package/dist/{chunk-KGAG7LFV.js → chunk-BS7BYTYZ.js} +10 -6
  6. package/dist/{chunk-QDJKDC4P.js → chunk-C32XALTH.js} +20 -12
  7. package/dist/{chunk-GVBBTRW4.js → chunk-DA6B77HN.js} +10 -6
  8. package/dist/{chunk-LE4EWSSO.js → chunk-G5SBQR25.js} +10 -6
  9. package/dist/{chunk-H22BWCN6.js → chunk-HF2D3UVQ.js} +10 -6
  10. package/dist/{chunk-R4FOQROL.js → chunk-M7HKDHB3.js} +10 -6
  11. package/dist/{chunk-VMZC4IN7.js → chunk-MLAGM7F5.js} +10 -6
  12. package/dist/{chunk-R5CPHK6E.js → chunk-OQVYIYZL.js} +20 -12
  13. package/dist/{chunk-OWOZVNBC.js → chunk-UG7RYMCA.js} +10 -6
  14. package/dist/chunk-Z2VOERJ2.js +339 -0
  15. package/dist/correlationVolcano.js +1 -1
  16. package/dist/grin2.js +11 -0
  17. package/dist/index.js +36 -28
  18. package/dist/termdb.boxplot.js +1 -1
  19. package/dist/termdb.categories.js +1 -1
  20. package/dist/termdb.cluster.js +1 -1
  21. package/dist/termdb.descrstats.js +1 -1
  22. package/dist/termdb.numericcategories.js +1 -1
  23. package/dist/termdb.percentile.js +1 -1
  24. package/dist/termdb.termsbyids.js +1 -1
  25. package/dist/termdb.topTermsByType.js +1 -1
  26. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  27. package/dist/termdb.violin.js +1 -1
  28. package/package.json +1 -1
  29. package/src/dataset.ts +35 -1
  30. package/src/filter.ts +3 -0
  31. package/src/index.ts +1 -0
  32. package/src/routes/grin2.ts +119 -0
  33. package/src/terms/term.ts +1 -1
package/src/dataset.ts CHANGED
@@ -371,11 +371,45 @@ type SvFusion = {
371
371
  }
372
372
 
373
373
  type SingleSampleMutationQuery = {
374
+ /** for native ds, each file should contain a stringified json array with elements below
375
+ for non-native ds, the getter should return an json array with same structure:
376
+
377
+ cnv example entry:
378
+ {
379
+ "chromosome": "chr1",
380
+ "start": 123456,
381
+ "end": 123789,
382
+ "type": "cnv",
383
+ "log2Ratio": null
384
+ }
385
+
386
+ snvindel example entry:
387
+ {
388
+ "chromosome": "chr1",
389
+ "start": 123456,
390
+ "end": 123789,
391
+ "type": "snvindel"
392
+ }
393
+ TODO specify property names for read depth; needed for grin2 filtering
394
+
395
+ fusion example entry:
396
+ {
397
+ "chromosome": "chr1",
398
+ "start": 123456,
399
+ "end": 123789,
400
+ "type": "fusion",
401
+ "fusionType": null,
402
+ "confidence": null
403
+ }
404
+ */
374
405
  src: 'native' | 'gdcapi' | string
375
406
  /** which property of client mutation object to retrieve sample identifier for
376
407
  * querying single sample data with */
377
408
  sample_id_key: string
378
- /** only required for src=native */
409
+ /** only required for src=native
410
+ folder contains a set of files, one file per sample, file named by sample name
411
+ each file contains a stringified json array of mutation/cnv/sv entries (aka mlst)
412
+ */
379
413
  folder?: string
380
414
  /** disco plot will be launched when singleSampleMutation is enabled. supply customization options here */
381
415
  discoPlot?: {
package/src/filter.ts CHANGED
@@ -57,6 +57,9 @@ type GeneVariantTvs = BaseTvs & {
57
57
  values: { key: string; label: string; value: string }[]
58
58
  /** boolean for including not tested classes (excluded by default) */
59
59
  includeNotTested?: boolean
60
+ /** boolean for excluding gene name from pill name (included by default)
61
+ * used by geneVariant edit ui to exclude unnecessary gene name */
62
+ excludeGeneName?: boolean
60
63
  }
61
64
 
62
65
  /*** types supporting Filter type ***/
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ export * from './routes/filter.gdc.ts'
18
18
  export * from './routes/gdc.maf.ts'
19
19
  export * from './routes/gdc.mafBuild.ts'
20
20
  export * from './routes/gdc.grin2.ts'
21
+ export * from './routes/grin2.ts'
21
22
  export * from './routes/termdb.topMutatedGenes.ts'
22
23
  export * from './routes/genelookup.ts'
23
24
  export * from './routes/genesetEnrichment.ts'
@@ -0,0 +1,119 @@
1
+ /** General GRIN2 route
2
+ * This route handles the GRIN2 analysis for any non-GDC data.
3
+ * It processes the incoming data structure via PP's existing filter infrastructure
4
+ * and returns the same structured results as GDC-GRIN2.
5
+ * Specifically it will return a sortable table of top mutated genes and
6
+ * a static PNG manhattan-like plot of the -log10(q-value).
7
+ * We allow the user to customize the snvindel, CNV, and fusion filtering options.
8
+ */
9
+
10
+ import type { RoutePayload } from './routeApi.js'
11
+
12
+ /** GRIN2 request */
13
+ export type GRIN2Request = {
14
+ /** Genome build identifier (e.g., 'hg38', 'hg19') */
15
+ genome: string
16
+
17
+ /** Dataset label within the genome */
18
+ dslabel: string
19
+
20
+ /** Filter from existing PP infrastructure */
21
+ filter: any // Filter object passed to get_samples(filter, ds)
22
+
23
+ /** Options for filtering SNV/indel file content */
24
+ snvindelOptions?: {
25
+ /** Minimum total depth of returned SNV/indel files */
26
+ minTotalDepth?: number // Default: 10
27
+ /** Minimum alternate allele count of returned SNV/indel files */
28
+ minAltAlleleCount?: number // Default: 2
29
+ /** String array of consequence types to include */
30
+ consequences?: string[]
31
+ /** Maximum mutation count cutoff for highly mutated scenarios */
32
+ hyperMutator?: number // Default: 1000
33
+ }
34
+
35
+ /** Options for filtering CNV file content */
36
+ cnvOptions?: {
37
+ /** Threshold for copy number loss detection */
38
+ lossThreshold?: number // Default: -0.4
39
+ /** Threshold for copy number gain detection */
40
+ gainThreshold?: number // Default: 0.3
41
+ /** Maximum segment length to include (0 = no filter) */
42
+ maxSegLength?: number // Default: 0
43
+ /** Minimum segment length to include (0 = no filter) */
44
+ minSegLength?: number // Default: 0
45
+ /** Hypermutator max cut off for CNVs per case */
46
+ hyperMutator?: number // Default: 500
47
+ }
48
+
49
+ /** Options for filtering fusion file content */
50
+ fusionOptions?: {
51
+ /** Filter by fusion type */
52
+ fusionTypes?: ('gene-gene' | 'gene-intergenic' | 'readthrough')[]
53
+ /** Minimum confidence score (0-1) */
54
+ minConfidence?: number // Default: 0.7
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Response for GRIN2 analysis run
60
+ */
61
+ export type GRIN2Response = {
62
+ /** Status of the analysis */
63
+ status: 'success' | 'error'
64
+ /** Error message if status is 'error' */
65
+ error?: string
66
+ /** Base64-encoded PNG Manhattan plot image */
67
+ pngImg?: string
68
+ /** Download status/info */
69
+ download?: any
70
+ /** Sortable table of top genes identified by GRIN2 */
71
+ topGeneTable?: {
72
+ /** Column definitions with labels and sort capabilities */
73
+ columns: Array<{
74
+ label: string
75
+ sortable: boolean
76
+ }>
77
+ /** Data rows with gene information and statistics */
78
+ rows: Array<
79
+ Array<{
80
+ value: string | number
81
+ }>
82
+ >
83
+ }
84
+ /** Summary statistics */
85
+ totalGenes?: number
86
+ showingTop?: number
87
+ /** Timing info for the analysis */
88
+ timing?: {
89
+ /** Time taken to run data processing */
90
+ processingTime: number
91
+ /** Time taken to run GRIN2 processing */
92
+ grin2Time: number
93
+ /** Total time taken for the entire run */
94
+ totalTime: number
95
+ }
96
+ /** Detailed processing summary */
97
+ processingSummary?: {
98
+ totalSamples: number
99
+ successfulSamples: number
100
+ failedSamples: number
101
+ failedFiles: Array<{
102
+ sampleName: string
103
+ filePath: string
104
+ error: string
105
+ }>
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Route payload definitions for type checking
111
+ */
112
+ export const GRIN2Payload: RoutePayload = {
113
+ request: {
114
+ typeId: 'GRIN2Request'
115
+ },
116
+ response: {
117
+ typeId: 'GRIN2Response'
118
+ }
119
+ }
package/src/terms/term.ts CHANGED
@@ -123,7 +123,7 @@ export type FilterGroup = {
123
123
  name: string
124
124
  type: 'filter'
125
125
  filter: Filter
126
- uncomputable: boolean
126
+ color: string
127
127
  }
128
128
 
129
129
  export type GroupEntry = ValuesGroup | FilterGroup