@sjcrh/proteinpaint-types 2.142.0 → 2.144.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 (140) 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-SOM5WKDM.js → chunk-4DNCZQOB.js} +16 -4
  10. package/dist/{chunk-3BQ57P2P.js → chunk-4MLQS6N7.js} +16 -4
  11. package/dist/{chunk-MVMUZSLL.js → chunk-4VEXL32Q.js} +172 -118
  12. package/dist/{chunk-K5POIB3P.js → chunk-4ZMQ5CTL.js} +1 -1
  13. package/dist/{chunk-CEDL2QZT.js → chunk-5KADNZH2.js} +176 -122
  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-3L3ASC3B.js → chunk-6SOULHNE.js} +290 -154
  17. package/dist/{chunk-2VDOPTRV.js → chunk-74B7B2CV.js} +31 -7
  18. package/dist/{chunk-FVBXC7SY.js → chunk-7ICZFAGK.js} +33 -17
  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-SMVDKR2O.js → chunk-C246BWQE.js} +31 -7
  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-WMI4VKU3.js → chunk-D6IBJJ63.js} +210 -51
  26. package/dist/{chunk-ZVTZJRGS.js → chunk-D7AKQKDG.js} +1 -1
  27. package/dist/{chunk-YGX6BZZY.js → chunk-EIJT53QB.js} +1 -1
  28. package/dist/{chunk-VKBTOKI2.js → chunk-EOKM345J.js} +1 -1
  29. package/dist/{chunk-XEQWKMZN.js → chunk-EYKGJDKU.js} +1 -1
  30. package/dist/{chunk-EH7VAE5S.js → chunk-FMC4G5BP.js} +1 -1
  31. package/dist/{chunk-KRYTJ2SL.js → chunk-FTPYJPUB.js} +1 -1
  32. package/dist/{chunk-GDM7YUXH.js → chunk-FXXE4S7M.js} +172 -118
  33. package/dist/{chunk-IR4QSJI7.js → chunk-GCAZSDCW.js} +172 -118
  34. package/dist/{chunk-5S3UWYSK.js → chunk-GTS2G4R4.js} +1 -1
  35. package/dist/{chunk-KFVYRW7D.js → chunk-HQV2A7JV.js} +1 -1
  36. package/dist/{chunk-TMQI47YT.js → chunk-J2Y7RIN2.js} +29 -25
  37. package/dist/{chunk-HNETXFC7.js → chunk-K4FSDTDW.js} +1 -1
  38. package/dist/{chunk-HIPWQ6AW.js → chunk-KCMPDEH7.js} +1 -1
  39. package/dist/chunk-KVE2NBC6.js +132 -0
  40. package/dist/{chunk-QX3MRSSK.js → chunk-LRVF7U64.js} +1 -1
  41. package/dist/{chunk-5XCPOWFN.js → chunk-MHDQO7R5.js} +1 -1
  42. package/dist/{chunk-K4RV3N2T.js → chunk-MIOIOFBZ.js} +1 -1
  43. package/dist/{chunk-DMJFOII6.js → chunk-MMFL6N5M.js} +18 -6
  44. package/dist/{chunk-LDQNJLYQ.js → chunk-N7C4SRFX.js} +1 -1
  45. package/dist/chunk-NO2EZKW4.js +291 -0
  46. package/dist/{chunk-HKGWC7OO.js → chunk-P25WDNMD.js} +1 -1
  47. package/dist/{chunk-FYRWYZEE.js → chunk-PPPSDO6G.js} +36 -40
  48. package/dist/{chunk-KVUJPR42.js → chunk-PTE2I7DF.js} +1 -1
  49. package/dist/{chunk-AASWRJMS.js → chunk-Q3HGHP3J.js} +1 -1
  50. package/dist/{chunk-4R265LDJ.js → chunk-U3AOS5QJ.js} +16 -4
  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 +45 -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/numeric.ts +5 -0
  132. package/src/terms/q.ts +60 -1
  133. package/src/terms/samplelst.ts +2 -2
  134. package/src/terms/singleCellCellType.ts +1 -1
  135. package/src/terms/snp.ts +2 -2
  136. package/src/terms/snps.ts +2 -2
  137. package/src/terms/term.ts +2 -134
  138. package/src/terms/tw.ts +15 -0
  139. package/dist/sampleWsiAiApi.js +0 -11
  140. package/src/routes/sampleWsiAiApi.ts +0 -21
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
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
@@ -6,6 +6,21 @@ import type { CatTWTypes, CategoricalQ } from './categorical.ts'
6
6
  import type { NumTW, NumericQ } from './numeric.ts'
7
7
  import type { GvTW, GvQ } from './geneVariant.ts'
8
8
 
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
+
9
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
@@ -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
- }