@sjcrh/proteinpaint-types 2.141.0 → 2.143.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 (144) hide show
  1. package/dist/aiProjectAdmin.js +2 -2
  2. package/dist/aiProjectSelectedWSImages.js +11 -0
  3. package/dist/brainImaging.js +2 -2
  4. package/dist/brainImagingSamples.js +2 -2
  5. package/dist/burden.js +2 -2
  6. package/dist/{chunk-W6NLM363.js → chunk-2744ACBX.js} +1 -1
  7. package/dist/{chunk-F5XGJIUS.js → chunk-2BCLGYAG.js} +1 -1
  8. package/dist/{chunk-L5DFYFWX.js → chunk-2C4X5B6N.js} +1 -1
  9. package/dist/{chunk-KEJROUTM.js → chunk-4DNCZQOB.js} +271 -265
  10. package/dist/{chunk-WCWYMCZD.js → chunk-4MLQS6N7.js} +235 -127
  11. package/dist/{chunk-I7FTK55B.js → chunk-4VEXL32Q.js} +560 -410
  12. package/dist/{chunk-K5POIB3P.js → chunk-4ZMQ5CTL.js} +1 -1
  13. package/dist/{chunk-QWAPDNYB.js → chunk-5KADNZH2.js} +578 -428
  14. package/dist/{chunk-I2KWGMNM.js → chunk-62XTWOVJ.js} +1 -1
  15. package/dist/{chunk-FXCCZCTN.js → chunk-6GKG55BT.js} +1 -1
  16. package/dist/{chunk-EOBFYFLQ.js → chunk-6SOULHNE.js} +692 -460
  17. package/dist/{chunk-77RH7U6G.js → chunk-74B7B2CV.js} +505 -391
  18. package/dist/{chunk-S6OBK4RE.js → chunk-7ICZFAGK.js} +252 -140
  19. package/dist/{chunk-J4QAF4EU.js → chunk-7MUISZHS.js} +1 -1
  20. package/dist/{chunk-SMS3Y2XZ.js → chunk-BCBSHTHS.js} +1 -1
  21. package/dist/{chunk-56JQGGZJ.js → chunk-C246BWQE.js} +812 -568
  22. package/dist/{chunk-3C26VWPU.js → chunk-CP26DR4V.js} +1 -1
  23. package/dist/{chunk-ERSTC6X6.js → chunk-CQXBQY2H.js} +1 -1
  24. package/dist/{chunk-CQDDRHRY.js → chunk-CT6IBFVP.js} +9 -4
  25. package/dist/{chunk-ZVTZJRGS.js → chunk-D7AKQKDG.js} +1 -1
  26. package/dist/{chunk-YGX6BZZY.js → chunk-EIJT53QB.js} +1 -1
  27. package/dist/{chunk-VKBTOKI2.js → chunk-EOKM345J.js} +1 -1
  28. package/dist/{chunk-XEQWKMZN.js → chunk-EYKGJDKU.js} +1 -1
  29. package/dist/{chunk-EH7VAE5S.js → chunk-FMC4G5BP.js} +1 -1
  30. package/dist/{chunk-KRYTJ2SL.js → chunk-FTPYJPUB.js} +1 -1
  31. package/dist/{chunk-VMQUAU5V.js → chunk-FXXE4S7M.js} +574 -424
  32. package/dist/{chunk-UYBVE3DL.js → chunk-GCAZSDCW.js} +574 -424
  33. package/dist/{chunk-5S3UWYSK.js → chunk-GTS2G4R4.js} +1 -1
  34. package/dist/{chunk-KFVYRW7D.js → chunk-HQV2A7JV.js} +1 -1
  35. package/dist/{chunk-TMQI47YT.js → chunk-J2Y7RIN2.js} +29 -25
  36. package/dist/{chunk-HNETXFC7.js → chunk-K4FSDTDW.js} +1 -1
  37. package/dist/{chunk-HIPWQ6AW.js → chunk-KCMPDEH7.js} +1 -1
  38. package/dist/chunk-KVE2NBC6.js +132 -0
  39. package/dist/{chunk-QX3MRSSK.js → chunk-LRVF7U64.js} +1 -1
  40. package/dist/{chunk-5XCPOWFN.js → chunk-MHDQO7R5.js} +1 -1
  41. package/dist/{chunk-K4RV3N2T.js → chunk-MIOIOFBZ.js} +1 -1
  42. package/dist/{chunk-424IUJWR.js → chunk-MMFL6N5M.js} +237 -129
  43. package/dist/{chunk-LDQNJLYQ.js → chunk-N7C4SRFX.js} +1 -1
  44. package/dist/chunk-NO2EZKW4.js +291 -0
  45. package/dist/{chunk-HKGWC7OO.js → chunk-P25WDNMD.js} +1 -1
  46. package/dist/{chunk-FYRWYZEE.js → chunk-PPPSDO6G.js} +36 -40
  47. package/dist/{chunk-KVUJPR42.js → chunk-PTE2I7DF.js} +1 -1
  48. package/dist/{chunk-AASWRJMS.js → chunk-Q3HGHP3J.js} +1 -1
  49. package/dist/{chunk-WMI4VKU3.js → chunk-TCEHHLIZ.js} +206 -51
  50. package/dist/{chunk-T3GTEGQN.js → chunk-U3AOS5QJ.js} +235 -127
  51. package/dist/{chunk-X2CX5K24.js → chunk-U3BTVE5T.js} +1 -1
  52. package/dist/{chunk-HUMZDPUU.js → chunk-U4A647KI.js} +1 -1
  53. package/dist/{chunk-4GCROGGK.js → chunk-UBOVHONH.js} +1 -1
  54. package/dist/{chunk-GGZUN2GE.js → chunk-UGYLBYUU.js} +1 -1
  55. package/dist/{chunk-XJU4JALX.js → chunk-USAQULWA.js} +35 -31
  56. package/dist/{chunk-IVU6STSJ.js → chunk-X4JBWMXY.js} +1 -1
  57. package/dist/{chunk-LPBYQJG4.js → chunk-XIRCL7KT.js} +1 -1
  58. package/dist/{chunk-CNSSF43V.js → chunk-YNHC5SXO.js} +14 -14
  59. package/dist/{chunk-B43GFRT4.js → chunk-YPEFUAJW.js} +1 -1
  60. package/dist/{chunk-VMSVBNM6.js → chunk-YSTMGNYR.js} +1 -1
  61. package/dist/{chunk-XT2IWGYK.js → chunk-ZCV62ELK.js} +1 -1
  62. package/dist/{chunk-E5MPHTIA.js → chunk-ZIOJDN75.js} +1 -1
  63. package/dist/clearwsisession.js +1 -1
  64. package/dist/clearwsisessions.js +2 -2
  65. package/dist/correlationVolcano.js +2 -2
  66. package/dist/dataset.js +2 -2
  67. package/dist/deleteWSIAnnotation.js +11 -0
  68. package/dist/dsdata.js +2 -2
  69. package/dist/dzimages.js +2 -2
  70. package/dist/gdc.grin2.js +2 -2
  71. package/dist/gdc.maf.js +2 -2
  72. package/dist/gdc.mafBuild.js +2 -2
  73. package/dist/genelookup.js +2 -2
  74. package/dist/genesetEnrichment.js +2 -2
  75. package/dist/genesetOverrepresentation.js +2 -2
  76. package/dist/grin2.js +2 -2
  77. package/dist/healthcheck.js +2 -2
  78. package/dist/hicdata.js +2 -2
  79. package/dist/hicgenome.js +2 -2
  80. package/dist/hicstat.js +2 -2
  81. package/dist/img.js +2 -2
  82. package/dist/index.js +118 -102
  83. package/dist/isoformlst.js +2 -2
  84. package/dist/ntseq.js +2 -2
  85. package/dist/pdomain.js +2 -2
  86. package/dist/samplewsimages.js +2 -2
  87. package/dist/saveWSIAnnotation.js +11 -0
  88. package/dist/snp.js +2 -2
  89. package/dist/termdb.DE.js +2 -2
  90. package/dist/termdb.boxplot.js +2 -2
  91. package/dist/termdb.categories.js +2 -2
  92. package/dist/termdb.cluster.js +2 -2
  93. package/dist/termdb.cohort.summary.js +2 -2
  94. package/dist/termdb.cohorts.js +2 -2
  95. package/dist/termdb.descrstats.js +2 -2
  96. package/dist/termdb.filterTermValues.js +2 -2
  97. package/dist/termdb.numericcategories.js +2 -2
  98. package/dist/termdb.percentile.js +2 -2
  99. package/dist/termdb.profileFormScores.js +2 -2
  100. package/dist/termdb.profileScores.js +2 -2
  101. package/dist/termdb.rootterm.js +2 -2
  102. package/dist/termdb.sampleImages.js +2 -2
  103. package/dist/termdb.singleSampleMutation.js +2 -2
  104. package/dist/termdb.singlecellDEgenes.js +2 -2
  105. package/dist/termdb.singlecellData.js +2 -2
  106. package/dist/termdb.singlecellSamples.js +2 -2
  107. package/dist/termdb.termchildren.js +2 -2
  108. package/dist/termdb.termsbyids.js +2 -2
  109. package/dist/termdb.topMutatedGenes.js +2 -2
  110. package/dist/termdb.topTermsByType.js +2 -2
  111. package/dist/termdb.topVariablyExpressedGenes.js +2 -2
  112. package/dist/termdb.violin.js +2 -2
  113. package/dist/tileserver.js +2 -2
  114. package/dist/wsimages.js +2 -2
  115. package/dist/wsisamples.js +2 -2
  116. package/package.json +1 -1
  117. package/src/dataset.ts +19 -7
  118. package/src/index.ts +3 -1
  119. package/src/routes/aiProjectAdmin.ts +10 -8
  120. package/src/routes/aiProjectSelectedWSImages.ts +23 -0
  121. package/src/routes/deleteWSIAnnotation.ts +23 -0
  122. package/src/routes/grin2.ts +42 -0
  123. package/src/routes/samplewsimages.ts +5 -3
  124. package/src/routes/saveWSIAnnotation.ts +24 -0
  125. package/src/routes/termdb.boxplot.ts +23 -1
  126. package/src/routes/termdb.violin.ts +4 -2
  127. package/src/routes/wsimages.ts +2 -1
  128. package/src/termdb.matrix.ts +2 -0
  129. package/src/terms/categorical.ts +3 -2
  130. package/src/terms/condition.ts +25 -8
  131. package/src/terms/date.ts +7 -5
  132. package/src/terms/geneExpression.ts +22 -8
  133. package/src/terms/metaboliteIntensity.ts +13 -3
  134. package/src/terms/numeric.ts +6 -1
  135. package/src/terms/q.ts +60 -1
  136. package/src/terms/samplelst.ts +2 -2
  137. package/src/terms/singleCellCellType.ts +1 -1
  138. package/src/terms/snp.ts +2 -2
  139. package/src/terms/snps.ts +2 -2
  140. package/src/terms/ssGSEA.ts +4 -2
  141. package/src/terms/term.ts +2 -134
  142. package/src/terms/tw.ts +17 -2
  143. package/dist/sampleWsiAiApi.js +0 -11
  144. package/src/routes/sampleWsiAiApi.ts +0 -21
