@sjcrh/proteinpaint-types 2.167.0 → 2.170.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 (38) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-EBPGV76U.js → chunk-33FYSH3O.js} +130 -2
  3. package/dist/{chunk-GIPUG4HD.js → chunk-447IAMTQ.js} +130 -2
  4. package/dist/{chunk-ZXPLL3NT.js → chunk-53QZTLJK.js} +417 -185
  5. package/dist/{chunk-5F24QFE7.js → chunk-BPDR66LV.js} +385 -151
  6. package/dist/{chunk-C27KCAQH.js → chunk-CUU7POGC.js} +417 -185
  7. package/dist/{chunk-GZKTMVAU.js → chunk-HDED6K55.js} +515 -153
  8. package/dist/{chunk-E4Z7PJZQ.js → chunk-HRH4GGV2.js} +503 -235
  9. package/dist/{chunk-LXW2FSLR.js → chunk-MH3TDIL4.js} +439 -207
  10. package/dist/{chunk-OLWNM7QP.js → chunk-MJEQEGN4.js} +130 -2
  11. package/dist/{chunk-5OMJAZK4.js → chunk-QL6YSLN6.js} +171 -43
  12. package/dist/{chunk-OLXOQLZH.js → chunk-TVS2JEXL.js} +130 -2
  13. package/dist/{chunk-CC32XCET.js → chunk-UQNHLAZN.js} +660 -298
  14. package/dist/{chunk-VQOCGHP2.js → chunk-YCURJJSC.js} +5 -1
  15. package/dist/{chunk-MCL6EDOS.js → chunk-ZAMM6EMS.js} +421 -189
  16. package/dist/correlationVolcano.js +1 -1
  17. package/dist/grin2.js +1 -1
  18. package/dist/index.js +14 -14
  19. package/dist/termdb.boxplot.js +1 -1
  20. package/dist/termdb.categories.js +1 -1
  21. package/dist/termdb.chat.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 +8 -2
  32. package/src/filter.ts +7 -1
  33. package/src/index.ts +1 -0
  34. package/src/routes/grin2.ts +5 -0
  35. package/src/routes/termdb.boxplot.ts +7 -9
  36. package/src/terms/term.ts +3 -1
  37. package/src/terms/termCollection.ts +52 -0
  38. package/src/terms/tw.ts +3 -2
@@ -2,7 +2,7 @@ import {
2
2
  CorrelationVolcanoPayload,
3
3
  validCorrelationVolcanoRequest,
4
4
  validCorrelationVolcanoResponse
5
- } from "./chunk-LXW2FSLR.js";
5
+ } from "./chunk-MH3TDIL4.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  CorrelationVolcanoPayload,
package/dist/grin2.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  GRIN2Payload,
3
3
  validGRIN2Request,
4
4
  validGRIN2Response
