@sjcrh/proteinpaint-types 2.140.1 → 2.141.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 (41) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-PPFFVFUI.js → chunk-424IUJWR.js} +355 -89
  3. package/dist/{chunk-EWON4FG5.js → chunk-56JQGGZJ.js} +2920 -2808
  4. package/dist/{chunk-WKT3H4P4.js → chunk-77RH7U6G.js} +1380 -582
  5. package/dist/{chunk-XXHHUIEV.js → chunk-EOBFYFLQ.js} +2314 -1950
  6. package/dist/{chunk-IDP5KXE6.js → chunk-I7FTK55B.js} +1973 -1609
  7. package/dist/{chunk-ZA3FDGAD.js → chunk-KEJROUTM.js} +744 -212
  8. package/dist/{chunk-FZJ3E7JA.js → chunk-QWAPDNYB.js} +2502 -2138
  9. package/dist/{chunk-KS74VVON.js → chunk-S6OBK4RE.js} +355 -89
  10. package/dist/{chunk-ECF6WSOD.js → chunk-T3GTEGQN.js} +355 -89
  11. package/dist/{chunk-BWLSDIHM.js → chunk-UYBVE3DL.js} +2489 -2125
  12. package/dist/{chunk-2WLN6PMW.js → chunk-VMQUAU5V.js} +2497 -2133
  13. package/dist/{chunk-AADDTYUL.js → chunk-WCWYMCZD.js} +355 -89
  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 -2
  27. package/src/dataset.ts +4 -2
  28. package/src/genome.ts +2 -2
  29. package/src/index.ts +1 -0
  30. package/src/terms/categorical.ts +0 -8
  31. package/src/terms/condition.ts +4 -3
  32. package/src/terms/date.ts +18 -0
  33. package/src/terms/geneExpression.ts +2 -12
  34. package/src/terms/geneVariant.ts +3 -0
  35. package/src/terms/metaboliteIntensity.ts +7 -20
  36. package/src/terms/numeric.ts +12 -22
  37. package/src/terms/snp.ts +7 -7
  38. package/src/terms/snps.ts +1 -0
  39. package/src/terms/ssGSEA.ts +7 -13
  40. package/src/terms/tw.ts +11 -6
  41. package/src/terms/updated-types.ts +0 -10
