@sjcrh/proteinpaint-types 2.112.1-0 → 2.114.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 (32) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-FMW25T52.js → chunk-66XSFQPI.js} +282 -182
  3. package/dist/{chunk-ES6BRZ4L.js → chunk-7AQB3YHO.js} +15 -11
  4. package/dist/{chunk-A72XYNKT.js → chunk-BEXUBE5A.js} +15 -11
  5. package/dist/{chunk-TXZQ56TX.js → chunk-BNOGQYXG.js} +421 -251
  6. package/dist/{chunk-7Z3AE4AY.js → chunk-H45GALYV.js} +445 -345
  7. package/dist/{chunk-4CCAF4O5.js → chunk-JNEIQWTE.js} +44 -36
  8. package/dist/{chunk-KHPBBU43.js → chunk-KRHYG2ZZ.js} +610 -580
  9. package/dist/{chunk-NPVDG36X.js → chunk-OSHG443J.js} +401 -371
  10. package/dist/{chunk-GHAIGRB7.js → chunk-PR7XHL4T.js} +15 -11
  11. package/dist/{chunk-ZFUF4XMD.js → chunk-T3NOHXOJ.js} +15 -11
  12. package/dist/{chunk-2WZPM25H.js → chunk-WVBWDL2B.js} +445 -345
  13. package/dist/{chunk-GGKNEHME.js → chunk-XDRUNGOV.js} +192 -162
  14. package/dist/correlationVolcano.js +1 -1
  15. package/dist/index.js +12 -12
  16. package/dist/termdb.boxplot.js +1 -1
  17. package/dist/termdb.categories.js +1 -1
  18. package/dist/termdb.cluster.js +1 -1
  19. package/dist/termdb.descrstats.js +1 -1
  20. package/dist/termdb.numericcategories.js +1 -1
  21. package/dist/termdb.percentile.js +1 -1
  22. package/dist/termdb.termsbyids.js +1 -1
  23. package/dist/termdb.topTermsByType.js +1 -1
  24. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  25. package/dist/termdb.violin.js +1 -1
  26. package/package.json +1 -1
  27. package/src/dataset.ts +31 -15
  28. package/src/routes/termdb.DE.ts +4 -0
  29. package/src/routes/termdb.cluster.ts +7 -2
  30. package/src/terms/geneVariant.ts +23 -2
  31. package/src/terms/term.ts +16 -8
  32. package/src/termsetting.ts +3 -3