5
- } from "./chunk-VQOCGHP2.js";
5
+ } from "./chunk-YCURJJSC.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  GRIN2Payload,
package/dist/index.js CHANGED
@@ -7,17 +7,17 @@ import {
7
7
  termdbTopTermsByTypePayload,
8
8
  validTermdbTopTermsByTypeRequest,
9
9
  validTermdbTopTermsByTypeResponse
10
- } from "./chunk-GZKTMVAU.js";
10
+ } from "./chunk-HDED6K55.js";
11
11
  import {
12
12
  termdbTopVariablyExpressedGenesPayload,
13
13
  validTermdbTopVariablyExpressedGenesRequest,
14
14
  validTermdbTopVariablyExpressedGenesResponse
15
- } from "./chunk-EBPGV76U.js";
15
+ } from "./chunk-33FYSH3O.js";
16
16
  import {
17
17
  validViolinRequest,
18
18
  validViolinResponse,
19
19
  violinPayload
20
- } from "./chunk-OLXOQLZH.js";
20
+ } from "./chunk-TVS2JEXL.js";
21
21
  import {
22
22
  tilePayload,
23
23
  validTileRequest,
@@ -72,7 +72,7 @@ import {
72
72
  termsByIdsPayload,
73
73
  validTermsByIdsRequest,
74
74
  validTermsByIdsResponse
75
- } from "./chunk-C27KCAQH.js";
75
+ } from "./chunk-CUU7POGC.js";
76
76
  import {
77
77
  termdbCohortsPayload,
78
78
  validTermdbCohortsRequest,
@@ -82,7 +82,7 @@ import {
82
82
  descrStatsPayload,
83
83
  validDescrStatsRequest,
84
84
  validDescrStatsResponse
85
- } from "./chunk-ZXPLL3NT.js";
85
+ } from "./chunk-53QZTLJK.js";
86
86
  import {
87
87
  FilterTermValuesPayload,
88
88
  validFilterTermValuesRequest,
@@ -92,12 +92,12 @@ import {
92
92
  numericCategoriesPayload,
93
93
  validNumericCategoriesRequest,
94
94
  validNumericCategoriesResponse
95
- } from "./chunk-OLWNM7QP.js";
95
+ } from "./chunk-MJEQEGN4.js";
96
96
  import {
97
97
  percentilePayload,
98
98
  validPercentileRequest,
99
99
  validPercentileResponse
100
- } from "./chunk-5F24QFE7.js";
100
+ } from "./chunk-BPDR66LV.js";
101
101
  import {
102
102
  ProfileFormScoresPayload,
103
103
  validProfileFormScoresRequest,
@@ -132,22 +132,22 @@ import {
132
132
  boxplotPayload,
133
133
  validBoxPlotRequest,
134
134
  validBoxPlotResponse
135
- } from "./chunk-E4Z7PJZQ.js";
135
+ } from "./chunk-HRH4GGV2.js";
136
136
  import {
137
137
  termdbCategoriesPayload,
138
138
  validCategoriesRequest,
139
139
  validCategoriesResponse
140
- } from "./chunk-MCL6EDOS.js";
140
+ } from "./chunk-ZAMM6EMS.js";
141
141
  import {
142
142
  ChatPayload,
143
143
  validChatRequest,
144
144
  validChatResponse
145
- } from "./chunk-GIPUG4HD.js";
145
+ } from "./chunk-447IAMTQ.js";
146
146
  import {
147
147
  termdbClusterPayload,
148
148
  validTermdbClusterRequest,
149
149
  validTermdbClusterResponse
150
- } from "./chunk-CC32XCET.js";
150
+ } from "./chunk-UQNHLAZN.js";
151
151
  import {
152
152
  termdbCohortSummaryPayload,
153
153
  validTermdbCohortSummaryRequest,
@@ -217,7 +217,7 @@ import {
217
217
  GRIN2Payload,
218
218
  validGRIN2Request,
219
219
  validGRIN2Response
220
- } from "./chunk-VQOCGHP2.js";
220
+ } from "./chunk-YCURJJSC.js";
221
221
  import {
222
222
  healthcheckPayload,
223
223
  validHealthCheckRequest,
@@ -239,7 +239,7 @@ import {
239
239
  CorrelationVolcanoPayload,
240
240
  validCorrelationVolcanoRequest,
241
241
  validCorrelationVolcanoResponse
242
- } from "./chunk-LXW2FSLR.js";
242
+ } from "./chunk-MH3TDIL4.js";
243
243
  import {
244
244
  datasetPayload,
245
245
  validDatasetRequest,
@@ -297,7 +297,7 @@ import {
297
297
  brainImagingPayload,
298
298
  validBrainImagingRequest,
299
299
  validBrainImagingResponse
300
- } from "./chunk-5OMJAZK4.js";
300
+ } from "./chunk-QL6YSLN6.js";
301
301
  import {
302
302
  brainImagingSamplesPayload,
303
303
  validBrainImagingSamplesRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-E4Z7PJZQ.js";
5
+ } from "./chunk-HRH4GGV2.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  boxplotPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbCategoriesPayload,
3
3
  validCategoriesRequest,