@@ -2,7 +2,7 @@ import {
2
2
  CorrelationVolcanoPayload,
3
3
  validCorrelationVolcanoRequest,
4
4
  validCorrelationVolcanoResponse
5
- } from "./chunk-IDP5KXE6.js";
5
+ } from "./chunk-I7FTK55B.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  CorrelationVolcanoPayload,
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-BWLSDIHM.js";
5
+ } from "./chunk-UYBVE3DL.js";
6
6
  import {
7
7
  topMutatedGenePayload,
8
8
  validtopMutatedGeneRequest,
@@ -12,17 +12,17 @@ import {
12
12
  termdbTopTermsByTypePayload,
13
13
  validTermdbTopTermsByTypeRequest,
14
14
  validTermdbTopTermsByTypeResponse
15
- } from "./chunk-WKT3H4P4.js";
15
+ } from "./chunk-77RH7U6G.js";
16
16
  import {
17
17
  termdbTopVariablyExpressedGenesPayload,
18
18
  validTermdbTopVariablyExpressedGenesRequest,
19
19
  validTermdbTopVariablyExpressedGenesResponse
20
- } from "./chunk-ECF6WSOD.js";
20
+ } from "./chunk-T3GTEGQN.js";
21
21
  import {
22
22
  validViolinRequest,
23
23
  validViolinResponse,
24
24
  violinPayload
25
- } from "./chunk-PPFFVFUI.js";
25
+ } from "./chunk-424IUJWR.js";
26
26
  import {
27
27
  tilePayload,
28
28
  validTileRequest,
@@ -82,7 +82,7 @@ import {
82
82
  termdbClusterPayload,
83
83
  validTermdbClusterRequest,
84
84
  validTermdbClusterResponse
85
- } from "./chunk-EWON4FG5.js";
85
+ } from "./chunk-56JQGGZJ.js";
86
86
  import {
87
87
  termdbCohortSummaryPayload,
88
88
  validTermdbCohortSummaryRequest,
@@ -97,7 +97,7 @@ import {
97
97
  descrStatsPayload,
98
98
  validDescrStatsRequest,
99
99
  validDescrStatsResponse
100
- } from "./chunk-2WLN6PMW.js";
100
+ } from "./chunk-VMQUAU5V.js";
101
101
  import {
102
102
  FilterTermValuesPayload,
103
103
  validFilterTermValuesRequest,
@@ -107,12 +107,12 @@ import {
107
107
  numericCategoriesPayload,
108
108
  validNumericCategoriesRequest,
109
109
  validNumericCategoriesResponse
110
- } from "./chunk-AADDTYUL.js";
110
+ } from "./chunk-WCWYMCZD.js";
111
111
  import {
112
112
  percentilePayload,
113
113
  validPercentileRequest,
114
114
  validPercentileResponse
115
- } from "./chunk-ZA3FDGAD.js";
115
+ } from "./chunk-KEJROUTM.js";
116
116
  import {
117
117
  ProfileFormScoresPayload,
118
118
  validProfileFormScoresRequest,
@@ -152,12 +152,12 @@ import {
152
152
  boxplotPayload,
153
153
  validBoxPlotRequest,
154
154
  validBoxPlotResponse
155
- } from "./chunk-XXHHUIEV.js";
155
+ } from "./chunk-EOBFYFLQ.js";
156
156
  import {
157
157
  termdbCategoriesPayload,
158
158
  validCategoriesRequest,
159
159
  validCategoriesResponse
160
- } from "./chunk-FZJ3E7JA.js";
160
+ } from "./chunk-QWAPDNYB.js";
161
161
  import {
162
162
  GRIN2Payload,
163
163
  validGRIN2Request,
@@ -245,7 +245,7 @@ import {
245
245
  brainImagingPayload,
246
246
  validBrainImagingRequest,
247
247
  validBrainImagingResponse
248
- } from "./chunk-KS74VVON.js";
248
+ } from "./chunk-S6OBK4RE.js";
249
249
  import {
250
250
  brainImagingSamplesPayload,
251
251
  validBrainImagingSamplesRequest,
@@ -267,7 +267,7 @@ import {
267
267
  CorrelationVolcanoPayload,
268
268
  validCorrelationVolcanoRequest,
269
269
  validCorrelationVolcanoResponse
270
- } from "./chunk-IDP5KXE6.js";
270
+ } from "./chunk-I7FTK55B.js";
271
271
  import {
272
272
  datasetPayload,
273
273
  validDatasetRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-XXHHUIEV.js";
5
+ } from "./chunk-EOBFYFLQ.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-FZJ3E7JA.js";
5
+ } from "./chunk-QWAPDNYB.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-EWON4FG5.js";
5
+ } from "./chunk-56JQGGZJ.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-2WLN6PMW.js";
5
+ } from "./chunk-VMQUAU5V.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-AADDTYUL.js";
5
+ } from "./chunk-WCWYMCZD.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-ZA3FDGAD.js";
5
+ } from "./chunk-KEJROUTM.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-BWLSDIHM.js";
5
+ } from "./chunk-UYBVE3DL.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-WKT3H4P4.js";
5
+ } from "./chunk-77RH7U6G.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-ECF6WSOD.js";
5
+ } from "./chunk-T3GTEGQN.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-PPFFVFUI.js";
5
+ } from "./chunk-424IUJWR.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  validViolinRequest,
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.140.1",
3
+ "version": "2.141.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
7
7
  "module": "src/index.ts",
8
8
  "exports": {
9
9
  ".": "./src/index.ts",
10
- "./updated": "./src/terms/updated-types.ts",
11
10
  "./routes/*": "./src/routes/*",
12
11
  "./checkers": "./dist/index.js"
13
12
  },
package/src/dataset.ts CHANGED
@@ -740,6 +740,8 @@ export type GeneExpressionQueryNative = {
740
740
  geneExpression2bins?: { [index: string]: any }
741
741
  /** gene expression unit (e.g. 'FPKM') */
742
742
  unit?: string
743
+ /** temporary h5 file format flag */
744
+ newformat?: boolean
743
745
  }
