@sjcrh/proteinpaint-types 2.119.0-0 → 2.121.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 (48) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-T2CSA2MC.js → chunk-3ZT4UCFM.js} +366 -512
  3. package/dist/{chunk-4V46EBDF.js → chunk-5XRJ5ATE.js} +916 -1264
  4. package/dist/{chunk-BM3JLR6T.js → chunk-AGSW7G4T.js} +905 -1253
  5. package/dist/{chunk-J6SJ4M3S.js → chunk-F64WJMRL.js} +1094 -1306
  6. package/dist/{chunk-YURGGHZI.js → chunk-K7P6C6KU.js} +731 -1079
  7. package/dist/{chunk-GI4NNB34.js → chunk-LBGUOJR3.js} +366 -512
  8. package/dist/{chunk-OL4OMJSP.js → chunk-NCFUZ5VV.js} +903 -1139
  9. package/dist/{chunk-GD3KAF6V.js → chunk-QMWUUGEK.js} +457 -603
  10. package/dist/{chunk-DL4UYYVE.js → chunk-RX5EB2HL.js} +366 -512
  11. package/dist/{chunk-ROPNHRVV.js → chunk-SQBZAOWB.js} +366 -512
  12. package/dist/{chunk-7NNYHDAK.js → chunk-XPOHYEAY.js} +917 -1265
  13. package/dist/{chunk-UVOO2LBD.js → chunk-ZMOSABYP.js} +916 -1264
  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/filter.ts +12 -67
  28. package/src/genome.ts +1 -1
  29. package/src/routes/hicgenome.ts +1 -1
  30. package/src/routes/isoformlst.ts +1 -1
  31. package/src/routes/termdb.cohorts.ts +1 -1
  32. package/src/routes/termdb.singlecellData.ts +1 -1
  33. package/src/terms/categorical.ts +3 -3
  34. package/src/terms/condition.ts +2 -2
  35. package/src/terms/geneExpression.ts +3 -3
  36. package/src/terms/geneVariant.ts +58 -19
  37. package/src/terms/metaboliteIntensity.ts +4 -4
  38. package/src/terms/q.ts +1 -1
  39. package/src/terms/samplelst.ts +3 -3
  40. package/src/terms/singleCellCellType.ts +2 -2
  41. package/src/terms/singleCellGeneExpression.ts +4 -5
  42. package/src/terms/snp.ts +3 -3
  43. package/src/terms/snps.ts +4 -4
  44. package/src/terms/term.ts +14 -8
  45. package/src/terms/tw.ts +7 -8
  46. package/src/terms/updated-types.ts +5 -4
  47. package/src/termsetting.ts +4 -4
  48. package/src/test/numeric.type.spec.ts +2 -2
