@sjcrh/proteinpaint-types 2.134.0 → 2.135.2-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 (34) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-2XROHKXU.js → chunk-3E73QFTY.js} +5 -1
  3. package/dist/{chunk-IJLAEEK7.js → chunk-FD6CMKNN.js} +13 -5
  4. package/dist/{chunk-HYSQJBXK.js → chunk-GVBBTRW4.js} +5 -1
  5. package/dist/{chunk-QHN3YO6Q.js → chunk-H22BWCN6.js} +5 -1
  6. package/dist/{chunk-QXF3NCJ4.js → chunk-HLGKC33X.js} +5 -1
  7. package/dist/{chunk-7QZTJ7A4.js → chunk-KGAG7LFV.js} +5 -1
  8. package/dist/{chunk-J7ODYX6N.js → chunk-LE4EWSSO.js} +5 -1
  9. package/dist/{chunk-UL54XEPY.js → chunk-OWOZVNBC.js} +5 -1
  10. package/dist/{chunk-7RY7HC24.js → chunk-QDJKDC4P.js} +10 -2
  11. package/dist/{chunk-ODP5ODIV.js → chunk-R4FOQROL.js} +5 -1
  12. package/dist/{chunk-MBQT6GOO.js → chunk-R5CPHK6E.js} +10 -2
  13. package/dist/{chunk-447OFOQM.js → chunk-SLKGLGFE.js} +5 -1
  14. package/dist/{chunk-UMGJNQ2O.js → chunk-VMZC4IN7.js} +5 -1
  15. package/dist/{chunk-TCSJGKT3.js → chunk-XH7LJZRQ.js} +286 -29
  16. package/dist/correlationVolcano.js +1 -1
  17. package/dist/gdc.grin2.js +1 -1
  18. package/dist/index.js +14 -14
  19. package/dist/profileScores.js +1 -1
  20. package/dist/termdb.boxplot.js +1 -1
  21. package/dist/termdb.categories.js +1 -1
  22. package/dist/termdb.cluster.js +1 -1
  23. package/dist/termdb.descrstats.js +1 -1
  24. package/dist/termdb.numericcategories.js +1 -1
  25. package/dist/termdb.percentile.js +1 -1
  26. package/dist/termdb.termsbyids.js +1 -1
  27. package/dist/termdb.topTermsByType.js +1 -1
  28. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  29. package/dist/termdb.violin.js +1 -1
  30. package/package.json +1 -1
  31. package/src/dataset.ts +22 -16
  32. package/src/filter.ts +2 -0
  33. package/src/routes/gdc.grin2.ts +45 -2
  34. package/src/routes/profileScores.ts +1 -1
package/src/dataset.ts CHANGED
@@ -1519,19 +1519,6 @@ type MutationSet = {
1519
1519
  }
1520
1520
 
1521
1521
  /** different methods to return samples with assay availability info */
1522
- type DtAssayAvailability = DtAssayAvailabilityGetter | DtAssayAvailabilityTerm
1523
-
1524
- /** using ds-supplied getter */
1525
- type DtAssayAvailabilityGetter = {
1526
- /** define q
1527
- returns:
1528
- {
1529
- yesSamples: Set() of sample ids
1530
- noSamples: Set() of sample ids
1531
- }
1532
- */
1533
- get: (q: any) => any
1534
- }
1535
1522
  /** using dictionary term */