@@ -2,7 +2,7 @@ import {
2
2
  CorrelationVolcanoPayload,
3
3
  validCorrelationVolcanoRequest,
4
4
  validCorrelationVolcanoResponse
5
- } from "./chunk-FMW25T52.js";
5
+ } from "./chunk-66XSFQPI.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  CorrelationVolcanoPayload,
package/dist/index.js CHANGED
@@ -7,22 +7,22 @@ import {
7
7
  termsByIdsPayload,
8
8
  validTermsByIdsRequest,
9
9
  validTermsByIdsResponse
10
- } from "./chunk-TXZQ56TX.js";
10
+ } from "./chunk-KRHYG2ZZ.js";
11
11
  import {
12
12
  termdbTopTermsByTypePayload,
13
13
  validTermdbTopTermsByTypeRequest,
14
14
  validTermdbTopTermsByTypeResponse
15
- } from "./chunk-4CCAF4O5.js";
15
+ } from "./chunk-JNEIQWTE.js";
16
16
  import {
17
17
  termdbTopVariablyExpressedGenesPayload,
18
18
  validTermdbTopVariablyExpressedGenesRequest,
19
19
  validTermdbTopVariablyExpressedGenesResponse
20
- } from "./chunk-A72XYNKT.js";
20
+ } from "./chunk-BEXUBE5A.js";
21
21
  import {
22
22
  validViolinRequest,
23
23
  validViolinResponse,
24
24
  violinPayload
25
- } from "./chunk-ZFUF4XMD.js";
25
+ } from "./chunk-T3NOHXOJ.js";
26
26
  import {
27
27
  tilePayload,
28
28
  validTileRequest,
@@ -37,12 +37,12 @@ import {
37
37
  numericCategoriesPayload,
38
38
  validNumericCategoriesRequest,
39
39
  validNumericCategoriesResponse
40
- } from "./chunk-ES6BRZ4L.js";
40
+ } from "./chunk-7AQB3YHO.js";
41
41
  import {
42
42
  percentilePayload,
43
43
  validPercentileRequest,
44
44
  validPercentileResponse
45
- } from "./chunk-GHAIGRB7.js";
45
+ } from "./chunk-PR7XHL4T.js";
46
46
  import {
47
47
  rootTermPayload,
48
48
  validRootTermRequest,
@@ -87,17 +87,17 @@ import {
87
87
  boxplotPayload,
88
88
  validBoxPlotRequest,
89
89
  validBoxPlotResponse
90
- } from "./chunk-2WZPM25H.js";
90
+ } from "./chunk-WVBWDL2B.js";
91
91
  import {
92
92
  termdbCategoriesPayload,
93
93
  validCategoriesRequest,
94
94
  validCategoriesResponse
95
- } from "./chunk-7Z3AE4AY.js";
95
+ } from "./chunk-H45GALYV.js";
96
96
  import {
97
97
  termdbClusterPayload,
98
98
  validTermdbClusterRequest,
99
99
  validTermdbClusterResponse
100
- } from "./chunk-NPVDG36X.js";
100
+ } from "./chunk-OSHG443J.js";
101
101
  import {
102
102
  termdbCohortSummaryPayload,
103
103
  validTermdbCohortSummaryRequest,
@@ -112,7 +112,7 @@ import {
112
112
  descrStatsPayload,
113
113
  validDescrStatsRequest,
114
114
  validDescrStatsResponse
115
- } from "./chunk-KHPBBU43.js";
115
+ } from "./chunk-BNOGQYXG.js";
116
116
  import {
117
117
  hicGenomePayload,
118
118
  validHicGenomeRequest,
@@ -192,7 +192,7 @@ import {
192
192
  brainImagingPayload,
193
193
  validBrainImagingRequest,
194
194
  validBrainImagingResponse
195
- } from "./chunk-GGKNEHME.js";
195
+ } from "./chunk-XDRUNGOV.js";
196
196
  import {
197
197
  brainImagingSamplesPayload,
198
198
  validBrainImagingSamplesRequest,
@@ -207,7 +207,7 @@ import {
207
207
  CorrelationVolcanoPayload,
208
208
  validCorrelationVolcanoRequest,
209
209
  validCorrelationVolcanoResponse
210
- } from "./chunk-FMW25T52.js";
210
+ } from "./chunk-66XSFQPI.js";
211
211
  import {
212
212
  datasetPayload,
213
213
  validDatasetRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-2WZPM25H.js";
5
+ } from "./chunk-WVBWDL2B.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  boxplotPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbCategoriesPayload,
3
3
  validCategoriesRequest,
4
4
  validCategoriesResponse
5
- } from "./chunk-7Z3AE4AY.js";
5
+ } from "./chunk-H45GALYV.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbClusterPayload,
3
3
  validTermdbClusterRequest,
4
4
  validTermdbClusterResponse
5
- } from "./chunk-NPVDG36X.js";
5
+ } from "./chunk-OSHG443J.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbClusterPayload,
@@ -2,7 +2,7 @@ import {
2
2
  descrStatsPayload,
3
3
  validDescrStatsRequest,
4
4
  validDescrStatsResponse
5
- } from "./chunk-KHPBBU43.js";
5
+ } from "./chunk-BNOGQYXG.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  descrStatsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  numericCategoriesPayload,
3
3
  validNumericCategoriesRequest,
4
4
  validNumericCategoriesResponse
5
- } from "./chunk-ES6BRZ4L.js";
5
+ } from "./chunk-7AQB3YHO.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  numericCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  percentilePayload,
3
3
  validPercentileRequest,
4
4
  validPercentileResponse