@@ -2,7 +2,7 @@ import {
2
2
  CorrelationVolcanoPayload,
3
3
  validCorrelationVolcanoRequest,
4
4
  validCorrelationVolcanoResponse
5
- } from "./chunk-YURGGHZI.js";
5
+ } from "./chunk-K7P6C6KU.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-BM3JLR6T.js";
5
+ } from "./chunk-AGSW7G4T.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-OL4OMJSP.js";
15
+ } from "./chunk-NCFUZ5VV.js";
16
16
  import {
17
17
  termdbTopVariablyExpressedGenesPayload,
18
18
  validTermdbTopVariablyExpressedGenesRequest,
19
19
  validTermdbTopVariablyExpressedGenesResponse
20
- } from "./chunk-ROPNHRVV.js";
20
+ } from "./chunk-SQBZAOWB.js";
21
21
  import {
22
22
  validViolinRequest,
23
23
  validViolinResponse,
24
24
  violinPayload
25
- } from "./chunk-DL4UYYVE.js";
25
+ } from "./chunk-RX5EB2HL.js";
26
26
  import {
27
27
  tilePayload,
28
28
  validTileRequest,
@@ -42,7 +42,7 @@ import {
42
42
  percentilePayload,
43
43
  validPercentileRequest,
44
44
  validPercentileResponse
45
- } from "./chunk-T2CSA2MC.js";
45
+ } from "./chunk-3ZT4UCFM.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-7NNYHDAK.js";
90
+ } from "./chunk-XPOHYEAY.js";
91
91
  import {
92
92
  termdbCategoriesPayload,
93
93
  validCategoriesRequest,
94
94
  validCategoriesResponse
95
- } from "./chunk-UVOO2LBD.js";
95
+ } from "./chunk-ZMOSABYP.js";
96
96
  import {
97
97
  termdbClusterPayload,
98
98
  validTermdbClusterRequest,
99
99
  validTermdbClusterResponse
100
- } from "./chunk-J6SJ4M3S.js";
100
+ } from "./chunk-F64WJMRL.js";
101
101
  import {
102
102
  termdbCohortSummaryPayload,
103
103
  validTermdbCohortSummaryRequest,
@@ -112,12 +112,12 @@ import {
112
112
  descrStatsPayload,
113
113
  validDescrStatsRequest,
114
114
  validDescrStatsResponse
115
- } from "./chunk-4V46EBDF.js";
115
+ } from "./chunk-5XRJ5ATE.js";
116
116
  import {
117
117
  numericCategoriesPayload,
118
118
  validNumericCategoriesRequest,
119
119
  validNumericCategoriesResponse
120
- } from "./chunk-GI4NNB34.js";
120
+ } from "./chunk-LBGUOJR3.js";
121
121
  import {
122
122
  hicstatPayload,
123
123
  validHicstatRequest,
@@ -197,7 +197,7 @@ import {
197
197
  brainImagingPayload,
198
198
  validBrainImagingRequest,
199
199
  validBrainImagingResponse
200
- } from "./chunk-GD3KAF6V.js";
200
+ } from "./chunk-QMWUUGEK.js";
201
201
  import {
202
202
  brainImagingSamplesPayload,
203
203
  validBrainImagingSamplesRequest,
@@ -212,7 +212,7 @@ import {
212
212
  CorrelationVolcanoPayload,
213
213
  validCorrelationVolcanoRequest,
214
214
  validCorrelationVolcanoResponse
215
- } from "./chunk-YURGGHZI.js";
215
+ } from "./chunk-K7P6C6KU.js";
216
216
  import {
217
217
  datasetPayload,
218
218
  validDatasetRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-7NNYHDAK.js";
5
+ } from "./chunk-XPOHYEAY.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-UVOO2LBD.js";
5
+ } from "./chunk-ZMOSABYP.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-J6SJ4M3S.js";
5
+ } from "./chunk-F64WJMRL.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-4V46EBDF.js";
5
+ } from "./chunk-5XRJ5ATE.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-GI4NNB34.js";
5
+ } from "./chunk-LBGUOJR3.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-T2CSA2MC.js";
5
+ } from "./chunk-3ZT4UCFM.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-BM3JLR6T.js";
5
+ } from "./chunk-AGSW7G4T.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-OL4OMJSP.js";
5
+ } from "./chunk-NCFUZ5VV.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-ROPNHRVV.js";
5
+ } from "./chunk-SQBZAOWB.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-DL4UYYVE.js";
5
+ } from "./chunk-RX5EB2HL.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.119.0-0",
3
+ "version": "2.121.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/filter.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { BaseValue } from './terms/term.ts'
2
- import { NumericTerm, NumericBin } from './terms/numeric.ts'
3
- import { CategoricalTerm } from './terms/categorical.ts'
4
- import { GeneVariantTerm } from './terms/geneVariant.ts'
5
- import { ConditionTerm } from './terms/condition.ts'
1
+ import type { BaseValue } from './terms/term.ts'
2
+ import type { NumericTerm, NumericBin } from './terms/numeric.ts'
3
+ import type { CategoricalTerm } from './terms/categorical.ts'
4
+ import type { DtTerm } from './terms/geneVariant.ts'
5
+ import type { ConditionTerm } from './terms/condition.ts'
6
6
 
