@sjcrh/proteinpaint-types 2.119.0 → 2.123.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 (52) 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-HURSYPTO.js → chunk-D5OG676D.js} +32 -1
  6. package/dist/{chunk-J6SJ4M3S.js → chunk-F64WJMRL.js} +1094 -1306
  7. package/dist/{chunk-YURGGHZI.js → chunk-K7P6C6KU.js} +731 -1079
  8. package/dist/{chunk-GI4NNB34.js → chunk-LBGUOJR3.js} +366 -512
  9. package/dist/{chunk-OL4OMJSP.js → chunk-NCFUZ5VV.js} +903 -1139
  10. package/dist/{chunk-GD3KAF6V.js → chunk-QMWUUGEK.js} +457 -603
  11. package/dist/{chunk-DL4UYYVE.js → chunk-RX5EB2HL.js} +366 -512
  12. package/dist/{chunk-ROPNHRVV.js → chunk-SQBZAOWB.js} +366 -512
  13. package/dist/{chunk-7NNYHDAK.js → chunk-XPOHYEAY.js} +917 -1265
  14. package/dist/{chunk-UVOO2LBD.js → chunk-ZMOSABYP.js} +916 -1264
  15. package/dist/correlationVolcano.js +1 -1
  16. package/dist/index.js +13 -13
  17. package/dist/samplewsimages.js +1 -1
  18. package/dist/termdb.boxplot.js +1 -1
  19. package/dist/termdb.categories.js +1 -1
  20. package/dist/termdb.cluster.js +1 -1
  21. package/dist/termdb.descrstats.js +1 -1
  22. package/dist/termdb.numericcategories.js +1 -1
  23. package/dist/termdb.percentile.js +1 -1
  24. package/dist/termdb.termsbyids.js +1 -1
  25. package/dist/termdb.topTermsByType.js +1 -1
  26. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  27. package/dist/termdb.violin.js +1 -1
  28. package/package.json +1 -1
  29. package/src/dataset.ts +11 -5
  30. package/src/filter.ts +12 -67
  31. package/src/genome.ts +1 -1
  32. package/src/routes/hicgenome.ts +1 -1
  33. package/src/routes/isoformlst.ts +1 -1
  34. package/src/routes/samplewsimages.ts +1 -0
  35. package/src/routes/termdb.cohorts.ts +1 -1
  36. package/src/routes/termdb.singlecellData.ts +1 -1
  37. package/src/terms/categorical.ts +3 -3
  38. package/src/terms/condition.ts +2 -2
  39. package/src/terms/geneExpression.ts +3 -3
  40. package/src/terms/geneVariant.ts +58 -19
  41. package/src/terms/metaboliteIntensity.ts +4 -4
  42. package/src/terms/q.ts +1 -1
  43. package/src/terms/samplelst.ts +3 -3
  44. package/src/terms/singleCellCellType.ts +2 -2
  45. package/src/terms/singleCellGeneExpression.ts +4 -5
  46. package/src/terms/snp.ts +3 -3
  47. package/src/terms/snps.ts +4 -4
  48. package/src/terms/term.ts +14 -8
  49. package/src/terms/tw.ts +7 -8
  50. package/src/terms/updated-types.ts +5 -4
  51. package/src/termsetting.ts +4 -4
  52. 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,
@@ -147,7 +147,7 @@ import {
147
147
  sampleWSImagesPayload,
148
148
  validSampleWSImagesRequest,
149
149
  validSampleWSImagesResponse
150
- } from "./chunk-HURSYPTO.js";
150
+ } from "./chunk-D5OG676D.js";
151
151
  import {
152
152
  snpPayload,
153
153
  validSnpRequest,
@@ -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
  sampleWSImagesPayload,
3
3
  validSampleWSImagesRequest,
4
4
  validSampleWSImagesResponse
5
- } from "./chunk-HURSYPTO.js";
5
+ } from "./chunk-D5OG676D.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  sampleWSImagesPayload,
@@ -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",
3
+ "version": "2.123.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
@@ -600,9 +600,13 @@ type CnvSegment = {
600
600
  cnvMaxCopynumber?: number
601
601
  */
602
602
 
603
- /** if cnv is using qualitative categories. ui will show checkboxes for each category that's present
604
- cnvCategories?:string[]
603
+ /** quick fix for gdc cnv tool:
604
+ if not set, mds3 tk & matrix will load cnv segments and show them together with ssm & fusion
605
+ if set:
606
+ - for mds3 tk loading via mds3.load.js, only when tk.hardcodeCnvOnly=true, this will be loaded and shown
607
+ - for others using mayGetGeneVariantData(), this is always disabled, as request won't have this flag
605
608
  */
609
+ requiresHardcodeCnvOnlyFlag?: true
606
610
  }
607
611
 
608
612
  /*
@@ -946,6 +950,8 @@ export type WSImages = {
946
950
  getWSImages?: (sampleName: string) => Promise<WSImage[]>
947
951
  /** ds supplied */
948
952
  getWSIAnnotations?: (sampleName: string, wsiImage: string) => Promise<string[]>
953
+ /** ds supplied */
954
+ getZoomInPoints?: (sampleName: string, wsiImage: string) => Promise<Array<[number, number]>>
949
955
  }
950
956
 
951
957
  /*** types supporting Termdb ***/
@@ -1278,7 +1284,7 @@ type Termdb = {
1278
1284
  /** Terms */
1279
1285
  termIds?: TermIds
1280
1286
  /** if true, backend is allowed to send sample names to client in charts */
1281
- displaySampleIds?: boolean
1287
+ displaySampleIds?: (clientAuthResult: any) => boolean
1282
1288
  converSampleIds?: boolean
1283
1289
  alwaysShowBranchTerms?: boolean
1284
1290
  minimumSampleAllowed4filter?: number
@@ -1428,8 +1434,8 @@ keep this setting here for reason of:
1428
1434
  /** colors for a category multivalues */
1429
1435
  [index: string]: { [index: string]: string }
1430
1436
  }
1431
- //terms that are not shown in the dictionary tree unless the user is admin. If there is no authentication the terms listes are always hidden
1432
- hiddenTermIds?: string[]
1437
+ //terms are shown in the dictionary based on term and user role.
1438
+ isTermVisible?: (clientAuthResult: any, id: string) => boolean
1433
1439
  }
1434
1440
 
1435
1441
  type SampleType = {
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
@@ -14,6 +14,7 @@ export type SampleWSImagesResponse = {
14
14
  export type WSImage = {
15
15
  filename: string
16
16
  overlays?: Array<string>
17
+ zoomInPoints?: Array<[number, number]>
17
18
  metadata: string
18
19
  }
19
20
 
@@ -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--------