4
4
  validCategoriesResponse
5
- } from "./chunk-MCL6EDOS.js";
5
+ } from "./chunk-ZAMM6EMS.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  ChatPayload,
3
3
  validChatRequest,
4
4
  validChatResponse
5
- } from "./chunk-GIPUG4HD.js";
5
+ } from "./chunk-447IAMTQ.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  ChatPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbClusterPayload,
3
3
  validTermdbClusterRequest,
4
4
  validTermdbClusterResponse
5
- } from "./chunk-CC32XCET.js";
5
+ } from "./chunk-UQNHLAZN.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbClusterPayload,
@@ -2,7 +2,7 @@ import {
2
2
  descrStatsPayload,
3
3
  validDescrStatsRequest,
4
4
  validDescrStatsResponse
5
- } from "./chunk-ZXPLL3NT.js";
5
+ } from "./chunk-53QZTLJK.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  descrStatsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  numericCategoriesPayload,
3
3
  validNumericCategoriesRequest,
4
4
  validNumericCategoriesResponse
5
- } from "./chunk-OLWNM7QP.js";
5
+ } from "./chunk-MJEQEGN4.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  numericCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  percentilePayload,
3
3
  validPercentileRequest,
4
4
  validPercentileResponse
5
- } from "./chunk-5F24QFE7.js";
5
+ } from "./chunk-BPDR66LV.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  percentilePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-C27KCAQH.js";
5
+ } from "./chunk-CUU7POGC.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termsByIdsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopTermsByTypePayload,
3
3
  validTermdbTopTermsByTypeRequest,
4
4
  validTermdbTopTermsByTypeResponse
5
- } from "./chunk-GZKTMVAU.js";
5
+ } from "./chunk-HDED6K55.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbTopTermsByTypePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopVariablyExpressedGenesPayload,
3
3
  validTermdbTopVariablyExpressedGenesRequest,
4
4
  validTermdbTopVariablyExpressedGenesResponse
5
- } from "./chunk-EBPGV76U.js";
5
+ } from "./chunk-33FYSH3O.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbTopVariablyExpressedGenesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  validViolinRequest,
3
3
  validViolinResponse,
4
4
  violinPayload
5
- } from "./chunk-OLXOQLZH.js";
5
+ } from "./chunk-TVS2JEXL.js";
6
6
  import "./chunk-YNHC5SXO.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.167.0",
3
+ "version": "2.170.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
@@ -1596,12 +1596,18 @@ keep this setting here for reason of:
1596
1596
  }
1597
1597
 