7
7
  /*
8
8
  --------EXPORTED--------
@@ -52,74 +52,19 @@ export type ConditionTvs = BaseTvs & {
52
52
  grade_and_child?: GradeAndChildEntry[]
53
53
  }
54
54
 
55
- type GeneVariantOrigin = 'somatic' | 'germline'
56
-
57
- type SNVIndelClasses =
58
- | 'M'
59
- | 'E'
60
- | 'F'
61
- | 'N'
62
- | 'S'
63
- | 'D'
64
- | 'I'
65
- | 'P'
66
- | 'L'
67
- | 'Intron'
68
- | 'Blank'
69
- | 'WT'
70
- | 'ITD'
71
- | 'DEL'
72
- | 'NLOSS'
73
- | 'CLOSS'
74
- | 'Utr3'
75
- | 'Utr5'
76
- | 'X'
77
- | 'noncoding'
78
- type SNVIndelTvsValue = {
79
- dt: 1
80
- mclassLst: SNVIndelClasses[]
81
- mclassExcludeLst: SNVIndelClasses[]
82
- origin?: GeneVariantOrigin
83
- }
84
-
85
- type CNVClasses = 'CNV_amp' | 'CNV_loss' | 'CNV_loh' | 'Blank' | 'WT' | 'CNV_amplification' | 'CNV_homozygous_deletion'
86
- type CNVTvsValue = {
87
- dt: 4
88
- mclassLst: CNVClasses[]
89
- mclassExcludeLst: CNVClasses[]
90
- origin?: GeneVariantOrigin
91
- }
92
-
93
- type SVClasses = 'SV' | 'Blank' | 'WT'
94
- type SVTvsValue = {
95
- dt: 5
96
- mclassLst: SVClasses[]
97
- mclassExcludeLst: SVClasses[]
98
- origin?: GeneVariantOrigin
99
- }
100
-
101
- type FusionRNAClasses = 'Fuserna' | 'Blank' | 'WT'
102
- type FusionTvsValue = {
103
- dt: 2
104
- mclassLst: FusionRNAClasses[]
105
- mclassExcludeLst: FusionRNAClasses[]
106
- origin?: GeneVariantOrigin
107
- }
108
-
109
- type GeneVariantTvsValue = SNVIndelTvsValue | CNVTvsValue | SVTvsValue | FusionTvsValue
110
-
111
55
  type GeneVariantTvs = BaseTvs & {
112
- term: GeneVariantTerm
113
- values: GeneVariantTvsValue[]
56
+ term: DtTerm
57
+ values: { key: string; label: string; value: string }[]
114
58
  }
59
+
115
60
  /*** types supporting Filter type ***/
116
61
 
117
62
  export type Tvs = CategoricalTvs | NumericTvs | ConditionTvs | GeneVariantTvs // | SampleLstTvs ...
118
63
 
119
64
  export type Filter = {
120
- type: 'lst'
121
- in?: boolean
122
- join: 'and' | 'or'
65
+ type: 'tvslst'
66
+ in: boolean
67
+ join: string
123
68
  tag?: string // client-side only
124
- lst: (Filter | Tvs)[]
69
+ lst: ({ type: 'tvs'; tvs: Tvs } | Filter)[]
125
70
  }
package/src/genome.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Cohort } from './dataset.ts'
1
+ import type { Cohort } from './dataset.ts'
2
2
 
3
3
  /********* server/genome ********
4
4
 
@@ -1,5 +1,5 @@
1
1
  import type { BaseHicRequest, XYZCoord } from './hicdata.ts'
2
- import { RoutePayload } from './routeApi.ts'
2
+ import type { RoutePayload } from './routeApi.ts'
3
3
 
4
4
  export type HicGenomeRequest = BaseHicRequest & {
5
5
  /** Entire chromosome list read from the file (see hicstate) */
@@ -1,4 +1,4 @@
1
- import { RoutePayload } from './routeApi.js'
1
+ import type { RoutePayload } from './routeApi.js'
2
2
 
3
3
  export type IsoformLstRequest = any
4
4
  export type IsoformLstResponse = any
@@ -1,4 +1,4 @@
1
- import { RoutePayload } from './routeApi.js'
1
+ import type { RoutePayload } from './routeApi.js'
2
2
 
3
3
  export type TermdbCohortsRequest = any
4
4
  export type TermdbCohortsResponse = any
@@ -1,5 +1,5 @@
1
1
  import type { RoutePayload } from './routeApi.js'
2
- import { ErrorResponse } from './errorResponse.ts'
2
+ import type { ErrorResponse } from './errorResponse.ts'
3
3
 