744
746
 
745
747
  export type GeneExpressionQuery = GeneExpressionQueryGdc | GeneExpressionQueryNative
@@ -1152,8 +1154,8 @@ type Scatterplots = {
1152
1154
  type CorrelationVolcano = {
1153
1155
  /** fixed feature, is one numeric term */
1154
1156
  feature: {
1155
- /** later expand to other types */
1156
- termType: 'geneExpression'
1157
+ /** array of allowed term types for feature tw */
1158
+ termTypes: string[]
1157
1159
  }
1158
1160
  /** list of numeric variables to be compared against fixed feature*/
1159
1161
  variables: {
package/src/genome.ts CHANGED
@@ -50,7 +50,7 @@ type TrackCategories = {
50
50
  [index: string]: TrackCategoryEntry | undefined
51
51
  }
52
52
 
53
- type Track = {
53
+ export type Track = {
54
54
  __isgene?: boolean
55
55
  translatecoding?: boolean
56
56
  file: string
@@ -64,7 +64,7 @@ type Track = {
64
64
  onerow?: boolean
65
65
  }
66
66
 
67
- type DefaultCoord = {
67
+ export type DefaultCoord = {
68
68
  chr: string
69
69
  start: number
70
70
  stop: number
package/src/index.ts CHANGED
@@ -61,6 +61,7 @@ export * from './routes/wsimages.ts'
61
61
  export * from './routes/wsisamples.ts'
62
62
  export * from './terms/categorical.ts'
63
63
  export * from './terms/condition.ts'
64
+ export * from './terms/date.ts'
64
65
  export * from './terms/numeric.ts'
65
66
  export * from './terms/geneVariant.ts'
66
67
  export * from './terms/geneExpression.ts'
@@ -71,10 +71,6 @@ export type CatTWValues = BaseTW & {
71
71
  term: CategoricalTerm
72
72
  q: ValuesQ
73
73
  type: 'CatTWValues'
74
- // do not use this boolean flag, defined here only to help illustrate
75
- // in tw/test/fake/app.js why this is type check error prone and
76
- // less preferred than a discriminant prop that also works at runtime
77
- isCatTWValues?: true
78
74
  }
79
75
 
80
76
  export type CatTWPredefinedGS = BaseTW & {
@@ -82,10 +78,6 @@ export type CatTWPredefinedGS = BaseTW & {
82
78
  term: CategoricalTerm
83
79
  q: PredefinedGroupSettingQ
84
80
  type: 'CatTWPredefinedGS'
85
- // do not use this boolean flag, defined here only to help illustrate
86
- // in tw/test/fake/app.js why this is type check error prone and
87
- // less preferred than a discriminant prop that also works at runtime
88
- isCatTWPredefiendGS?: true
89
81
  }
90
82
 
91
83
  export type CatTWCustomGS = BaseTW & {
@@ -1,5 +1,5 @@
1
- import type { BaseTerm, BaseQ, TermValues } from './term.ts'
2
- import type { TermWrapper } from './tw.ts'
1
+ import type { BaseTerm, BaseQ, TermValues, BaseTW } from './term.ts'
2
+ //import type { TermWrapper } from './tw.ts'
3
3
 
4
4
  /**
5
5
  * @category TW
@@ -37,7 +37,8 @@ export type ConditionTerm = BaseTerm & {
37
37
  * @group Termdb
38
38
  * @category TW
39
39
  */
40
- export type ConditionTW = TermWrapper & {
40
+ export type ConditionTW = BaseTW & {
41
+ type: 'ConditionTW'
41
42
  term: ConditionTerm
42
43
  q: ConditionQ //replace the generic Q with specific condition Q
43
44
  }
@@ -0,0 +1,18 @@
1
+ import type { NumericBaseTerm, PresetNumericBins, NumTWTypes } from '../index.ts'
2
+
3
+ /*
4
+ --------EXPORTED--------
5
+ DateTerm
6
+ DateTW
7
+ DateTermSettingInstance
8
+ */
9
+
10
+ export type DateTerm = NumericBaseTerm & {
11
+ name?: string
12
+ type: 'date'
13
+ metabolite: string
14
+ bins?: PresetNumericBins
15
+ unit?: string
16
+ }
17
+
18
+ export type DateTW = NumTWTypes & { term: DateTerm }
@@ -1,5 +1,4 @@
1
- import type { BaseTW, PresetNumericBins, NumericBaseTerm, NumericQ } from '../index.ts'
2
- import type { TermSettingInstance } from '../termsetting.ts'
1
+ import type { PresetNumericBins, NumericBaseTerm, NumTWTypes } from '../index.ts'
3
2
 
4
3
  /*
5
4
  --------EXPORTED--------
@@ -20,13 +19,4 @@ export type GeneExpressionTerm = NumericBaseTerm & {
20
19
  stop?: number
21
20
  }
22
21
 
23
- export type GeneExpressionTW = BaseTW & {
24
- q: NumericQ
25
- term: GeneExpressionTerm
26
- type: string
27
- }
28
-
29
- export type GeneExpressionTermSettingInstance = TermSettingInstance & {
30
- q: NumericQ
31
- term: GeneExpressionTerm
32
- }
22
+ export type GeneExpressionTW = NumTWTypes & { term: GeneExpressionTerm }
@@ -3,6 +3,8 @@ import type { TermSettingInstance } from '../termsetting.ts'
3
3
 
4
4
  // q types
5
5
  export type GvBaseQ = MinBaseQ & {
6
+ // TODO: may uncomment below if q.mode is required in downstream code
7
+ // mode?: 'discrete' // may support 'continuous' for CNV?
6
8
  cnvGainCutoff?: number
7
9
  cnvMaxLength?: number
8
10
  cnvMinAbsValue?: number
@@ -12,6 +14,7 @@ export type GvBaseQ = MinBaseQ & {
12
14
  type RawGvValuesQ = GvBaseQ & { type?: 'values' }
13
15
  type RawGvPredefinedGsQ = GvBaseQ & { type: 'predefined-groupset'; predefined_groupset_idx?: number }
14
16
  type RawGvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset?: BaseGroupSet }
17
+ export type RawGvQ = RawGvValuesQ | RawGvPredefinedGsQ | RawGvCustomGsQ
15
18
 
16
19
  export type GvValuesQ = GvBaseQ & { type: 'values' }
17
20
  export type GvPredefinedGsQ = GvBaseQ & { type: 'predefined-groupset'; predefined_groupset_idx: number }
@@ -1,31 +1,18 @@
1
- import type { TermWrapper } from './tw.ts'
2
- import type { BaseQ } from './term.ts'
3
- import type { NumericTerm } from './numeric.ts'
4
- import type { TermSettingInstance } from '../termsetting.ts'
1
+ import type { NumericBaseTerm, PresetNumericBins, NumTWTypes } from '../index.ts'
5
2
 
6
3
  /*
7
4
  --------EXPORTED--------
8
- MetaboliteIntensityQ
9
5
  MetaboliteIntensityTermWrapper
10
6
  MetaboliteIntensityTermSettingInstance
11
7
 
12
8
  */
13
9
 
14
- export type MetaboliteIntensityQ = BaseQ & {
15
- mode: 'continuous'
16
- }
17
-
18
- export type MetaboliteIntensityTW = TermWrapper & {
19
- q: MetaboliteIntensityQ
20
- term: MetaboliteIntensityTerm
21
- }
22
-
23
- export type MetaboliteIntensityTerm = NumericTerm & {
10
+ export type MetaboliteIntensityTerm = NumericBaseTerm & {
11
+ name?: string
12
+ type: 'metaboliteIntensity'
24
13
  metabolite: string
25
- bins: any
14
+ bins?: PresetNumericBins
15
+ unit?: string
26
16
  }
27
17
 
28
- export type MetaboliteIntensityTermSettingInstance = TermSettingInstance & {
29
- q: MetaboliteIntensityQ
30
- term: MetaboliteIntensityTerm
31
- }
18
+ export type MetaboliteIntensityTW = NumTWTypes & { term: MetaboliteIntensityTerm }
@@ -1,4 +1,13 @@
1
- import type { MinBaseQ, BaseTW, TermValues, BaseTerm, GeneExpressionTerm } from '../index.ts'
1
+ import type {
2
+ MinBaseQ,
3
+ BaseTW,
4
+ TermValues,
5
+ BaseTerm,
6
+ GeneExpressionTerm,
7
+ MetaboliteIntensityTerm,
8
+ DateTerm,
9
+ SsGSEATerm
10
+ } from '../index.ts'
2
11
 
3
12
  export type RawRegularBin = Partial<RegularNumericBinConfig> & { preferredBins?: string }
4
13
 
@@ -38,12 +47,12 @@ export type NumericBaseTerm = BaseTerm & {
38
47
 
39
48
  export type NumericDictTerm = NumericBaseTerm & {
40
49
  id?: string
41
- type: 'integer' | 'float' | 'date'
50
+ type: 'integer' | 'float'
42
51
  bins: PresetNumericBins
43
52
  values?: TermValues
44
53
  }
45
54
 
46
- export type NumericTerm = NumericDictTerm | GeneExpressionTerm
55
+ export type NumericTerm = NumericDictTerm | GeneExpressionTerm | MetaboliteIntensityTerm | DateTerm | SsGSEATerm
47
56
 
48
57
  export type StartUnboundedBin = {
49
58
  // where possible, assign a concrete value (true) when it is known in advance,
@@ -101,25 +110,6 @@ export type CustomNumericBinConfig = MinBaseQ & {
101
110
  preferredBins?: 'median'
102
111
  }
103
112
 
104
- // |
105
- // {
106
- // type?: 'custom-bin'
107
- // mode?: 'discrete' | 'binary'
108
- // // since ts will allow NumericBin[] to be empty,
109
- // // use this workaround to define a non-empty array
110
- // lst?: [NumericBin, ...NumericBin[]]
111
- // }
112
-
113
- /*export type NumericQ = BaseQ & {
114
- // termType: 'float' | 'integer' -- converts to 'numeric'
115
- preferredBins?: 'median' | 'less' | 'default'
116
- modeBinaryCutoffType: 'normal' | 'percentile'
117
- modeBinaryCutoffPercentile?: number
118
- knots?: any //[]?
119
- scale?: number //0.1 | 0.01 | 0.001
120
- rounding: string
121
- }*/
122
-
123
113
  export type PresetNumericBins = {
124
114
  default: RegularNumericBinConfig | CustomNumericBinConfig
125
115
  less: RegularNumericBinConfig | CustomNumericBinConfig
package/src/terms/snp.ts CHANGED
@@ -1,5 +1,4 @@
1
- import type { TermWrapper } from './tw.ts'
2
- import type { BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
1
+ import type { BaseTW, BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
3
2
  import type { TermSettingInstance } from '../termsetting.ts'
4
3
 
5
4
  /*
@@ -8,11 +7,6 @@ For term type 'snp'
8
7
 
9
8
  export type SnpQ = BaseQ & GroupSettingQ
10
9
 
11
- export type SnpTW = TermWrapper & {
12
- q: SnpQ
13
- term: SnpTerm
14
- }
15
-
16
10
  export type SnpTerm = BaseTerm & {
17
11
  chr: string
18
12
  start: number
@@ -22,6 +16,12 @@ export type SnpTerm = BaseTerm & {
22
16
  groupsetting: TermGroupSetting
23
17
  }
24
18
 
19
+ export type SnpTW = BaseTW & {
20
+ type: 'SnpTW'
21
+ q: SnpQ
22
+ term: SnpTerm
23
+ }
24
+
25
25
  export type SnpTermSettingInstance = TermSettingInstance & {
26
26
  q: SnpQ
27
27
  term: SnpTerm
package/src/terms/snps.ts CHANGED
@@ -72,6 +72,7 @@ export type SnpsTerm = BaseTerm & {
72
72
  }
73
73
 
74
74
  export type SnpsTW = BaseTW & {
75
+ type: 'SnpsTW'
75
76
  q: SnpsQ
76
77
  term: SnpsTerm
77
78
  }
@@ -1,6 +1,4 @@
1
- import type { TermWrapper } from './tw.ts'
2
- import type { NumericTerm, NumericQ } from './numeric.ts'
3
- import type { TermSettingInstance } from '../termsetting.ts'
1
+ import type { NumericBaseTerm, NumericQ, PresetNumericBins, NumTWTypes } from './numeric.ts'
4
2
 
5
3
  /*
6
4
  duplicated from geneExpression.ts
@@ -8,19 +6,15 @@ duplicated from geneExpression.ts
8
6
 
9
7
  export type SsGSEAQ = NumericQ & { dt?: number }
10
8
 
11
- export type SsGSEATW = TermWrapper & {
12
- q: SsGSEAQ
13
- term: SsGSEATerm
14
- }
15
-
16
- export type SsGSEATerm = NumericTerm & {
9
+ export type SsGSEATerm = NumericBaseTerm & {
17
10
  /** term.id: geneset db term id for native term, and cache file name for custom term */
18
11
  /** term.name: geneset db term name for native term, and user-defined name for custom term */
19
12
  /** custom term has list of gene names used for computing score */
20
13
  genes?: string[]
14
+ name?: string
15
+ type: 'ssGSEA'
16
+ bins?: PresetNumericBins
17
+ unit?: string
21
18
  }
22
19
 
23
- export type SsGSEATermSettingInstance = TermSettingInstance & {
24
- q: SsGSEAQ
25
- term: SsGSEATerm
26
- }
20
+ export type SsGSEATW = NumTWTypes & { term: SsGSEATerm }
package/src/terms/tw.ts CHANGED
@@ -1,14 +1,19 @@
1
- import type { BaseQ, BaseTW, Term } from './term.ts'
2
- import type { CategoricalQ, CategoricalTW } from './categorical.ts'
3
- import type { NumericQ, NumericTW } from './numeric.ts'
4
1
  import type { SnpsQ, SnpsTW } from './snps.ts'
5
- import type { ConditionQ } from './condition.ts'
2
+ import type { SnpQ, SnpTW } from './snp.ts'
3
+ import type { ConditionQ, ConditionTW } from './condition.ts'
6
4
  import type { SampleLstQ } from './samplelst.ts'
5
+ import type { CatTWTypes, CategoricalQ } from './categorical.ts'
6
+ import type { NumTWTypes, NumericQ } from './numeric.ts'
7
+ import type { GvTW, GvQ } from './geneVariant.ts'
7
8
 
8
- export type TermWrapper = CategoricalTW | NumericTW | SnpsTW | (BaseTW & { term: Term; q: Q })
9
+ export type TermWrapper = CatTWTypes | NumTWTypes | GvTW | ConditionTW | SnpsTW | SnpTW
10
+
11
+ export type Q = CategoricalQ | NumericQ | GvQ | ConditionQ | SnpsQ | SnpQ | SampleLstQ // | other q
12
+
13
+ //export type TermWrapper = CategoricalTW | NumericTW | SnpsTW | (BaseTW & { term: Term; q: Q })
9
14
  export type TwLst = TermWrapper[]
10
15
 
11
- export type Q = BaseQ | CategoricalQ | ConditionQ | NumericQ | SampleLstQ | SnpsQ
16
+ //export type Q = BaseQ | CategoricalQ | ConditionQ | NumericQ | SampleLstQ | SnpsQ
12
17
 
13
18
  export type RawTW =
14
19
  //{ id: string } | RawCatTW
@@ -1,10 +0,0 @@
1
- // temporary code file to hold updated type definitions
2
- // as part of the tw router/handler refactor
3
-
4
- import type { CatTWTypes, CategoricalQ } from './categorical.ts'
5
- import type { NumTWTypes, NumericQ } from './numeric.ts'
6
- import type { GvTW, GvQ } from './geneVariant.ts'
7
-
8
- export type TermWrapper = CatTWTypes | NumTWTypes | GvTW
9
-
10
- export type Q = CategoricalQ | NumericQ | GvQ // | other q