@@ -1,4 +1,4 @@
1
- import type { PresetNumericBins, NumericBaseTerm, NumTWTypes } from '../index.ts'
1
+ import type { PresetNumericBins, NumericBaseTerm, NumTW, RawNumTW } from '../index.ts'
2
2
 
3
3
  /*
4
4
  --------EXPORTED--------
@@ -7,16 +7,30 @@ GeneExpressionTermWrapper
7
7
  GeneExpressionTermSettingInstance
8
8
  */
9
9
 
10
- export type GeneExpressionTerm = NumericBaseTerm & {
10
+ type Gene = {
11
+ kind?: 'gene'
11
12
  gene: string
12
- name: string
13
- type: 'geneExpression'
14
- bins?: PresetNumericBins
15
- // temporarily allowing chr/start/stop to support
16
- // legacy fpkm files
13
+ // chr,start,stop should exist together as a separate type called
14
+ // 'Coord', but hard to code as atomic `& Coord` because it may
15
+ // need to be filled in
17
16
  chr?: string
18
17
  start?: number
19
18
  stop?: number
20
19
  }
21
20
 
22
- export type GeneExpressionTW = NumTWTypes & { term: GeneExpressionTerm }
21
+ type Coord = {
22
+ kind?: 'coord'
23
+ gene?: string
24
+ chr: string
25
+ start: number
26
+ stop: number
27
+ }
28
+
29
+ export type GeneExpressionTerm = NumericBaseTerm & {
30
+ type: 'geneExpression'
31
+ bins?: PresetNumericBins
32
+ } & (Gene | Coord)
33
+
34
+ export type GeneExpressionTW = NumTW & { term: GeneExpressionTerm }
35
+
36
+ export type RawGeneExpTW = RawNumTW & { term: GeneExpressionTerm & { name?: string } }
@@ -1,4 +1,4 @@
1
- import type { NumericBaseTerm, PresetNumericBins, NumTWTypes } from '../index.ts'
1
+ import type { NumericBaseTerm, PresetNumericBins, NumTW, RawNumTW } from '../index.ts'
2
2
 
3
3
  /*
4
4
  --------EXPORTED--------
@@ -8,11 +8,21 @@ MetaboliteIntensityTermSettingInstance
8
8
  */
9
9
 
10
10
  export type MetaboliteIntensityTerm = NumericBaseTerm & {
11
- name?: string
11
+ name: string
12
12
  type: 'metaboliteIntensity'
13
13
  metabolite: string
14
14
  bins?: PresetNumericBins
15
15
  unit?: string
16
16
  }
17
17
 
18
- export type MetaboliteIntensityTW = NumTWTypes & { term: MetaboliteIntensityTerm }
18
+ export type MetaboliteIntensityTW = NumTW & { term: MetaboliteIntensityTerm }
19
+
20
+ type RawMetabolitIntensityTerm = {
21
+ type: 'metaboliteIntensity'
22
+ metabolite: string
23
+ name?: string
24
+ bins?: PresetNumericBins
25
+ unit?: string
26
+ }
27
+
28
+ export type RawMetaboliteIntensityTW = RawNumTW & { term: RawMetabolitIntensityTerm }
@@ -63,6 +63,7 @@ export type StartUnboundedBin = {
63
63
  stopinclusive?: boolean
64
64
  stopunbounded?: false
65
65
  label?: string
66
+ range?: string // alternative bin label
66
67
  }
67
68
 
68
69
  export type StopUnboundedBin = {
@@ -72,6 +73,7 @@ export type StopUnboundedBin = {
72
73
  startunbounded?: false
73
74
  stopinclusive?: false // cannot include an infinite bound
74
75
  label?: string
76
+ range?: string // alternative bin label
75
77
  }
76
78
 
77
79
  // TODO??? should separate a fully bounded bin by startinclusive, stopinclusive
@@ -84,10 +86,13 @@ export type FullyBoundedBin = {
84
86
  stopinclusive?: boolean
85
87
  stopunbounded?: false
86
88
  label?: string
89
+ range?: string // alternative bin label
87
90
  }
88
91
 
89
92
  export type NumericBin = StartUnboundedBin | FullyBoundedBin | StopUnboundedBin
90
93
 
94
+ export type RangeEntry = NumericBin | { value: number; label: string }
95
+
91
96
  export type RegularNumericBinConfig = MinBaseQ & {
92
97
  type: 'regular-bin' // another concrete value being assigned, instead of `string`
93
98
  //regular-sized bins
@@ -209,7 +214,7 @@ export type NumTWSpline = BaseTW & {
209
214
  q: SplineNumericQ
210
215
  }
211
216
 
212
- export type NumTWTypes = NumTWRegularBin | NumTWCustomBin | NumTWBinary | NumTWCont | NumTWSpline
217
+ export type NumTW = NumTWRegularBin | NumTWCustomBin | NumTWBinary | NumTWCont | NumTWSpline
213
218
  export type NumTWDiscreteTypes = NumTWRegularBin | NumTWCustomBin //| NumTWBinary
214
219
 
215
220
  export type DefaultMedianQ = {
package/src/terms/q.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { HiddenValues, GroupSettingQ, GroupEntry } from './term.ts'
1
+ import type { CategoricalBaseQ } from './categorical.js'
2
+ import type { Filter } from '../filter.js'
2
3
 
3
4
  // MinBaseQ is BaseQ without .mode and .type
4
5
  // MinBaseQ should eventually replace BaseQ because .mode and .type
@@ -36,3 +37,61 @@ export type RawCustomGroupsetQ = MinBaseQ & {
36
37
  /** deprecated nested object, will be handled by reshapeLegacyTW() in TwRouter */
37
38
  groupsetting?: { inuse?: boolean } & GroupSettingQ
38
39
  }
40
+
41
+ export type HiddenValues = {
42
+ [index: string]: number
43
+ }
44
+
45
+ /*** types supporting termwrapper q ***/
46
+
47
+ export type ValuesQ = CategoricalBaseQ & {
48
+ type: 'values'
49
+ }
50
+
51
+ export type PredefinedGroupSettingQ = CategoricalBaseQ & {
52
+ type: 'predefined-groupset'
53
+ predefined_groupset_idx: number
54
+ }
55
+
56
+ export type CustomGroupSettingQ = CategoricalBaseQ & {
57
+ type: 'custom-groupset'
58
+ customset: BaseGroupSet
59
+ }
60
+
61
+ export type FilterQ = MinBaseQ & {
62
+ type: 'filter'
63
+ }
64
+
65
+ export type GroupSettingQ = ValuesQ | FilterQ | PredefinedGroupSettingQ | CustomGroupSettingQ
66
+
67
+ export type ValuesGroup = {
68
+ name: string
69
+ type: 'values' | string // can remove boolean fallback once problematic js files are converted to .ts and can declare `type: 'values' as const`
70
+ values: { key: number | string; label: string }[]
71
+ uncomputable?: boolean // if true, do not include this group in computations
72
+ }
73
+
74
+ export type FilterGroup = {
75
+ name: string
76
+ type: 'filter'
77
+ filter: Filter
78
+ color: string
79
+ }
80
+
81
+ export type GroupEntry = ValuesGroup | FilterGroup
82
+
83
+ export type BaseGroupSet = {
84
+ groups: GroupEntry[]
85
+ }
86
+
87
+ type Groupset = {
88
+ name: string
89
+ is_grade?: boolean
90
+ is_subcondition?: boolean
91
+ dt?: number // dt of groupset, used by geneVariant term
92
+ } & BaseGroupSet
93
+
94
+ export type TermGroupSetting = {
95
+ disabled: boolean // true when term has <= 2 values, otherwise false
96
+ lst?: Groupset[] // array of predefined groupsets
97
+ }
@@ -1,4 +1,4 @@
1
- import type { BaseTerm, BaseQ } from './term.ts'
1
+ import type { BaseTerm, MinBaseQ } from '../index.ts'
2
2
  import type { TermWrapper } from './tw.ts'
3
3
  import type { TermSettingInstance } from '../termsetting.ts'
4
4
 
@@ -21,7 +21,7 @@ export type SampleLstTermValues = {
21
21
  }
22
22
  }
23
23
 
24
- export type SampleLstQ = BaseQ & {
24
+ export type SampleLstQ = MinBaseQ & {
25
25
  groups: SampleLstTermValues
26
26
  }
27
27
 
@@ -1,4 +1,4 @@
1
- import type { BaseTerm, BaseTW, GroupSettingQ, TermGroupSetting, TermValues } from './term.ts'
1
+ import type { BaseTerm, BaseTW, GroupSettingQ, TermGroupSetting, TermValues } from '../index.ts'
2
2
  import type { MinBaseQ } from './q.ts'
3
3
 
4
4
  type SingleCellCellTypeBaseQ = MinBaseQ & { mode: 'discrete' | 'binary' }
package/src/terms/snp.ts CHANGED
@@ -1,11 +1,11 @@
1
- import type { BaseTW, BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
1
+ import type { BaseTW, MinBaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from '../index.ts'
2
2
  import type { TermSettingInstance } from '../termsetting.ts'
3
3
 
4
4
  /*
5
5
  For term type 'snp'
6
6
  */
7
7
 
8
- export type SnpQ = BaseQ & GroupSettingQ
8
+ export type SnpQ = MinBaseQ & GroupSettingQ
9
9
 
10
10
  export type SnpTerm = BaseTerm & {
11
11
  chr: string
package/src/terms/snps.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { BaseTW, BaseQ, BaseTerm } from './term.ts'
1
+ import type { BaseTW, MinBaseQ, BaseTerm } from '../index.ts'
2
2
  import type { TermSettingInstance, InstanceDom, UseCase } from '../termsetting.ts'
3
3
  import type { VocabApi } from '../vocab.ts'
4
4
  import type { Tvs, Filter } from '../filter.ts'
@@ -19,7 +19,7 @@ type RestrictAncestry = {
19
19
  tvs: Tvs
20
20
  }
21
21
 
22
- export type SnpsQ = BaseQ & {
22
+ export type SnpsQ = MinBaseQ & {
23
23
  // termType: 'snplocus' | 'snplst'
24
24
  //for snplst and snplocus term types
25
25
  AFcutoff: number
@@ -1,4 +1,4 @@
1
- import type { NumericBaseTerm, NumericQ, PresetNumericBins, NumTWTypes } from './numeric.ts'
1
+ import type { NumericBaseTerm, NumericQ, PresetNumericBins, NumTW, RawNumTW } from './numeric.ts'
2
2
 
3
3
  /*
4
4
  duplicated from geneExpression.ts
@@ -17,4 +17,6 @@ export type SsGSEATerm = NumericBaseTerm & {
17
17
  unit?: string
18
18
  }
19
19
 
20
- export type SsGSEATW = NumTWTypes & { term: SsGSEATerm }
20
+ export type SsGSEATW = NumTW & { term: SsGSEATerm }
21
+
22
+ export type RawSsGSEATW = RawNumTW & { term: SsGSEATerm }
package/src/terms/term.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Filter } from '../filter.js'
2
- import type { CategoricalTerm, CategoricalBaseQ } from './categorical.js'
2
+ import type { CategoricalTerm } from './categorical.js'
3
3
  import type { ConditionTerm } from './condition.js'
4
4
  import type { NumericTerm } from './numeric.js'
5
5
  import type { GvTerm } from './geneVariant.js'
@@ -11,75 +11,6 @@ import type { SnpsTerm } from './snps.js'
11
11
  * @params $id client-computed deterministic unique identifier, to distinguish tw with the same term but different q, that are in the same payload
12
12
  */
13
13
 
14
- /*** types supporting termwrapper q ***/
15
-
16
- export type HiddenValues = {
17
- [index: string]: number
18
- }
19
-
20
- // TODO: replace BaseQ with MinBaseQ (see below)
21
- // keeping BaseQ for now to not break old code
22
- export type BaseQ = {
23
- /**Automatically set by fillTermWrapper()
24
- Applies to barchart, survival plot, and cuminc plot.
25
- Contains categories of a term to be hidden in its chart. This should only apply to client-side rendering, and should not be part of “dataName” when requesting data from server. Server will always provide a summary for all categories. It’s up to the client to show/hide categories.
26
- This allows the key visibility to be stored in state, while toggling visibility will not trigger data re-request.
27
- Currently termsetting menu does not manage this attribute. It’s managed by barchart legend.
28
- */
29
- hiddenValues?: HiddenValues
30
- /**indicates this object should not be extended by a copy-merge tool */
31
- isAtomic?: boolean
32
- name?: string
33
- mode?:
34
- | 'discrete'
35
- /** Binary is a special case of discrete. */
36
- | 'binary'
37
- | 'continuous'
38
- /** Only for numeric terms in regression analysis. Requires q.knots */
39
- | 'spline'
40
- /** Only applies to condition term. Requires q.breaks[] to have one grade value.*/
41
- | 'cuminc'
42
- /** Only applies to condition term for cox regression outcome. Requires q.breaks[] to have one grade value, for event and q.timeScale.*/
43
- | 'cox'
44
-
45
- reuseId?: string
46
- /** To define ways to divide up cohort based on a term, using methods specific to term types.*/
47
- type?: /** Requires term.values{} to access categories for categorical term, and grade for condition term */
48
- | 'values'
49
- /** Applies to numeric terms */
50
- | 'regular-bin'
51
- /** Applies to numeric terms */
52
- | 'custom-bin'
53
- /** Applies to categorical, condition, geneVariant, and singleCellCellType terms */
54
- | 'predefined-groupset'
55
- /** Applies to categorical, condition, geneVariant, and singleCellCellType terms */
56
- | 'custom-groupset'
57
- /** Applies to samplelst terms */
58
- | 'custom-samplelst'
59
- /** Applies to geneVariant term */
60
- | 'filter'
61
- }
62
-
63
- export type ValuesQ = CategoricalBaseQ & {
64
- type: 'values'
65
- }
66
-
67
- export type PredefinedGroupSettingQ = CategoricalBaseQ & {
68
- type: 'predefined-groupset'
69
- predefined_groupset_idx: number
70
- }
71
-
72
- export type CustomGroupSettingQ = CategoricalBaseQ & {
73
- type: 'custom-groupset'
74
- customset: BaseGroupSet
75
- }
76
-
77
- export type FilterQ = BaseQ & {
78
- type: 'filter'
79
- }
80
-
81
- export type GroupSettingQ = ValuesQ | FilterQ | PredefinedGroupSettingQ | CustomGroupSettingQ
82
-
83
14
  /*** types supporting termwrapper term ***/
84
15
 
85
16
  export type BaseValue = {
@@ -110,57 +41,9 @@ export type BaseTerm = {
110
41
  skipValuesBuild?: boolean
111
42
  }
112
43
 
44
+ // NumericTerm includes integer, float, date, geneExpression, metaboliteIntensity, and other non-dict terms
113
45
  export type Term = BaseTerm & (NumericTerm | CategoricalTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm)
114
46
 
115
- export type ValuesGroup = {
116
- name: string
117
- type: 'values' | string // can remove boolean fallback once problematic js files are converted to .ts and can declare `type: 'values' as const`
118
- values: { key: number | string; label: string }[]
119
- uncomputable?: boolean // if true, do not include this group in computations
120
- }
121
-
122
- export type FilterGroup = {
123
- name: string
124
- type: 'filter'
125
- filter: Filter
126
- color: string
127
- }
128
-
129
- export type GroupEntry = ValuesGroup | FilterGroup
130
-
131
- export type BaseGroupSet = {
132
- groups: GroupEntry[]
133
- }
134
-
135
- type Groupset = {
136
- name: string
137
- is_grade?: boolean
138
- is_subcondition?: boolean
139
- dt?: number // dt of groupset, used by geneVariant term
140
- } & BaseGroupSet
141
-
142
- export type TermGroupSetting = {
143
- disabled: boolean // true when term has <= 2 values, otherwise false
144
- lst?: Groupset[] // array of predefined groupsets
145
- }
146
-
147
- /*** types supporting termwrapper ***/
148
-
149
- export type BaseTW = {
150
- id?: string
151
- $id?: string
152
- isAtomic?: true
153
- // plot-specific customizations that are applied to a tw copy
154
- // todo: should rethink these
155
- legend?: any
156
- settings?: {
157
- [key: string]: any
158
- }
159
- sortSamples?: any
160
- minNumSamples?: number
161
- valueFilter?: any
162
- }
163
-
164
47
  /*** types supporting Term types ***/
165
48
 
166
49
  export type Subconditions = {
@@ -168,18 +51,3 @@ export type Subconditions = {
168
51
  label: string
169
52
  }
170
53
  }
171
-
172
- /*** other types ***/
173
-
174
- export type RangeEntry = {
175
- //Used binconfig.lst[] and in tvs.ranges[]
176
- start?: number
177
- startunbounded?: boolean
178
- startinclusive?: boolean
179
- stop?: number
180
- stopunbounded?: boolean
181
- stopinclusive?: boolean
182
- label?: string //for binconfig.lst[]
183
- value?: string //for tvs.ranges[]
184
- range?: any //No idea what this is
185
- }
package/src/terms/tw.ts CHANGED
@@ -3,10 +3,25 @@ import type { SnpQ, SnpTW } from './snp.ts'
3
3
  import type { ConditionQ, ConditionTW } from './condition.ts'
4
4
  import type { SampleLstQ } from './samplelst.ts'
5
5
  import type { CatTWTypes, CategoricalQ } from './categorical.ts'
6
- import type { NumTWTypes, NumericQ } from './numeric.ts'
6
+ import type { NumTW, NumericQ } from './numeric.ts'
7
7
  import type { GvTW, GvQ } from './geneVariant.ts'
8
8
 
9
- export type TermWrapper = CatTWTypes | NumTWTypes | GvTW | ConditionTW | SnpsTW | SnpTW
9
+ export type BaseTW = {
10
+ id?: string
11
+ $id?: string
12
+ isAtomic?: true
13
+ // plot-specific customizations that are applied to a tw copy
14
+ // todo: should rethink these
15
+ legend?: any
16
+ settings?: {
17
+ [key: string]: any
18
+ }
19
+ sortSamples?: any
20
+ minNumSamples?: number
21
+ valueFilter?: any
22
+ }
23
+
24
+ export type TermWrapper = CatTWTypes | NumTW | GvTW | ConditionTW | SnpsTW | SnpTW
10
25
 
11
26
  export type Q = CategoricalQ | NumericQ | GvQ | ConditionQ | SnpsQ | SnpQ | SampleLstQ // | other q
12
27
 
@@ -1,11 +0,0 @@
1
- import {
2
- sampleWsiAiApiPayload,
3
- validSampleWSIAiApiRequest,
4
- validSampleWSIAiApiResponse
5
- } from "./chunk-XJU4JALX.js";
6
- import "./chunk-CNSSF43V.js";
7
- export {
8
- sampleWsiAiApiPayload,
9
- validSampleWSIAiApiRequest,
10
- validSampleWSIAiApiResponse
11
- };
@@ -1,21 +0,0 @@
1
- import type { RoutePayload } from './routeApi.ts'
2
-
3
- export type SampleWSIAiApiRequest = {
4
- index: number
5
- confirmed: boolean
6
- class: number | null
7
- }
8
-
9
- export type SampleWSIAiApiResponse = {
10
- status: 'ok' | 'error'
11
- error?: string
12
- }
13
-
14
- export const sampleWsiAiApiPayload: RoutePayload = {
15
- request: {
16
- typeId: 'SampleWSIAiApiRequest'
17
- },
18
- response: {
19
- typeId: 'SampleWSIAiApiResponse'
20
- }
21
- }