4
4
  export type Cell = {
5
5
  /** Cell id or barcode */
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  BaseTerm,
3
3
  TermValues,
4
4
  GroupSettingQ,
@@ -8,8 +8,8 @@ import {
8
8
  PredefinedGroupSettingQ,
9
9
  CustomGroupSettingQ
10
10
  } from './term.ts'
11
- import { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
12
- import { TermSettingInstance } from '../termsetting.ts'
11
+ import type { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
12
+ import type { TermSettingInstance } from '../termsetting.ts'
13
13
 
14
14
  /**
15
15
  * A raw categorical term q object, before filling-in
@@ -1,5 +1,5 @@
1
- import { BaseTerm, BaseQ, TermValues } from './term.ts'
2
- import { TermWrapper } from './tw.ts'
1
+ import type { BaseTerm, BaseQ, TermValues } from './term.ts'
2
+ import type { TermWrapper } from './tw.ts'
3
3
 
4
4
  /**
5
5
  * @category TW
@@ -1,6 +1,6 @@
1
- import { TermWrapper } from './tw.ts'
2
- import { NumericTerm, NumericQ } from './numeric.ts'
3
- import { TermSettingInstance } from '../termsetting.ts'
1
+ import type { TermWrapper } from './tw.ts'
2
+ import type { NumericTerm, NumericQ } from './numeric.ts'
3
+ import type { TermSettingInstance } from '../termsetting.ts'
4
4
 
5
5
  /*
6
6
  --------EXPORTED--------
@@ -1,24 +1,28 @@
1
- import type { MinBaseQ, BaseTerm, TermGroupSetting, BaseTW, GroupSettingQ, ValuesQ, TermValues } from '../index.ts'
1
+ import type { MinBaseQ, BaseTerm, TermGroupSetting, BaseTW, TermValues, BaseGroupSet, TermFilter } from '../index.ts'
2
2
  import type { TermSettingInstance } from '../termsetting.ts'
3
3
 
4
- export type GeneVariantBaseQ = MinBaseQ & {
5
- // cnv cutoffs may no longer be necessary, but keeping for now
6
- // see fillTW() in termsetting/handlers/geneVariant.ts
4
+ // q types
5
+ export type GvBaseQ = MinBaseQ & {
7
6
  cnvGainCutoff?: number
8
7
  cnvMaxLength?: number
9
8
  cnvMinAbsValue?: number
10
9
  cnvLossCutoff?: number
11
- exclude: string[]
12
10
  }
13
11
 
14
- export type GeneVariantQ = GeneVariantBaseQ & (ValuesQ | GroupSettingQ)
12
+ type RawGvValuesQ = GvBaseQ & { type?: 'values' }
13
+ type RawGvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset?: BaseGroupSet }
15
14
 
16
- type GeneVariantBaseTerm = BaseTerm & {
15
+ export type GvValuesQ = GvBaseQ & { type: 'values' }
16
+ export type GvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset: BaseGroupSet }
17
+
18
+ export type GvQ = GvValuesQ | GvCustomGsQ
19
+
20
+ // term types
21
+ type GvBaseTerm = BaseTerm & {
17
22
  type: 'geneVariant'
18
- groupsetting: TermGroupSetting
19
23
  }
20
24
 
21
- export type GeneVariantGeneTerm = GeneVariantBaseTerm & {
25
+ export type GvGene = {
22
26
  kind: 'gene'
23
27
  gene: string
24
28
  // chr,start,stop should exist together as a separate type called
@@ -29,36 +33,71 @@ export type GeneVariantGeneTerm = GeneVariantBaseTerm & {
29
33
  stop?: number
30
34
  }
31
35
 
32
- export type GeneVariantCoordTerm = GeneVariantBaseTerm & {
36
+ export type GvCoord = {
33
37
  kind: 'coord'
34
38
  chr: string
35
39
  start: number
36
40
  stop: number
37
41
  }
38
42
 
39
- export type GeneVariantTerm = GeneVariantGeneTerm | GeneVariantCoordTerm
43
+ export type RawGvTerm = GvBaseTerm &
44
+ (GvGene | GvCoord) & {
45
+ groupsetting?: TermGroupSetting
46
+ filter?: TermFilter
47
+ }
48
+
49
+ export type GvTerm = GvBaseTerm &
50
+ (GvGene | GvCoord) & {
51
+ groupsetting: TermGroupSetting
52
+ filter: TermFilter
53
+ }
54
+
55
+ // tw types
56
+ export type RawGvValuesTW = BaseTW & {
57
+ type?: 'GvValuesTW'
58
+ term: RawGvTerm
59
+ q: RawGvValuesQ
60
+ }
61
+
62
+ export type RawGvCustomGsTW = BaseTW & {
63
+ type?: 'GvCustomGsTW'
64
+ term: RawGvTerm
65
+ q: RawGvCustomGsQ
66
+ }
40
67
 
41
- export type GeneVariantTW = BaseTW & {
42
- term: GeneVariantTerm
43
- q: GeneVariantQ
68
+ export type GvValuesTW = BaseTW & {
69
+ type: 'GvValuesTW'
70
+ term: GvTerm
71
+ q: GvValuesQ
44
72
  }
45
73
 
74
+ export type GvCustomGsTW = BaseTW & {
75
+ type: 'GvCustomGsTW'
76
+ term: GvTerm
77
+ q: GvCustomGsQ
78
+ }
79
+
80
+ export type RawGvTW = RawGvValuesTW | RawGvCustomGsTW
81
+ export type GvTW = GvValuesTW | GvCustomGsTW
82
+
83
+ // termsetting types
46
84
  export type GeneVariantTermSettingInstance = TermSettingInstance & {
47
- q: GeneVariantQ
48
- term: GeneVariantTerm
85
+ q: GvQ
86
+ term: GvTerm
49
87
  category2samplecount: any
50
88
  groupSettingInstance?: any
51
89
  }
52
90
 
91
+ // miscellaneous types
53
92
  export type DtTerm = {
54
93
  id: string
94
+ query: string
55
95
  name: string
96
+ name_noOrigin: string
56
97
  parent_id: any
57
98
  isleaf: boolean
58
99
  type: string
59
100
  dt: number
60
101
  origin?: string
61
- values?: TermValues
62
- min?: number
63
- max?: number
102
+ values: TermValues
64
103
  }
@@ -1,7 +1,7 @@
1
- import { TermWrapper } from './tw.ts'
2
- import { BaseQ } from './term.ts'
3
- import { NumericTerm } from './numeric.ts'
4
- import { TermSettingInstance } from '../termsetting.ts'
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'
5
5
 
6
6
  /*
7
7
  --------EXPORTED--------
package/src/terms/q.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { HiddenValues, GroupSettingQ, GroupEntry } from './term.ts'
1
+ import type { HiddenValues, GroupSettingQ, GroupEntry } from './term.ts'
2
2
 
3
3
  // MinBaseQ is BaseQ without .mode and .type
4
4
  // MinBaseQ should eventually replace BaseQ because .mode and .type
@@ -1,6 +1,6 @@
1
- import { BaseTerm, BaseQ } from './term.ts'
2
- import { TermWrapper } from './tw.ts'
3
- import { TermSettingInstance } from '../termsetting.ts'
1
+ import type { BaseTerm, BaseQ } from './term.ts'
2
+ import type { TermWrapper } from './tw.ts'
3
+ import type { TermSettingInstance } from '../termsetting.ts'
4
4
 
5
5
  /*
6
6
  --------EXPORTED--------
@@ -1,5 +1,5 @@
1
- import { BaseTerm, BaseTW, GroupSettingQ, TermGroupSetting, TermValues } from './term.ts'
2
- import { MinBaseQ } from './q.ts'
1
+ import type { BaseTerm, BaseTW, GroupSettingQ, TermGroupSetting, TermValues } from './term.ts'
2
+ import type { MinBaseQ } from './q.ts'
3
3
 
4
4
  type SingleCellCellTypeBaseQ = MinBaseQ & { mode: 'discrete' | 'binary' }
5
5
 
@@ -1,8 +1,7 @@
1
- import { TermWrapper } from './tw.ts'
2
- import { BaseQ } from './term.ts'
3
- import { GeneExpressionQ } from './geneExpression.ts'
4
- import { TermSettingInstance } from '../termsetting.ts'
5
- import { NumericTerm } from './numeric.ts'
1
+ import type { TermWrapper } from './tw.ts'
2
+ import type { GeneExpressionQ } from './geneExpression.ts'
3
+ import type { TermSettingInstance } from '../termsetting.ts'
4
+ import type { NumericTerm } from './numeric.ts'
6
5
 
7
6
  /*
8
7
  --------EXPORTED--------
package/src/terms/snp.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { TermWrapper } from './tw.ts'
2
- import { BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
3
- import { TermSettingInstance } from '../termsetting.ts'
1
+ import type { TermWrapper } from './tw.ts'
2
+ import type { BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
3
+ import type { TermSettingInstance } from '../termsetting.ts'
4
4
 
5
5
  /*
6
6
  For term type 'snp'
package/src/terms/snps.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { BaseTW, BaseQ, BaseTerm } from './term.ts'
2
- import { TermSettingInstance, InstanceDom, UseCase } from '../termsetting.ts'
3
- import { VocabApi } from '../vocab.ts'
4
- import { Tvs, Filter } from '../filter.ts'
1
+ import type { BaseTW, BaseQ, BaseTerm } from './term.ts'
2
+ import type { TermSettingInstance, InstanceDom, UseCase } from '../termsetting.ts'
3
+ import type { VocabApi } from '../vocab.ts'
4
+ import type { Tvs, Filter } from '../filter.ts'
5
5
 
6
6
  /*
7
7
  --------EXPORTED--------
package/src/terms/term.ts CHANGED
@@ -2,7 +2,7 @@ import type { Filter } from '../filter.js'
2
2
  import type { CategoricalTerm, CategoricalBaseQ } from './categorical.js'
3
3
  import type { ConditionTerm } from './condition.js'
4
4
  import type { NumericTerm } from './numeric.js'
5
- import type { GeneVariantTerm } from './geneVariant.js'
5
+ import type { GvTerm, DtTerm } from './geneVariant.js'
6
6
  import type { SampleLstTerm } from './samplelst.js'
7
7
  import type { SnpsTerm } from './snps.js'
8
8
 
@@ -105,11 +105,10 @@ export type BaseTerm = {
105
105
  included_types?: string[]
106
106
  isleaf?: boolean
107
107
  values?: TermValues
108
- filter?: any
108
+ filter?: TermFilter
109
109
  }
110
110
 
111
- export type Term = BaseTerm &
112
- (NumericTerm | CategoricalTerm | ConditionTerm | GeneVariantTerm | SampleLstTerm | SnpsTerm)
111
+ export type Term = BaseTerm & (NumericTerm | CategoricalTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm)
113
112
 
114
113
  export type ValuesGroup = {
115
114
  name: string
@@ -118,12 +117,19 @@ export type ValuesGroup = {
118
117
  uncomputable?: boolean // if true, do not include this group in computations
119
118
  }
120
119
 
121
- // TODO: determine if this is used
122
120
  export type FilterGroup = {
123
121
  name: string
124
122
  type: 'filter'
125
- filter: any
126
- uncomputable?: boolean // if true, do not include this group in computations
123
+ filter: TermFilter & {
124
+ active: Filter // active filter
125
+ group: number // group index
126
+ }
127
+ uncomputable: boolean
128
+ }
129
+
130
+ export type TermFilter = {
131
+ opts: { joinWith: string[] } // options for joining filters
132
+ terms: DtTerm[] // terms used to build a frontend vocab that will be used for filtering // TODO: generalize the term structure used here
127
133
  }
128
134
 
129
135
  export type GroupEntry = ValuesGroup | FilterGroup
@@ -156,7 +162,7 @@ export type TermGroupSetting =
156
162
 
157
163
  export type BaseTW = {
158
164
  id?: string
159
- $id: string
165
+ $id?: string
160
166
  isAtomic?: true
161
167
  // plot-specific customizations that are applied to a tw copy
162
168
  // todo: should rethink these
package/src/terms/tw.ts CHANGED
@@ -1,15 +1,14 @@
1
- import { BaseQ, BaseTW, Term } from './term.ts'
2
- import { CategoricalQ, CategoricalTW } from './categorical.ts'
3
- import { NumericQ, NumericTW } from './numeric.ts'
4
- import { SnpsQ, SnpsTW } from './snps.ts'
5
- import { ConditionQ } from './condition.ts'
6
- import { GeneVariantQ } from './geneVariant.ts'
7
- import { SampleLstQ } from './samplelst.ts'
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
+ import type { SnpsQ, SnpsTW } from './snps.ts'
5
+ import type { ConditionQ } from './condition.ts'
6
+ import type { SampleLstQ } from './samplelst.ts'
8
7
 
9
8
  export type TermWrapper = CategoricalTW | NumericTW | SnpsTW | (BaseTW & { term: Term; q: Q })
10
9
  export type TwLst = TermWrapper[]
11
10
 
12
- export type Q = BaseQ | CategoricalQ | ConditionQ | NumericQ | GeneVariantQ | SampleLstQ | SnpsQ
11
+ export type Q = BaseQ | CategoricalQ | ConditionQ | NumericQ | SampleLstQ | SnpsQ
13
12
 
14
13
  export type RawTW =
15
14
  //{ id: string } | RawCatTW