1536
1523
  type DtAssayAvailabilityTerm = {
1537
1524
  /** id of this assay term for this dt */
@@ -1542,21 +1529,32 @@ type DtAssayAvailabilityTerm = {
1542
1529
  yes: { value: string[] }
1543
1530
  /** categories meaning the sample doesn't have this assay */
1544
1531
  no: { value: string[] }
1532
+ /** dynamically generated cached sample lists on server launch, can also be ds-supplied.
1533
+ each is a Set of sample integer id (non-gdc ds) or sample name (case uuid for gdc)
1534
+ */
1535
+ yesSamples?: Set<string | number>
1536
+ noSamples?: Set<string | number>
1545
1537
  }
1546
1538
 
1547
1539
  type DtAssayAvailabilityByOrigin = {
1548
1540
  byOrigin: {
1549
1541
  /** each key is an origin value or category */
1550
- [index: string]: DtAssayAvailability
1542
+ [index: string]: DtAssayAvailabilityTerm
1551
1543
  }
1552
1544
  }
1553
1545
 
1546
+ /** assay availability can be set up as below, during server init it will query by assay dictionary terms to populate yes/no samples for each dt
1547
+ or as in gdc, it is entirely setup ad-hoc
1548
+ */
1554
1549
  type Mds3AssayAvailability = {
1555
1550
  /** object of key-value pairs. keys are dt values */
1556
1551
  byDt: {
1557
1552
  /** each index is a dt value */
1558
- [index: number]: DtAssayAvailabilityByOrigin | DtAssayAvailability
1553
+ [index: number]: DtAssayAvailabilityByOrigin | DtAssayAvailabilityTerm
1559
1554
  }
1555
+ /** if true, ds will use both filter and filter0 to filter samples (this is a temp quick fix)
1556
+ */
1557
+ useFilter0?: true
1560
1558
  }
1561
1559
 
1562
1560
  // mds legacy; delete when all are migrated to mds3
@@ -2065,7 +2063,15 @@ export type Mds3 = BaseMds & {
2065
2063
  the param contents will be assessed by ds specific getter
2066
2064
  this is serverside only, not passed to termdbConfig
2067
2065
  */
2068
- mayGetGeneVariantDataParam?: { [key: string]: any }
2066
+ mayGetGeneVariantDataParam?: {
2067
+ [key: string]: any
2068
+ /** this flag determines whether geneVariant data is filtered during post-processing
2069
+ normally, geneVariant data is filtered during data query
2070
+ but the filter structure used by gdc is not compatible with
2071
+ geneVariant data filtering, so this flag is used to filter
2072
+ data during post-processing */
2073
+ postProcessDtFilter?: boolean
2074
+ }
2069
2075
  // !!! TODO: improve these type definitions below !!!
2070
2076
  getHostHeaders?: (q?: any) => any
2071
2077
  serverconfigFeatures?: any
package/src/filter.ts CHANGED
@@ -55,6 +55,8 @@ export type ConditionTvs = BaseTvs & {
55
55
  type GeneVariantTvs = BaseTvs & {
56
56
  term: DtTerm
57
57
  values: { key: string; label: string; value: string }[]
58
+ /** boolean for including not tested classes (excluded by default) */
59
+ includeNotTested?: boolean
58
60
  }
59
61
 
60
62
  /*** types supporting Filter type ***/
@@ -133,15 +133,58 @@ export type RustErrorEntry = {
133
133
 
134
134
  /** Summary information from Rust processing */
135
135
  export type RustSummary = {
136
+ type: 'summary'
136
137
  total_files: number
137
138
  successful_files: number
138
139
  failed_files: number
140
+ errors: RustErrorEntry[]
141
+ filtered_records: number
142
+ filtered_maf_records: number
143
+ filtered_cnv_records: number
144
+ included_maf_records: number
145
+ included_cnv_records: number
146
+
147
+ /** The complex nested structure of the per case object
148
+ * Records filtered by case, with MAF and CNV statistics
149
+ */
150
+ filtered_records_by_case: Record<
151
+ string,
152
+ {
153
+ maf: {
154
+ matched_consequences: Record<string, any>
155
+ rejected_consequences: Record<string, any>
156
+ t_alt_count: number
157
+ t_depth: number
158
+ invalid_rows: number
159
+ excluded_by_min_depth: number
160
+ excluded_by_min_alt_count: number
161
+ excluded_by_consequence_type: number
162
+ total_processed: number
163
+ total_included: number
164
+ skipped_chromosomes: Record<string, number>
165
+ }
166
+ cnv: {
167
+ segment_mean: number
168
+ seg_length: number
169
+ invalid_rows: number
170
+ excluded_by_loss_threshold: number
171
+ excluded_by_gain_threshold: number
172
+ excluded_by_segment_length: number
173
+ total_processed: number
174
+ total_included: number
175
+ skipped_chromosomes: Record<string, number>
176
+ }
177
+ }
178
+ >
179
+
180
+ hyper_mutator_records: Record<string, string[]>
181
+ excluded_by_max_record: Record<string, string[]>
139
182
  }
140
183
 
141
184
  /** Structured output from Rust GRIN2 processing */
142
185
  export type RustGRIN2Result = {
143
- /** Array of successful file data arrays */
144
- successful_data: string[][]
186
+ /** String of successful file data */
187
+ successful_data: string
145
188
  /** Array of failed file information */
146
189
  failed_files: RustErrorEntry[]
147
190
  /** Summary statistics */
@@ -5,7 +5,7 @@ export type ProfileScoresRequest = {
5
5
  filter?: any
6
6
  isRadarFacility?: boolean
7
7
  userSites?: string[]
8
- site?: string
8
+ sites?: string[]
9
9
  isAggregate?: boolean
10
10
  facilityTW?: any
11
11
  }