5
- } from "./chunk-GHAIGRB7.js";
5
+ } from "./chunk-PR7XHL4T.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  percentilePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-TXZQ56TX.js";
5
+ } from "./chunk-KRHYG2ZZ.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termsByIdsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopTermsByTypePayload,
3
3
  validTermdbTopTermsByTypeRequest,
4
4
  validTermdbTopTermsByTypeResponse
5
- } from "./chunk-4CCAF4O5.js";
5
+ } from "./chunk-JNEIQWTE.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopTermsByTypePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopVariablyExpressedGenesPayload,
3
3
  validTermdbTopVariablyExpressedGenesRequest,
4
4
  validTermdbTopVariablyExpressedGenesResponse
5
- } from "./chunk-A72XYNKT.js";
5
+ } from "./chunk-BEXUBE5A.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopVariablyExpressedGenesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  validViolinRequest,
3
3
  validViolinResponse,
4
4
  violinPayload
5
- } from "./chunk-ZFUF4XMD.js";
5
+ } from "./chunk-T3NOHXOJ.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  validViolinRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.112.1-0",
3
+ "version": "2.114.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
package/src/dataset.ts CHANGED
@@ -92,12 +92,23 @@ type bcfMafFile = {
92
92
  maffile: string
93
93
  }
94
94
 