1598
1598
  type NumericTermCollection = {
1599
- /** human readable name for this collection */
1599
+ /** collection id */
1600
+ id?: string
1601
+ /** human readable name for this collection, may be as collection id if missing */
1600
1602
  name: string
1601
1603
  /** array of dictionary numeric term ids belonging to this collection */
1602
1604
  termIds: string[]
1603
- /** array of branch term ids belonging to this collection */
1605
+ /** array of branch term ids belonging to this collection,
1606
+ * may be used as state.tree.expandedTermIds[] option to termdb appInit() */
1604
1607
  branchIds: string[]
1608
+ propsByTermId: {
1609
+ [termId: string]: any
1610
+ }
1605
1611
  /** preconfigured cohort-level plots for this collection */
1606
1612
  plots?: {
1607
1613
  /** name of this plot */
package/src/filter.ts CHANGED
@@ -3,6 +3,7 @@ import type { NumericTerm, NumericBin } from './terms/numeric.ts'
3
3
  import type { CategoricalTerm } from './terms/categorical.ts'
4
4
  import type { DtTerm } from './terms/geneVariant.ts'
5
5
  import type { ConditionTerm } from './terms/condition.ts'
6
+ import type { TermCollection } from './terms/termCollection.ts'
6
7
 
7
8
  /*
8
9
  --------EXPORTED--------
@@ -62,9 +63,14 @@ type GeneVariantTvs = BaseTvs & {
62
63
  excludeGeneName?: boolean
63
64
  }
64
65
 
66
+ export type TermCollectionTvs = BaseTvs & {
67
+ term: TermCollection
68
+ ratio: number
69
+ }
70
+
65
71
  /*** types supporting Filter type ***/
66
72
 
67
- export type Tvs = CategoricalTvs | NumericTvs | ConditionTvs | GeneVariantTvs // | SampleLstTvs ...
73
+ export type Tvs = CategoricalTvs | NumericTvs | ConditionTvs | GeneVariantTvs | TermCollectionTvs // | SampleLstTvs ...
68
74
 
69
75
  export type Filter = {
70
76
  type: 'tvslst'
package/src/index.ts CHANGED
@@ -80,5 +80,6 @@ export * from './terms/samplelst.ts'
80
80
  export * from './terms/ssGSEA.ts'
81
81
  export * from './terms/q.ts'
82
82
  export * from './terms/term.ts'
83
+ export * from './terms/termCollection.ts'
83
84
  export * from './terms/tw.ts'
84
85
  export * from './vocab.ts'
@@ -35,6 +35,11 @@ export type GRIN2Request = {
35
35
  /** Threshold for q-values to be included as interactive dots */
36
36
  qValueThreshold?: number
37
37
 
38
+ /** Log cutoff for Manhattan plot rendering before we scale the y-axis (default: 40).
39
+ * This is not user defined but rather a constant defined in #shared/manhattan.js.
40
+ * Sending it with request for consistency. In future we will allow user to set scale value or disable scaling if they wish */
41
+ logCutoff?: number
42
+
38
43
  /** Filter from existing PP infrastructure */
39
44
  filter?: any // Filter object passed to get_samples(filter, ds)
40
45
 
@@ -35,10 +35,11 @@ export type BoxPlotResponse = {
35
35
  charts: {
36
36
  [chartId: string]: BoxPlotChartEntry
37
37
  }
38
+ /** Descriptive statistics for the entire response */
39
+ descrStats: DescrStats
38
40
  /** Categories not shown in the final plot */
39
41
  uncomputableValues: { label: string; value: number }[] | null
40
42
  error?: any
41
- descrStats: DescrStats
42
43
  }
43
44
 
44
45
  // chart containing a set of boxplots
@@ -47,14 +48,11 @@ export type BoxPlotChartEntry = {
47
48
  chartId: string
48
49
  /** Boxplot data within the chart */
49
50
  plots: BoxPlotEntry[]
50
- /** svg of chart, necessary for svg download */
51
- svg?: any
52
- /** Copied from BoxPlotResponse, necessary for
53
- ViewModel to process chart data */
54
- absMin?: number
55
- absMax?: number
56
- uncomputableValues?: { label: string; value: number }[] | null
57
- wilcoxon: any
51
+ /** Number of samples represented in the chart */
52
+ sampleCount: number
53
+ /** Wilcoxon test results for the chart formatted
54
+ * for #dom/table.js */
55
+ wilcoxon?: [{ value: string }, { value: string }, { html: string }][]
58
56
  }
59
57
 
60
58
  // individual boxplot
package/src/terms/term.ts CHANGED
@@ -5,6 +5,7 @@ import type { GvTerm } from './geneVariant.js'
5
5
  import type { SampleLstTerm } from './samplelst.js'
6
6
  import type { SnpsTerm } from './snps.js'
7
7
  import type { QualTerm } from './qualitative.ts'
8
+ import type { TermCollection } from './termCollection.ts'
8
9
 
9
10
  /**
10
11
  * @param id term.id for dictionary terms, undefined for non-dictionary terms
@@ -47,7 +48,8 @@ export type BaseTerm = {
47
48
  }
48
49
 
49
50
  // NumericTerm includes integer, float, date, geneExpression, metaboliteIntensity, and other non-dict terms
50
- export type Term = BaseTerm & (NumericTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm | QualTerm)
51
+ export type Term = BaseTerm &
52
+ (NumericTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm | QualTerm | TermCollection)
51
53
 
52
54
  /*** types supporting Term types ***/
53
55
 
@@ -0,0 +1,52 @@
1
+ import type { BaseTerm, BaseTW, MinBaseQ } from '../index.ts'
2
+
3
+ /*
4
+ For term type 'snp'
5
+ */
6
+
7
+ export type TermCollection = BaseTerm & {
8
+ name: string
9
+ collectionId?: string
10
+ type: 'termCollection'
11
+ // may be queried from backend, but should be available in frontend for termsetting edit menu
12
+ /** the full list of term.ids that are available in this collection */
13
+ lst?: string[]
14
+ termlst?: any[] // TODO: choose either lst or termlst
15
+ numerators?: string[]
16
+ newTvs?: boolean
17
+ }
18
+
19
+ export type RawTermCollection = TermCollection & {
20
+ type?: 'termCollection'
21
+ termlst?: string[]
22
+ }
23
+
24
+ export type TermCollectionQValues = MinBaseQ & {
25
+ mode: 'continuous' // | 'discrete'
26
+ type: 'values'
27
+ // groupValuesBy: 'sampleId' | 'termId'
28
+ /** a selection of term.ids for the current termwrapper, selected from term.lst */
29
+ lst: string[]
30
+ numerators?: string[]
31
+ }
32
+
33
+ // TODO: may add different q types below
34
+ export type TermCollectionQ = TermCollectionQValues
35
+
36
+ export type TermCollectionTWValues = BaseTW & {
37
+ type: 'TermCollectionTWValues'
38
+ term: TermCollection
39
+ q: TermCollectionQValues
40
+ }
41
+
42
+ // TODO: may add different termCollection TW types here
43
+ export type TermCollectionTW = TermCollectionTWValues
44
+
45
+ export type RawTermCollectionTWValues = /*TermCollectionTW &*/ {
46
+ type?: 'TermCollectionTWValues' | 'termCollection' // deprecated
47
+ term: RawTermCollection
48
+ q: TermCollectionQValues
49
+ }
50
+
51
+ // TODO: may add different termCollection TW types here
52
+ export type RawTermCollectionTW = RawTermCollectionTWValues
package/src/terms/tw.ts CHANGED
@@ -4,6 +4,7 @@ import type { SampleLstQ } from './samplelst.ts'
4
4
  import type { NumTW, NumericQ } from './numeric.ts'
5
5
  import type { GvTW, GvQ } from './geneVariant.ts'
6
6
  import type { QualTW, QualQ } from './qualitative.ts'
7
+ import type { TermCollectionTW, TermCollectionQ } from './termCollection.ts'
7
8
 
8
9
  export type BaseTW = {
9
10
  id?: string
@@ -20,9 +21,9 @@ export type BaseTW = {
20
21
  valueFilter?: any
21
22
  }
22
23
 
23
- export type TermWrapper = NumTW | GvTW | ConditionTW | SnpsTW | QualTW
24
+ export type TermWrapper = NumTW | GvTW | ConditionTW | SnpsTW | QualTW | TermCollectionTW
24
25
 
25
- export type Q = NumericQ | GvQ | ConditionQ | SnpsQ | SampleLstQ | QualQ // | other q
26
+ export type Q = NumericQ | GvQ | ConditionQ | SnpsQ | SampleLstQ | QualQ | TermCollectionQ // | other q
26
27
 
27
28
  //export type TermWrapper = CategoricalTW | NumericTW | SnpsTW | (BaseTW & { term: Term; q: Q })
28
29
  export type TwLst = TermWrapper[]