95
- type SnvindelByRange = {
96
- /** if true, served from gdc. no other parameters TODO change to src='gdc/native' */
97
- gdcapi?: boolean
95
+ type SnvindelByIsoform = {
96
+ /** if true, served from gdc. no other parameters */
97
+ gdcapi?: true
98
+ /** getter function to retrieve data. dynamically added or ds-supplied
99
+ first argument is required and allow for 2 additional ones
100
+ */
101
+ get?: (f: any, f2?: any, f3?: any) => void
102
+ /** if true, all tw from one client query must be processed via one call to snvindel.byisoform.get()
103
+ and no longer processes each tw by calling mayGetGeneVariantData()
104
+ */
105
+ processTwsInOneQuery?: true
106
+ }
98
107
 
108
+ type SnvindelByRange = {
109
+ /** if true, served from gdc. no other parameters */
110
+ gdcapi?: true
99
111
  //local ds can have following different setup
100
-
101
112
  /** one single bcf file */
102
113
  bcffile?: string
103
114
  /** one bcf file per chr */
@@ -106,8 +117,8 @@ type SnvindelByRange = {
106
117
  bcfMafFile?: bcfMafFile
107
118
  /** allow to apply special configurations to certain INFO fields of the bcf file */
108
119
  infoFields?: InfoFieldEntry[]
109
- /** if true, bcf or chr2bcf uses string sample name in header. to be used during this migrating so the code can deal with old files with integer sample ids and new ones; TODO once all datasets are migrated, delete the flag */
110
- tempflag_sampleNameInVcfHeader?: boolean
120
+ /** getter function to retrieve data. dynamically added or ds-supplied */
121
+ get?: (f: any) => void
111
122
  }
112
123
 
113
124
  type URLEntry = {
@@ -202,7 +213,7 @@ type Filter = {
202
213
 
203
214
  type VariantFilter = {
204
215
  opts: { joinWith: string[] }
205
- filter: Filter
216
+ filter?: Filter
206
217
  terms: FilterTermEntry[]
207
218
  }
208
219
 
@@ -310,12 +321,10 @@ type SnvindelComputeGroup_info = {
310
321
  /** a data type under ds.queries{} */
311
322
  type SnvIndelQuery = {
312
323
  forTrack?: boolean
313
- /** allow to query data by either isoform or range
314
- * isoform query is only used for gdc api
315
- */
316
- byisoform?: GdcApi
324
+ /** allow to query data by either isoform or range; either or both can be used; cannot be both missing */
325
+ byisoform?: SnvindelByIsoform
317
326
  /** query data by range */
318
- byrange: SnvindelByRange
327
+ byrange?: SnvindelByRange
319
328
 
320
329
  infoUrl?: URLEntry[]
321
330
  skewerRim?: SkewerRim
@@ -579,6 +588,8 @@ export type GeneExpressionQueryNative = {
579
588
  samples?: number[]
580
589
  /** dynamically added flag during launch */
581
590
  nochr?: boolean
591
+ /** if true, the file is in HDF5 format */
592
+ hdf5File?: boolean
582
593
  /** dynamically added getter */
583
594
  get?: (param: any) => void
584
595
  /** This dictionary is used to store/cache the default bins calculated for a geneExpression term when initialized in the fillTermWrapper */
@@ -1215,9 +1226,14 @@ keep this setting here for reason of:
1215
1226
  ssm?: UrlTemplateSsm | UrlTemplateSsm[]
1216
1227
  }
1217
1228
 
1218
- q?: {
1229
+ /** ds-defined or dynamically created */
1230
+ termtypeByCohort?: any
1231
+ /** ds-defined or dynamically created callbacks
1232
+ {
1219
1233
  getSupportedChartTypes: (a: any) => any
1220
1234
  }
1235
+ */
1236
+ q?: any
1221
1237
  termMatch2geneSet?: any
1222
1238
  mclass?: Mclass
1223
1239
  lollipop?: any
@@ -1354,7 +1370,7 @@ export type Cohort = {
1354
1370
  /** if present, means correlation volcano plot analysis is enabled */
1355
1371
  correlationVolcano?: CorrelationVolcano
1356
1372
  cumburden?: CumBurdenData
1357
- db: FileObj
1373
+ db?: FileObj
1358
1374
  /** customize the default chart to open on mass ui when there's no charts. if
1359
1375
  * missing it opens dictionary ui */
1360
1376
  defaultChartType?: string
@@ -1783,7 +1799,7 @@ export type Mds3 = BaseMds & {
1783
1799
  queries?: Mds3Queries
1784
1800
  cohort?: Cohort
1785
1801
  isSupportedChartOverride?: isSupportedChartCallbacks
1786
- // TODO: termdb should be nested under cohort
1802
+ // TODO FIXME nest termdb under cohort
1787
1803
  termdb?: Termdb
1788
1804
  validate_filter0?: (f: any) => void
1789
1805
  ssm2canonicalisoform?: GdcApi
@@ -46,6 +46,10 @@ export type ExpressionInput = {
46
46
  conf2_mode?: 'continuous' | 'discrete'
47
47
  /** Number of variable genes to be included for DE analysis (optional) */
48
48
  VarGenes?: number
49
+ /** The methodology used for differential gene expression: wilcoxon, edgeR and limma */
50
+ DE_method: 'wilcoxon' | 'limma' | 'edgeR'
51
+ /** Cutoff for when mds plot will be generated for edgeR and limma test */
52
+ mds_cutoff: number
49
53
  }
50
54
 
51
55
  export type DEResponse = {
@@ -82,8 +82,13 @@ export type ValidResponse = {
82
82
  byTermId: { [index: string]: any }
83
83
  /** */
84
84
  bySampleId: { [index: string]: any }
85
- /** list of term names that are excluded from analysis for lacking any numerical data */
86
- removedHierClusterTerms?: string[]
85
+ /** list of term names that are excluded from analysis, one reason per set, for client display */
86
+ removedHierClusterTerms?: {
87
+ /** reason for skipping */
88
+ text: string
89
+ /** list of skipped item names */
90
+ lst: string[]
91
+ }[]
87
92
  }
88
93
 
89
94
  //response of just 1 gene, thus unable to do clustering
@@ -1,5 +1,13 @@
1
- import { MinBaseQ, BaseTerm, EnabledTermGroupSetting, BaseTW, GroupSettingQ, ValuesQ } from '../index.ts'
2
- import { TermSettingInstance } from '../termsetting.ts'
1
+ import type {
2
+ MinBaseQ,
3
+ BaseTerm,
4
+ EnabledTermGroupSetting,
5
+ BaseTW,
6
+ GroupSettingQ,
7
+ ValuesQ,
8
+ TermValues
9
+ } from '../index.ts'
10
+ import type { TermSettingInstance } from '../termsetting.ts'
3
11
 
4
12
  export type GeneVariantBaseQ = MinBaseQ & {
5
13
  cnvGainCutoff?: number
@@ -49,3 +57,16 @@ export type GeneVariantTermSettingInstance = TermSettingInstance & {
49
57
  category2samplecount: any
50
58
  groupSettingInstance?: any
51
59
  }
60
+
61
+ export type DtTerm = {
62
+ id: string
63
+ name: string
64
+ parent_id: any
65
+ isleaf: boolean
66
+ type: string
67
+ dt: number
68
+ origin?: string
69
+ values?: TermValues
70
+ min?: number
71
+ max?: number
72
+ }
package/src/terms/term.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { Filter } from '../filter.js'
2
- import { CategoricalTerm, CategoricalBaseQ } from './categorical.js'
3
- import { ConditionTerm } from './condition.js'
4
- import { NumericTerm } from './numeric.js'
5
- import { GeneVariantTerm } from './geneVariant.js'
6
- import { SampleLstTerm } from './samplelst.js'
7
- import { SnpsTerm } from './snps.js'
1
+ import type { Filter } from '../filter.js'
2
+ import type { CategoricalTerm, CategoricalBaseQ } from './categorical.js'
3
+ import type { ConditionTerm } from './condition.js'
4
+ import type { NumericTerm } from './numeric.js'
5
+ import type { GeneVariantTerm } from './geneVariant.js'
6
+ import type { SampleLstTerm } from './samplelst.js'
7
+ import type { SnpsTerm } from './snps.js'
8
8
 
9
9
  /**
10
10
  * @param id term.id for dictionary terms, undefined for non-dictionary terms
@@ -56,6 +56,8 @@ export type BaseQ = {
56
56
  | 'custom-groupset'
57
57
  /** Applies to samplelst terms */
58
58
  | 'custom-samplelst'
59
+ /** Applies to geneVariant term */
60
+ | 'filter'
59
61
  }
60
62
 
61
63
  export type ValuesQ = CategoricalBaseQ & {
@@ -72,7 +74,11 @@ export type CustomGroupSettingQ = CategoricalBaseQ & {
72
74
  customset: BaseGroupSet
73
75
  }
74
76
 
75
- export type GroupSettingQ = ValuesQ | PredefinedGroupSettingQ | CustomGroupSettingQ
77
+ export type FilterQ = BaseQ & {
78
+ type: 'filter'
79
+ }
80
+
81
+ export type GroupSettingQ = ValuesQ | FilterQ | PredefinedGroupSettingQ | CustomGroupSettingQ
76
82
 
77
83
  /*** types supporting termwrapper term ***/
78
84
 
@@ -99,6 +105,7 @@ export type BaseTerm = {
99
105
  included_types?: string[]
100
106
  isleaf?: boolean
101
107
  values?: TermValues
108
+ filter?: any
102
109
  }
103
110
 
104
111
  export type Term = BaseTerm &
@@ -116,6 +123,7 @@ export type FilterGroup = {
116
123
  name: string
117
124
  type: 'filter'
118
125
  filter: Filter
126
+ uncomputable?: boolean // if true, do not include this group in computations
119
127
  }
120
128
 
121
129
  export type GroupEntry = ValuesGroup | FilterGroup
@@ -84,8 +84,8 @@ type BaseTermSettingOpts = {
84
84
  * before the pill name is truncated. */
85
85
  abbrCutoff?: number
86
86
  activeCohort?: number
87
- /** tw.term.ids */
88
- disable_terms?: string[]
87
+ /** array of term objects to show in the tree but not clickable */
88
+ disable_terms?: Term[]
89
89
  // This is not used anywhere.
90
90
  // Ok to remove?
91
91
  handler: Handler
@@ -165,7 +165,7 @@ export type TermSettingInstance = {
165
165
  clickNoPillDiv?: any
166
166
  dom: InstanceDom
167
167
  doNotHideTipInMain?: boolean
168
- disable_terms?: string[]
168
+ disable_terms?: Term[]
169
169
  durations: { exit: number }
170
170
  filter?: Filter
171
171
  handler?: Handler