@sjcrh/proteinpaint-types 2.189.0 → 2.190.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 (245) hide show
  1. package/README.md +8 -20
  2. package/dist/index.js +422 -553
  3. package/dist/index.js.map +7 -0
  4. package/package.json +13 -25
  5. package/dist/aiProjectAdmin.js +0 -11
  6. package/dist/aiProjectSelectedWSImages.js +0 -11
  7. package/dist/aiProjectTrainModel.js +0 -11
  8. package/dist/alphaGenome.js +0 -11
  9. package/dist/alphaGenomeTypes.js +0 -11
  10. package/dist/brainImaging.js +0 -11
  11. package/dist/brainImagingSamples.js +0 -11
  12. package/dist/burden.js +0 -11
  13. package/dist/chunk-2744ACBX.js +0 -126
  14. package/dist/chunk-2BCLGYAG.js +0 -96
  15. package/dist/chunk-2C4X5B6N.js +0 -62
  16. package/dist/chunk-2VJRTZE2.js +0 -287
  17. package/dist/chunk-2X36CBQF.js +0 -158
  18. package/dist/chunk-46YIGVUP.js +0 -908
  19. package/dist/chunk-4EAGOSMN.js +0 -128
  20. package/dist/chunk-5H2LJKPX.js +0 -104
  21. package/dist/chunk-5L4VF3ZL.js +0 -266
  22. package/dist/chunk-5N7V62ZL.js +0 -231
  23. package/dist/chunk-62XTWOVJ.js +0 -273
  24. package/dist/chunk-6GKG55BT.js +0 -232
  25. package/dist/chunk-7MUISZHS.js +0 -61
  26. package/dist/chunk-7OA6G77M.js +0 -113
  27. package/dist/chunk-BCBSHTHS.js +0 -75
  28. package/dist/chunk-CQXBQY2H.js +0 -161
  29. package/dist/chunk-CWACV4MW.js +0 -305
  30. package/dist/chunk-D7AKQKDG.js +0 -238
  31. package/dist/chunk-DDKGTDDB.js +0 -6739
  32. package/dist/chunk-DI4Q26E7.js +0 -16
  33. package/dist/chunk-EIJT53QB.js +0 -240
  34. package/dist/chunk-EOKM345J.js +0 -222
  35. package/dist/chunk-FK7OCBPT.js +0 -341
  36. package/dist/chunk-FMC4G5BP.js +0 -62
  37. package/dist/chunk-GCJESMM2.js +0 -354
  38. package/dist/chunk-GTS2G4R4.js +0 -62
  39. package/dist/chunk-HD3J5BKM.js +0 -409
  40. package/dist/chunk-HQV2A7JV.js +0 -62
  41. package/dist/chunk-IS74WYQF.js +0 -207
  42. package/dist/chunk-JEQGBUK2.js +0 -5993
  43. package/dist/chunk-K4FSDTDW.js +0 -109
  44. package/dist/chunk-KCMPDEH7.js +0 -62
  45. package/dist/chunk-KXYFG2HO.js +0 -307
  46. package/dist/chunk-LC6KLHCJ.js +0 -8903
  47. package/dist/chunk-LQYSPLDQ.js +0 -3613
  48. package/dist/chunk-LRVF7U64.js +0 -62
  49. package/dist/chunk-MHDQO7R5.js +0 -195
  50. package/dist/chunk-MKYLCBTP.js +0 -5475
  51. package/dist/chunk-MNT3GF7M.js +0 -3628
  52. package/dist/chunk-MVB7LQS5.js +0 -3986
  53. package/dist/chunk-P25WDNMD.js +0 -171
  54. package/dist/chunk-P3WBZJFF.js +0 -158
  55. package/dist/chunk-PTE2I7DF.js +0 -91
  56. package/dist/chunk-Q3HGHP3J.js +0 -174
  57. package/dist/chunk-RPX4TVMD.js +0 -14
  58. package/dist/chunk-RXJNXOZC.js +0 -326
  59. package/dist/chunk-SDZIGJY3.js +0 -5931
  60. package/dist/chunk-SLXGWQZ4.js +0 -458
  61. package/dist/chunk-SZZXZZKO.js +0 -3991
  62. package/dist/chunk-TD4YLTHL.js +0 -158
  63. package/dist/chunk-TEXOICIS.js +0 -11810
  64. package/dist/chunk-THQOFV2K.js +0 -205
  65. package/dist/chunk-TLZ5ROOU.js +0 -347
  66. package/dist/chunk-TQQWSHFM.js +0 -5980
  67. package/dist/chunk-U3BTVE5T.js +0 -111
  68. package/dist/chunk-UBOVHONH.js +0 -62
  69. package/dist/chunk-UDTEGP3G.js +0 -365
  70. package/dist/chunk-UYJA4UM7.js +0 -97
  71. package/dist/chunk-V3JDD3ZG.js +0 -3671
  72. package/dist/chunk-VUKRI3TG.js +0 -164
  73. package/dist/chunk-W3F3CLYP.js +0 -61
  74. package/dist/chunk-X4JBWMXY.js +0 -130
  75. package/dist/chunk-X5E72ZXA.js +0 -5979
  76. package/dist/chunk-YNHC5SXO.js +0 -1780
  77. package/dist/chunk-YPEFUAJW.js +0 -62
  78. package/dist/chunk-YSTMGNYR.js +0 -113
  79. package/dist/chunk-Z3IYM5OK.js +0 -296
  80. package/dist/chunk-ZCV62ELK.js +0 -96
  81. package/dist/chunk-ZIOJDN75.js +0 -197
  82. package/dist/chunk-ZMDZYG5B.js +0 -4224
  83. package/dist/clearwsisession.js +0 -78
  84. package/dist/clearwsisessions.js +0 -13
  85. package/dist/correlationVolcano.js +0 -11
  86. package/dist/dataset.js +0 -11
  87. package/dist/deleteWSITileSelection.js +0 -11
  88. package/dist/dsdata.js +0 -11
  89. package/dist/dzimages.js +0 -11
  90. package/dist/gdc.grin2.js +0 -17
  91. package/dist/gdc.maf.js +0 -11
  92. package/dist/gdc.mafBuild.js +0 -11
  93. package/dist/genelookup.js +0 -11
  94. package/dist/genesetEnrichment.js +0 -11
  95. package/dist/genesetOverrepresentation.js +0 -11
  96. package/dist/grin2.js +0 -11
  97. package/dist/healthcheck.js +0 -11
  98. package/dist/hicdata.js +0 -11
  99. package/dist/hicgenome.js +0 -11
  100. package/dist/hicstat.js +0 -11
  101. package/dist/img.js +0 -11
  102. package/dist/isoformlst.js +0 -11
  103. package/dist/ntseq.js +0 -11
  104. package/dist/pdomain.js +0 -11
  105. package/dist/samplewsimages.js +0 -13
  106. package/dist/saveWSIAnnotation.js +0 -11
  107. package/dist/snp.js +0 -11
  108. package/dist/termdb.DE.js +0 -11
  109. package/dist/termdb.categories.js +0 -11
  110. package/dist/termdb.chat.js +0 -3631
  111. package/dist/termdb.chat2.js +0 -15
  112. package/dist/termdb.cluster.js +0 -11
  113. package/dist/termdb.cohort.summary.js +0 -11
  114. package/dist/termdb.cohorts.js +0 -11
  115. package/dist/termdb.dapVolcano.js +0 -11
  116. package/dist/termdb.descrstats.js +0 -11
  117. package/dist/termdb.diffMeth.js +0 -11
  118. package/dist/termdb.dmr.js +0 -11
  119. package/dist/termdb.filterTermValues.js +0 -11
  120. package/dist/termdb.isoformAvailability.js +0 -11
  121. package/dist/termdb.numericcategories.js +0 -11
  122. package/dist/termdb.percentile.js +0 -11
  123. package/dist/termdb.profileFormScores.js +0 -11
  124. package/dist/termdb.profileForms2Scores.js +0 -11
  125. package/dist/termdb.profileScores.js +0 -11
  126. package/dist/termdb.proteome.js +0 -11
  127. package/dist/termdb.rootterm.js +0 -11
  128. package/dist/termdb.runChart.js +0 -13
  129. package/dist/termdb.sampleImages.js +0 -11
  130. package/dist/termdb.sampleScatter.js +0 -11
  131. package/dist/termdb.singleSampleMutation.js +0 -11
  132. package/dist/termdb.singlecellDEgenes.js +0 -11
  133. package/dist/termdb.singlecellData.js +0 -11
  134. package/dist/termdb.singlecellSamples.js +0 -11
  135. package/dist/termdb.termchildren.js +0 -11
  136. package/dist/termdb.termsbyids.js +0 -11
  137. package/dist/termdb.topMutatedGenes.js +0 -11
  138. package/dist/termdb.topTermsByType.js +0 -11
  139. package/dist/termdb.topVariablyExpressedGenes.js +0 -11
  140. package/dist/termdb.violinBox.js +0 -17
  141. package/dist/tileserver.js +0 -11
  142. package/dist/wsimages.js +0 -11
  143. package/dist/wsisamples.js +0 -11
  144. package/src/Mclass.ts +0 -8
  145. package/src/dataset.ts +0 -2188
  146. package/src/docs.json +0 -16417
  147. package/src/fileOrUrl.ts +0 -15
  148. package/src/filter.ts +0 -110
  149. package/src/genome.ts +0 -129
  150. package/src/index.ts +0 -94
  151. package/src/routes/aiProjectAdmin.ts +0 -37
  152. package/src/routes/aiProjectSelectedWSImages.ts +0 -47
  153. package/src/routes/aiProjectTrainModel.ts +0 -20
  154. package/src/routes/alphaGenome.ts +0 -27
  155. package/src/routes/alphaGenomeTypes.ts +0 -21
  156. package/src/routes/brainImaging.ts +0 -47
  157. package/src/routes/brainImagingSamples.ts +0 -25
  158. package/src/routes/burden.ts +0 -113
  159. package/src/routes/clearwsisessions.ts +0 -19
  160. package/src/routes/correlationVolcano.ts +0 -51
  161. package/src/routes/dataset.ts +0 -14
  162. package/src/routes/deleteWSITileSelection.ts +0 -25
  163. package/src/routes/dsdata.ts +0 -14
  164. package/src/routes/dzimages.ts +0 -25
  165. package/src/routes/errorResponse.ts +0 -6
  166. package/src/routes/filter.gdc.ts +0 -15
  167. package/src/routes/gdc.grin2.ts +0 -246
  168. package/src/routes/gdc.maf.ts +0 -52
  169. package/src/routes/gdc.mafBuild.ts +0 -20
  170. package/src/routes/genelookup.ts +0 -22
  171. package/src/routes/genesetEnrichment.ts +0 -116
  172. package/src/routes/genesetOverrepresentation.ts +0 -48
  173. package/src/routes/grin2.ts +0 -173
  174. package/src/routes/healthcheck.ts +0 -80
  175. package/src/routes/hicdata.ts +0 -48
  176. package/src/routes/hicgenome.ts +0 -50
  177. package/src/routes/hicstat.ts +0 -57
  178. package/src/routes/img.ts +0 -23
  179. package/src/routes/isoformlst.ts +0 -14
  180. package/src/routes/ntseq.ts +0 -14
  181. package/src/routes/pdomain.ts +0 -14
  182. package/src/routes/routeApi.ts +0 -47
  183. package/src/routes/samplewsimages.ts +0 -44
  184. package/src/routes/saveWSIAnnotation.ts +0 -25
  185. package/src/routes/snp.ts +0 -13
  186. package/src/routes/termdb.DE.ts +0 -226
  187. package/src/routes/termdb.categories.ts +0 -74
  188. package/src/routes/termdb.chat2.ts +0 -190
  189. package/src/routes/termdb.cluster.ts +0 -134
  190. package/src/routes/termdb.cohort.summary.ts +0 -14
  191. package/src/routes/termdb.cohorts.ts +0 -14
  192. package/src/routes/termdb.dapVolcano.ts +0 -35
  193. package/src/routes/termdb.descrstats.ts +0 -75
  194. package/src/routes/termdb.diffMeth.ts +0 -63
  195. package/src/routes/termdb.dmr.ts +0 -121
  196. package/src/routes/termdb.filterTermValues.ts +0 -23
  197. package/src/routes/termdb.isoformAvailability.ts +0 -22
  198. package/src/routes/termdb.numericcategories.ts +0 -32
  199. package/src/routes/termdb.percentile.ts +0 -67
  200. package/src/routes/termdb.profileFormScores.ts +0 -26
  201. package/src/routes/termdb.profileForms2Scores.ts +0 -25
  202. package/src/routes/termdb.profileScores.ts +0 -27
  203. package/src/routes/termdb.proteome.ts +0 -13
  204. package/src/routes/termdb.rootterm.ts +0 -49
  205. package/src/routes/termdb.runChart.ts +0 -66
  206. package/src/routes/termdb.sampleImages.ts +0 -26
  207. package/src/routes/termdb.sampleScatter.ts +0 -60
  208. package/src/routes/termdb.singleSampleMutation.ts +0 -51
  209. package/src/routes/termdb.singlecellDEgenes.ts +0 -50
  210. package/src/routes/termdb.singlecellData.ts +0 -75
  211. package/src/routes/termdb.singlecellSamples.ts +0 -50
  212. package/src/routes/termdb.termchildren.ts +0 -49
  213. package/src/routes/termdb.termsbyids.ts +0 -26
  214. package/src/routes/termdb.topMutatedGenes.ts +0 -51
  215. package/src/routes/termdb.topTermsByType.ts +0 -32
  216. package/src/routes/termdb.topVariablyExpressedGenes.ts +0 -54
  217. package/src/routes/termdb.violinBox.ts +0 -230
  218. package/src/routes/tileserver.ts +0 -14
  219. package/src/routes/wsimages.ts +0 -34
  220. package/src/routes/wsisamples.ts +0 -25
  221. package/src/termdb.matrix.ts +0 -57
  222. package/src/terms/categorical.ts +0 -18
  223. package/src/terms/condition.ts +0 -73
  224. package/src/terms/date.ts +0 -20
  225. package/src/terms/dnaMethylation.ts +0 -28
  226. package/src/terms/geneExpression.ts +0 -38
  227. package/src/terms/geneVariant.ts +0 -132
  228. package/src/terms/isoformExpression.ts +0 -36
  229. package/src/terms/metaboliteIntensity.ts +0 -30
  230. package/src/terms/numeric.ts +0 -278
  231. package/src/terms/proteomeAbundance.ts +0 -38
  232. package/src/terms/q.ts +0 -105
  233. package/src/terms/qualitative.ts +0 -73
  234. package/src/terms/samplelst.ts +0 -34
  235. package/src/terms/singleCellCellType.ts +0 -18
  236. package/src/terms/singleCellGeneExpression.ts +0 -32
  237. package/src/terms/snp.ts +0 -24
  238. package/src/terms/snps.ts +0 -111
  239. package/src/terms/ssGSEA.ts +0 -26
  240. package/src/terms/term.ts +0 -60
  241. package/src/terms/termCollection.ts +0 -139
  242. package/src/terms/tw.ts +0 -64
  243. package/src/termsetting.ts +0 -201
  244. package/src/test/numeric.type.spec.ts +0 -275
  245. package/src/vocab.ts +0 -37
package/src/dataset.ts DELETED
@@ -1,2188 +0,0 @@
1
- import type { Mclass } from './Mclass.ts'
2
- import type { BaseTerm } from './terms/term.ts'
3
- import type { CategoryKey } from './terms/termCollection.ts'
4
- import type { WSImage } from './routes/samplewsimages.ts'
5
- import type { WSISample } from './routes/wsisamples.ts'
6
- import type { SaveWSIAnnotationRequest } from './routes/saveWSIAnnotation.ts'
7
- import type { DeleteWSITileSelectionRequest } from './routes/deleteWSITileSelection.ts'
8
- import type { Prediction } from './routes/aiProjectSelectedWSImages.ts'
9
-
10
- /*** General usage types ***/
11
- type FileObj = {
12
- file: string
13
- }
14
-
15
- type KeyVal = {
16
- k: string
17
- v?: string
18
- }
19
-
20
- /** a set of categories about a vcf INFO field */
21
- export type InfoFieldCategories = {
22
- /** category key from an INFO field of a vcf file */
23
- [index: string]: {
24
- /** Color used for rendering labels and backgrounds in the legend, tables, etc. */
25
- color: string
26
- /** Human readable label */
27
- label?: string
28
- /** Shown in the legend on label click */
29
- desc: string
30
- /** When .color is used as the background, denoted whether
31
- * to use 'white', 'black', or other color for the text */
32
- textcolor?: string
33
- }
34
- }
35
-
36
- type NumericFilterEntry = {
37
- /** '<' or '>' for filtering */
38
- side: string
39
- /** value for filtering */
40
- value: number
41
- }
42
-
43
- type AFEntry = {
44
- /** human readable label */
45
- name: string
46
- /** */
47
- locusinfo: {
48
- /** usually the data dictionary value (e.g. AF_EXAC for ExAC frequency) */
49
- key: string
50
- }
51
- /** key/values for filtering */
52
- numericfilter: NumericFilterEntry[]
53
- }
54
-
55
- /** Specific allele freq info for ClinVar */
56
- export type ClinvarAF = {
57
- [index: string]: AFEntry
58
- }
59
-
60
- /*** types supporting Queries type ***/
61
-
62
- type InfoFieldEntry = {
63
- /** Human readable name to display */
64
- name: string
65
- /** vcf INFO field */
66
- key: string
67
- /** a set of categories about a vcf INFO field */
68
- categories?: InfoFieldCategories
69
- /** seperator (e.g. '&', '|' ) between join values */
70
- separator?: string
71
- }
72
-
73
- /*
74
- type GenomicPositionEntry = {
75
- chr: string
76
- start: number
77
- stop: number
78
- }
79
- */
80
-
81
- type bcfMafFile = {
82
- /** bcf file for only variants, no samples and FORMAT */
83
- bcffile: string
84
- /** maf file for sample mutations. bcf header contents with FORMAT and list of samples are
85
- * copied into this maf as headers followed by the maf header starting with #chr, pos, ref,
86
- * alt and sample. Each column after sample corresponds to the information in FORMAT. file
87
- * is bgzipped and tabix indexed (tabix -c"#" -s 1 -b 2 -e 2 <maf.gz>) */
88
- maffile: string
89
- }
90
-
91
- type SnvindelByIsoform = {
92
- /** if true, served from gdc. no other parameters */
93
- gdcapi?: true
94
- /** getter function to retrieve data. dynamically added or ds-supplied
95
- first argument is required and allow for 2 additional ones
96
- */
97
- get?: (f: any, f2?: any, f3?: any) => void
98
- /** if true, all tw from one client query must be processed via one call to snvindel.byisoform.get()
99
- and no longer processes each tw by calling mayGetGeneVariantData()
100
- */
101
- processTwsInOneQuery?: true
102
- }
103
-
104
- type SnvindelByRange = {
105
- /** if true, served from gdc. no other parameters */
106
- gdcapi?: true
107
- //local ds can have following different setup
108
- /** one single bcf file */
109
- bcffile?: string
110
- /** one bcf file per chr
111
- after loading, this is transformed into byrange._tk.chr2files{}, and deleted!
112
- */
113
- chr2bcffile?: {
114
- /** index is the chr (e.g. 'chr1', 'chr2', etc.)
115
- * value is the bcf file path */
116
- [index: string]: string
117
- }
118
- /** bcf+maf combined */
119
- bcfMafFile?: bcfMafFile
120
- /** allow to apply special configurations to certain INFO fields of the bcf file */
121
- infoFields?: InfoFieldEntry[]
122
- /** getter function to retrieve data. dynamically added or ds-supplied */
123
- get?: (f: any, f2?: any) => void
124
- }
125
-
126
- type URLEntry = {
127
- /** base URL, including the host and possibly other queries */
128
- base?: string
129
- key?: string
130
- namekey?: string
131
- label?: string
132
- url?: string
133
- }
134
-
135
- type SkewerRim = {
136
- /** only enabled for 'format' */
137
- type: string
138
- /** 'origin' */
139
- formatKey: string
140
- /** 'somatic' or 'germline', generally germline */
141
- rim1value: string
142
- /** 'somatic' or 'germline', generally somatic */
143
- noRimValue: string
144
- }
145
-
146
- type GdcApi = {
147
- /** Represents the configuration for accessing the GDC API. */
148
- gdcapi?: boolean
149
- }
150
-
151
- type AiApi = {
152
- /** Represents the configuration for accessing the AI API.
153
- * For now only AI Histo is supported.
154
- */
155
- aiApi?: boolean
156
- source?: {
157
- /** Data source for building the termdb on the fly */
158
- file: string
159
- /** Column header for sample ids or names */
160
- sampleKey: string
161
- }
162
- }
163
-
164
- /** configuration for api-based dictionary
165
- NOTE: currently used by mmrf, but may also be used
166
- by other api-based datasets (e.g. gdc) */
167
- type DictApi = {
168
- // builds dictionary and sets standard
169
- // helpers at ds.cohort.termdb.q{}
170
- build?: (ds: any) => void
171
- // gets dictionary term data
172
- get?: (q: any, twLst: any, onlyChildren?: boolean, useCache?: boolean) => void
173
- }
174
-
175
- type SnvIndelFormat = {
176
- [index: string]: {
177
- /* has value for a non-GT field indicating the variant
178
- is annotated to this sample*/
179
- ID: string
180
- Description: string
181
- /** 'R' or 1. do not parse values here based on Number="R"
182
- as we don't need to compute on the format values on backend
183
- client will parse the values for display */
184
- Number: string | number
185
- Type: string
186
- }
187
- }
188
-
189
- type FilterValues = {
190
- [index: string | number]: {
191
- key?: string | number
192
- label: string
193
- }
194
- }
195
-
196
- type RangesEntry = {
197
- start: number
198
- startinclusive: boolean
199
- stopunbounded: boolean
200
- }
201
-
202
- type BaseTvsFilter = {
203
- isnot?: boolean
204
- ranges?: RangesEntry[]
205
- }
206
-
207
- type TvsFilter = BaseTvsFilter & {
208
- values?: (string | number | { label: string })[]
209
- }
210
-
211
- export type FilterTermEntry = BaseTvsFilter & {
212
- id: string
213
- name: string
214
- type: string
215
- parent_id: string | null
216
- isleaf: boolean
217
- values?: FilterValues
218
- tvs?: TvsFilter
219
- min?: number
220
- max?: number
221
- }
222
-
223
- type FilterLstTvs = BaseTvsFilter & {
224
- term: FilterTermEntry
225
- values: (string | number | FilterValues)[]
226
- }
227
-
228
- type FilterLstEntry = {
229
- type: string
230
- tvs: FilterLstTvs
231
- }
232
-
233
- type Filter = {
234
- type: string
235
- join: string
236
- in: boolean
237
- lst?: FilterLstEntry[]
238
- }
239
-
240
- type VariantFilter = {
241
- opts: { joinWith: string[] }
242
- filter?: Filter
243
- terms: FilterTermEntry[]
244
- }
245
-
246
- /** one set of AC and AN info fields to retrieve data for this population */
247
- type PopulationINFOset = {
248
- /** optional term id for retrieving admix coefficient for an ancestry corresponding to this "PopulationINFOset" entry
249
- for every sample carrying a variant.
250
- this is required when sets[].length>1
251
- this should not be set when sets[].length=1 */
252
- key?: string
253
- /** required info field */
254
- infokey_AC: string
255
- /** required info field */
256
- infokey_AN: string
257
- }
258
-
259
- /* define method to retrieve allele AC/AN in a population, by using bcf INFO fields; population could be ancestry-stratified
260
- two types of population are supported:
261
- - ancestry-stratified
262
- allowto_adjust_race can be set to true
263
- sets[] has >1 elements
264
- - not stratified
265
- allowto_adjust_race cannot be set to true
266
- sets[] has only 1 element
267
- */
268
- type Population = {
269
- /** for identifying this element */
270
- key: string
271
- /** display, in fact it can replace key since label should also be unique*/
272
- label: string
273
- /** allow to set to true for race-stratified population, will adjust population AC/AN values based on admix coefficient for the dataset's cohort variants
274
- * supposed to be "read-only" attribute and not modifiable in runtime */
275
- allowto_adjust_race?: boolean
276
- /** when above is true, this flag is flip switch for this adjustion */
277
- adjust_race?: boolean
278
- /** if AC/AN of the population is ancestry-stratified, will be multiple elements of this array; otherwise just one */
279
- sets: PopulationINFOset[]
280
- }
281
-
282
- /** primarily for prebuilding germline genetic association for survivorship portal
283
- part of state of genomeBrowser plot
284
- allowing for user modification
285
- */
286
- type SnvindelComputeDetails = {
287
- /** in each element, type corresponds to same key in groups[]
288
- used for rendering choices in group data types; but content is read-only and should not be part of state
289
- */
290
- groupTypes: {
291
- type: string
292
- name: string
293
- }[]
294
- /** a type of computing decides numeric values for each variant displayed in tk
295
- computing type is also determined by number of groups
296
- if only 1 group:
297
- type=info: use numeric info field
298
- type=filter: use AF
299
- type=population: use AF
300
- if there're two groups:
301
- both types are "filter": allow AF diff or fisher
302
- "filter" and "population": allow AF diff or fisher
303
- else: value difference
304
- */
305
- groups: (SnvindelComputeGroup_filter | SnvindelComputeGroup_population | SnvindelComputeGroup_info)[]
306
- /** define lists of group-comparison methods to compute one numerical value per variant
307
- */
308
- groupTestMethods: {
309
- /** method name. used both for display and identifier. cannot supply hardcoded values here as breaks tsc */
310
- name: string
311
- /** optional custom text to put on mds3 tk y axis */
312
- axisLabel?: string
313
- }[]
314
- /** array index of groupTestMethods[] */
315
- groupTestMethodsIdx: number
316
- }
317
- /** supplies a pp filter (or filter by cohort) to restrict to a subset of samples from which to compute AF for each variant.
318
- the filter will be user-modifiable
319
- */
320
- type SnvindelComputeGroup_filter = {
321
- // FIXME type value can only be 'filter' but breaks tsc
322
- type: string //'filter'
323
- /** a given filter applied to all cohorts */
324
- //filter?: object
325
- /** filter per cohort. use either filter or filterByCohort */
326
- filterByCohort?: { [key: string]: object }
327
- }
328
- /** a choice from snvindel.populations[]
329
- */
330
- type SnvindelComputeGroup_population = {
331
- type: string //'population'
332
- /** used to identify corresponding population element */
333
- key: string
334
- /** redundant, should be copied over from snvindel.populations[] */
335
- label: string
336
- /** if true, can adjust race. may copy over instead of duplicating? */
337
- allowto_adjust_race: boolean
338
- /** if true, race adjustion is being applied */
339
- adjust_race: boolean
340
- }
341
- type SnvindelComputeGroup_info = {
342
- type: string //'info'
343
- /** numerical INFO field name from bcf, allows to retrieve numeric values for each variant in tk */
344
- infoKey: string
345
- }
346
-
347
- /** a data type under ds.queries{} */
348
- type SnvIndelQuery = {
349
- forTrack?: boolean
350
- /** allow to query data by either isoform or range; either or both can be used; cannot be both missing */
351
- byisoform?: SnvindelByIsoform
352
- /** query data by range */
353
- byrange?: SnvindelByRange
354
-
355
- infoUrl?: URLEntry[]
356
- skewerRim?: SkewerRim
357
- format4filters?: string[]
358
- format?: SnvIndelFormat
359
- variant_filter?: VariantFilter
360
- mafFilter?: VariantFilter
361
- populations?: Population[]
362
- /** NOTE **
363
- this definition can appear either in queries.snvindel{} or termdb{}
364
- so that it can work for a termdb-less ds, e.g. clinvar, where termdbConfig cannot be made */
365
- ssmUrl?: UrlTemplateSsm
366
- m2csq?: {
367
- gdcapi?: boolean
368
- by: string
369
- }
370
- allowSNPs?: boolean
371
- vcfid4skewerName?: boolean
372
- /** config on computing variant data and show as a custom mds3 tk */
373
- details?: SnvindelComputeDetails
374
- /** set to true to show mds3 tk by default when the ds have other genome browser track types besides this snvindel tk
375
- if ds has only snvindel tk, then the tk will always be shown and no need to set this
376
- */
377
- shown?: boolean
378
- }
379
-
380
- type SvFusion = {
381
- byrange?: {
382
- /** gz BED file path for sv fusion data: chr \t start \t stop \t {}
383
- will only contain events with coordinates in both breakpoints
384
- TODO use string sample name
385
- */
386
- file?: string
387
- }
388
- byname?: {
389
- /** file paths for sv fusion TXT data. will contain events lacking breakpoint coordinates and can only be matched by gene names
390
- should be tab seperated values with the following fields: (should leave as blank for values unknown)
391
- gene_a refseq_a chr_a position_a strand_a gene_b refseq_b chr_b position_b strand_b origin sample_name fusion_gene event_type(fusion or sv)
392
- TODO use string sample name
393
- */
394
- file?: string
395
- }
396
- /** list of dt values to indicate if this ds has sv, fusion, or both */
397
- dtLst: number[]
398
- }
399
-
400
- type SingleSampleMutationQuery = {
401
- /** ds supplied getter
402
- returns same json array as native. see example below
403
- */
404
- get?: (f: any) => void
405
- /** which property of client mutation object to retrieve sample identifier for querying single sample data with */
406
- sample_id_key: string
407
- /** disco plot will be launched when singleSampleMutation is enabled. supply customization options here */
408
- discoPlot?: {
409
- /** if true, disco plot will hide chrM, due to reason e.g. this dataset doesn't have data on chrM */
410
- skipChrM?: true
411
- /** if true, filter mutations by predefined geneset by default */
412
- prioritizeGeneLabelsByGeneSets?: true
413
- }
414
- /** rest of properties are required for native ds without ds-supplied getter
415
- TODO migrate gdc to get() and delete .src=native
416
- */
417
- src?: 'native' | 'gdcapi' | string
418
- /** only required for src=native
419
- folder contains a set of files, one file per sample, file named by sample name
420
- each file contains a stringified json array of mutation/cnv/sv entries (aka mlst). see example
421
- https://github.com/stjude/proteinpaint/blob/master/server/test/tp/files/hg38/TermdbTest/mutationpersample/3318
422
- */
423
- folder?: string
424
- }
425
-
426
- type NIdataQuery = {
427
- /** Reference obj for NI data query. */
428
- Ref1: NIdataQueryRef
429
- }
430
-
431
- type NIdataQueryRef = {
432
- /** file path for the reference file */
433
- referenceFile: string
434
- /** file path for the sample file */
435
- samples: string
436
- /** Parameters for slice indices in the mass brain imaging plot */
437
- parameters?: NIdataQueryRefParams
438
- /** optional terms to show as table columns and annotate samples */
439
- sampleColumns?: { termid: string }[]
440
- }
441
-
442
- type NIdataQueryRefParams = {
443
- /** index of slice for default sagittal plane */
444
- l: number
445
- /** index of slice for default coronal plane */
446
- f: number
447
- /** index of slice for default axial plane */
448
- t: number
449
- }
450
-
451
- /** used for the gene set edit ui */
452
- export type GeneArgumentEntry = {
453
- /** Dom element id
454
- * Use the cooresponding parameter name as the id
455
- */
456
- id: string
457
- /** label/prompt for the checkbox, input, etc. */
458
- label: string
459
- /** Optional: Creates subtext below the main label */
460
- sublabel?: string
461
- /** 'boolean' has two options.
462
- * - If .options[] is provided, it creates a 'submenu', a checkbox
463
- * that expands to show additional inputs when checked. .options[]
464
- * in this case is GeneArgumentEntry[]
465
- * - If !.options[] is provided, it creates a checkbox
466
- * 'string' creates a checked checkbox if a .value is provided
467
- * 'number' creates a text number input
468
- * 'radio' creates a radio buttons, see options[] */
469
- type: 'boolean' | 'string' | 'number' | 'radio'
470
- /** value of the input or checkbox
471
- * required if type is string. Otherwise, optional
472
- */
473
- value?:
474
- | string
475
- | boolean
476
- | number
477
- | {
478
- type: string
479
- value: string[] | null
480
- }
481
- options?: {
482
- /** Type of dom element to render underneath the radio
483
- * 'text': creates a text area input
484
- * 'tree': launches termdb app and the tree
485
- * 'boolean': No element is created
486
- *
487
- * boolean is the default type
488
- */
489
- type: 'text' | 'tree' | 'boolean' | string
490
- /** value used to construct the server argument
491
- * also the element id in the gene set edit ui
492
- */
493
- value: number | string
494
- /** radio label */
495
- label: string
496
- /** Optional: smaller text that appears underneath the label */
497
- sublabel?: string
498
- }[]
499
- }
500
-
501
- type TopVariablyExpressedGenesQuery = {
502
- /** ds supplied getter. if not, dynamically adds one during launch */
503
- getGenes?: (f: any) => void
504
- /** Specifies the dom element rendered in the menu */
505
- arguments?: GeneArgumentEntry[]
506
- }
507
-
508
- type TopMutatedGenes = {
509
- /** ds supplied getter. if not, dynamically adds one during launch */
510
- get?: (f: any) => void
511
- /** Specifies the dom element rendered in the menu */
512
- arguments?: GeneArgumentEntry[]
513
- }
514
-
515
- /** setup for a set of genome browser tracks and/or facet tables, that can be selected for genomebrowser display
516
- */
517
- type TrackLst = {
518
- /** path to legacy json file containing a long array of 1 or more facets
519
-
520
- [
521
- {
522
- "isfacet": true,
523
- "name": "PEDDEP Prepilot",
524
- "tracks": [
525
- {
526
- name:str // required. used as *identifer* for a track
527
- sample:str // required. should match with a sample in db!
528
- assay:str // required. free string not controlled in dictionary yet. if missing the track won't appear in facet table
529
- type:str // properties inherent for each custom track
530
- file:str
531
- },
532
- ... more tk
533
- ]
534
- },
535
- { ... 2nd facet table }
536
- ]
537
-
538
- */
539
- jsonFile: string
540
-
541
- /*
542
- alternative format that's easier to maintain than a giant json file
543
- facetFiles:[
544
- {
545
- // name of this facet table
546
- name: str
547
- // a tabular file with columns "tkname/assay/sample/path/json"; last column json provides any customization for a track
548
- // e.g. "Track 1 \t h3k4me3 \t sample1 \t path/to/file.bw \t {"scale":{..}}"
549
- tabFile: string
550
- }
551
- ]
552
- */
553
-
554
- /** list of track names to show by default, should be found in json file
555
- in json content above, allow a name to be shared by multiple tracks!
556
- in such case, all tracks identified by given name will show/hide altogether
557
- */
558
- activeTracks: string[]
559
- }
560
-
561
- /** cnv segments are queried by coordinates, and can be filtered by segment length and/or value
562
- configs for types of cnv data
563
-
564
- - log(ratio)
565
- {
566
- cnvMaxLength:10000000
567
- cnvGainCutoff:5
568
- cnvLossCutoff:-5
569
- }
570
- - copy number
571
- {
572
- cnvMaxLength:1000000
573
- cnvMaxCopynumber:10
574
- cnvMinCopynumber:1
575
- }
576
- - qualitative categories
577
- {
578
- cnvMaxLength?:? // abscent if ds doesn't allow filtering by max length (e.g. segments are actually gene bodies)
579
- //cnvCategories:['CNV_amp', 'CNV_loss'] // "CNV_amplification" and "CNV_homozygous_deletion" are optional depending on ds
580
- }
581
- may not need to declare cnvCategories[];
582
- cnv edit ui rendering can be entirely based on actual server-returned gene cnv data
583
- e.g. if CNV_amplification is present from getCategories() or cnv data, show its checkbox, otherwise do not show checkbox
584
-
585
- important: presence of filtering properties indiate the type of cnv quantification
586
- and will trigger rendering of ui controls
587
- */
588
- type CnvSegmentQuery = {
589
- /** ds supplied or dynamically added getter
590
- todo properly type input/output
591
- returns:
592
- {
593
- cnvs:[]
594
- { chr, start, stop, value?, class, samples[], occurrence=1, ssm_id }
595
- cnvMsg:string
596
- }
597
- */
598
- get?: (q: any) => any
599
- /** either file or get is required. file is bgzipped with columns:
600
- 1. chr
601
- 2. start, 0-based
602
- 3. stop
603
- 4. {"dt": 4, "mattr": {"origin": "somatic"}, "sample": "3332", "value": -1.0}
604
- "value" can be logratio (minus/positive number), copy number (non-negative integer), or qualitative call (gain/loss)
605
- */
606
- file?: string
607
-
608
- /****** rendering parameters ****
609
- not used as query parameter to filter segments
610
- value range for color scaling. default to 5. cnv segment value>this will use solid color
611
- */
612
- absoluteValueRenderMax?: number
613
- gainColor?: string
614
- lossColor?: string
615
-
616
- /** filter segments by max length to restrict to focal events;
617
- samples with all events filtered out should be treated as wildtype
618
- set to -1 to show all as a convenient solution, thus no need for UI to show a checkbox for filterbylength or not
619
- allow to be missing, in such case will always show all */
620
- cnvMaxLength?: number
621
-
622
- /// quick fix: following sets of properties are mutually exclusive. TODO may improve with "type" property
623
-
624
- /** presence of these properties indicate cnv is quantified as log(ratio) or similar
625
- filter segments by following two cutoffs only apply to log ratio, cnv gain value is positive, cnv loss value is negative
626
- samples with all events filtered out should be treated as wildtype
627
-
628
- - if m.value>0, skip m if m.value<this cutoff
629
- - set to 0 to not filtering and show all gain events
630
- - set to a large value e.g. 99 to hide all gain events
631
- */
632
- cnvGainCutoff?: number
633
- /*
634
- - if m.value<0, skip m if m.value>this cutoff
635
- - set to 0 to not filtering and show all loss events
636
- - set to a large negative value e.g. -99 to hide all loss events
637
- */
638
- cnvLossCutoff?: number
639
-
640
- /** presence of these properties indicate cnv is quantified as integer copy number
641
- * not in use yet *
642
- enable when there's such data
643
- cnvMinCopynumber?: number
644
- cnvMaxCopynumber?: number
645
- */
646
-
647
- /** quick fix for gdc cnv tool:
648
- if not set, mds3 tk & matrix will load cnv segments and show them together with ssm & fusion
649
- if set:
650
- - for mds3 tk loading via mds3.load.js, only when tk.hardcodeCnvOnly=true, this will be loaded and shown
651
- - for others using mayGetGeneVariantData(), this is always disabled, as request won't have this flag
652
- */
653
- requiresHardcodeCnvOnlyFlag?: true
654
-
655
- /** CNV cutoffs (such as cnvGainCutoff, cnvLossCutoff, cnvMaxLength) that are applied to specific genes */
656
- cnvCutoffsByGene?: {
657
- [geneName: string]: {
658
- [key: string]: any
659
- }
660
- }
661
-
662
- /** in mds3 tk view and gdc cnv tool, when number of segments from view region exceeds this cutoff, it's piled up into density view to speed up
663
- overrides default 1000
664
- this cutoff does not apply to other uses beyond mds3 tk, including matrix and geneVariant
665
- */
666
- densityViewCutoff?: number
667
-
668
- /** this cutoff is applied in ds.queries.cnv.get(), in that up to this number of segments will be returned
669
- overrides default 10k
670
- this applies to matrix, geneVariant, and mds3 tk
671
- todo there lacks a way for getter to message downstream code of exceeding limit
672
- */
673
- maxReturnCutoff?: number
674
- }
675
-
676
- /*
677
- no longer used!!
678
- file content is a probe-by-sample matrix, values are signals
679
- for a given region, the median signal from probes in the region is used to make a gain/loss call for each sample
680
- this is alternative to CnvSegmentQuery
681
-
682
- type Probe2Cnv = {
683
- file: string
684
- }
685
- */
686
-
687
- type RnaseqGeneCount = {
688
- /** Name of the HDF5 file */
689
- file: string
690
- samplesFile?: string
691
- /** Storage_type for storing data (HDF5) */
692
- storage_type: 'HDF5'
693
- }
694
-
695
- /** the metabolite query */
696
- export type MetaboliteIntensityQueryNative = {
697
- src: 'native' | string
698
- file: string
699
- samples?: number[]
700
- /** _metabolites,used to dynamically built cache of metabolite names to speed up search */
701
- _metabolites?: string[]
702
- get?: (param: any) => void
703
- find?: (param: string[]) => void
704
- metaboliteIntensity2bins?: { [index: string]: any }
705
- }
706
-
707
- export type MetaboliteIntensityQuery = MetaboliteIntensityQueryNative
708
-
709
- /** the proteomics query */
710
- type ProteomeFilter = {
711
- columnIdx: number
712
- columnValue: string | number
713
- }
714
-
715
- type ProteomeCohortConfig = {
716
- prior: { d0: number; s0sq: number }
717
- controlFilter: ProteomeFilter[]
718
- caseFilter: ProteomeFilter[]
719
- DAPfile?: string
720
- }
721
-
722
- type ProteomeAssayConfig = {
723
- columnIdx: number
724
- columnValue: string | number
725
- cohorts: {
726
- [cohortName: string]: ProteomeCohortConfig
727
- }
728
- /** optional PTM type for PTM assay type */
729
- PTMType?: string
730
- /** optional specific mclass override for PTM assay type */
731
- mclassOverride?: Mclass
732
- }
733
-
734
- export type ProteomeAbundanceQuery = {
735
- /** database file path */
736
- dbfile?: string
737
- /** organism-keyed structure (new format) */
738
- organisms?: {
739
- [organism: string]: {
740
- overlayTerm: BaseTerm
741
- columnIdx: number
742
- columnValue?: string
743
- /** genome assembly name for this organism, e.g. 'hg38' or 'mm10' */
744
- genomeName?: string
745
- assays: {
746
- [assayName: string]: ProteomeAssayConfig
747
- }
748
- }
749
- }
750
- /** flat assays structure (legacy format) */
751
- assays?: {
752
- [assayName: string]: ProteomeAssayConfig
753
- }
754
- samples?: number[]
755
- /** _proteins,used to dynamically built cache of protein names to speed up search */
756
- _proteins?: string[]
757
- get?: (param: any) => void
758
- find?: (param: string[]) => void
759
- bins?: { [index: string]: any }
760
- /** set of control sample IDs returned from get() query */
761
- controlSampleIds?: Set<string>
762
- }
763
-
764
- /** the geneExpression query
765
- three possibilities
766
- { src: 'native', file }
767
- { src: 'gdcapi' } // dynamically add get()
768
- { src: 'gdcapi', get } // ds supplied get
769
- */
770
- export type GeneExpressionQuery = {
771
- src: 'native' | 'gdcapi' // when gdc getter can become supplied, will remove src
772
- /** either ds-supplied or dynamically added getter */
773
- get?: (param: any, ds: any) => void
774
- /** bgzip-compressed, tabix-index file.
775
- first line must be "#chr \t start \t stop \t gene \t sample1 \t ..."
776
- (required when src=native and no ds-supplied getter)
777
- */
778
- file?: string
779
- /** dynamically added during server launch, list of sample integer IDs from file */
780
- samples?: number[]
781
- /** dynamically added flag during launch */
782
- nochr?: boolean
783
- /** This dictionary is used to store/cache the default bins calculated for a geneExpression term when initialized in the fillTermWrapper */
784
- geneExpression2bins?: { [index: string]: any }
785
- /** gene expression unit (e.g. 'FPKM') */
786
- unit?: string
787
- }
788
-
789
- /** Isoform expression query — either .get() or .file is needed.
790
- * availableItems is populated at startup from the HDF5 item dataset
791
- * so the client can filter isoform selection lists. */
792
- export type IsoformExpressionQuery = {
793
- /** ds-supplied or dynamically added getter */
794
- get?: (param: any, ds: any) => void
795
- /** HDF5 file with ENST IDs as row keys */
796
- file?: string
797
- /** dynamically added during server launch, list of sample integer IDs from file */
798
- samples?: number[]
799
- /** cache for default bins per isoform */
800
- geneExpression2bins?: { [index: string]: any }
801
- /** expression unit (e.g. 'TPM') */
802
- unit?: string
803
- /** ENST IDs available in the HDF5 file, populated during server validation */
804
- availableItems?: string[]
805
- }
806
-
807
- export type SingleCellGeneExpressionNative = {
808
- src: 'native'
809
- /** path to HDF5 files. for now only HDF5 is supported.
810
- each is a gene-by-cell matrix for a sample, with ".h5" suffix. missing files are detected and handled */
811
- folder: string
812
- /** dynamically added getter */
813
- get?: (q: any) => any
814
- /** cached gene exp bins */
815
- sample2gene2expressionBins?: { [sample: string]: { [gene: string]: any } }
816
- /** gene expression unit (e.g. 'FPKM') */
817
- unit?: string
818
- }
819
-
820
- export type SingleCellGeneExpressionGdc = {
821
- src: 'gdcapi'
822
- /** gene expression unit (e.g. 'FPKM') */
823
- unit?: string
824
- }
825
-
826
- export type SingleCellSamples = {
827
- /** logic to decide sample table columns (the one shown on singlecell app ui, displaying a table of samples with sc data)
828
- a sample table will always have a sample column, to show sample.sample value
829
- - use uiLabels.Sample to customize the name of the first column
830
- - the other two properties allow to declare additional columns to be shown in table, that are for display only
831
- when sample.experiments[] are used, a last column of experiment id will be auto added
832
- */
833
- /** any columns to be added to sample table. each is a term id, limited to categorical/numeric dictionary terms */
834
- sampleColumns?: { termid: string }[]
835
- /** used on client but not on ds */
836
- experimentColumns?: { label: string }[]
837
- /** getter function to return list of samples with single-cell data
838
- is either ds-supplied, to enclose ds-specific query details (gdc)
839
- or is missing, to be added at launch with built-in logic (samples are found by looking through singleCell.data.plots[].folder)
840
- */
841
- get?: (q: any) => any
842
- /** extra label to show along with sample, must be a term id as in sampleColumns[] and allow to retrieve value from sample object */
843
- extraSampleTabLabel?: string
844
- }
845
-
846
- type SingleCellDataBase = {
847
- /** when a sample has multiple tsne plots, this flag allows allows all plots to share one cell type legend */
848
- sameLegend?: boolean
849
- /** name of ref cells? */
850
- refName?: string
851
- /** dynamically added getter */
852
- get?: (q: any) => any
853
- /** width and height of the plots */
854
- settings?: { [key: string]: any }
855
- /** In development
856
- * Replacing colorColumns in gdc plot objs.*/
857
- twLst?: object[]
858
- }
859
-
860
- export type SingleCellDataGdc = SingleCellDataBase & {
861
- src: 'gdcapi'
862
- plots: GDCSingleCellPlot[]
863
- }
864
-
865
- export type SingleCellDEgeneGdc = {
866
- src: 'gdcapi'
867
- /** termId = Column name.
868
- this must be the colorColumn from one of the plots. In the client app, as soon as the plot data loads and maps renders, client finds the cell groups based on this columnName value, and shows a drop down of these groups on UI. user selects a group, and passes it as request body to backend to get DE genes for this group
869
- */
870
- termId: string
871
- }
872
-
873
- type GDCSingleCellPlot = {
874
- name: string
875
- colorColumns: ColorColumn[]
876
- coordsColumns: { x: number; y: number }
877
- /** if true the plot is shown by default. otherwise hidden
878
- * Will not be needed when the singleCellPlot is deprecated.*/
879
- selected?: boolean
880
- }
881
-
882
- type ColorColumn = {
883
- /** 0-based column number in the tabular file */
884
- index?: number
885
- /** name of the column */
886
- name: string
887
- /** column values (categories) to color mapping */
888
- colorMap?: { [index: string]: string }
889
- aliases?: { [index: string]: string }
890
- }
891
-
892
- /** defines a tsne type of plot for cells from one sample */
893
- type SingleCellPlot = {
894
- /** value is display as plot name on ui and also used as identifier for a plot, must be unique */
895
- name: string
896
- /** folder in which per-sample files are stored.
897
- - each file is a tabular text file with all cells (rows) from that sample. each file is named by the sample and includes optional suffix
898
- - folder must only contain per-sample files! files with names that cannot be matched to sample will crash dataset. this improves debugging
899
-
900
- all files must have same set of columns:
901
- - 1st column is cell barcode
902
- - x/y coordinate column number is defined in coordsColumns{x,y} below
903
- - additional columns for cell annotations, corresponds to colorColumns
904
- */
905
- folder: string
906
- /** 0-based column number for x/y coordinate for this plot */
907
- coordsColumns: { x: number; y: number }
908
- /** optional suffix to locate the file for a sample, via ${folder}/${sampleName}${fileSuffix}
909
- assumes that file name always start with sample name.
910
- if not introduce filePrefix
911
- */
912
- fileSuffix?: string
913
- /** list of columns in tabular text file that define cell categories and can be used to color the cells in the plot. must have categorical values
914
- */
915
- colorColumns: ColorColumn[]
916
- /** if true the plot is shown by default. otherwise hidden.
917
- * Old implementation. Maybe deleted when singleCellPlot is deprecated.*/
918
- selected?: boolean
919
- /** Plot is a meta analysis result and treated differently in the UI */
920
- isMetaResult?: boolean
921
- /** optional for meta analysis result plots. May define the "sampleId" for the
922
- * server requests. If not provided, the file name or the plot name with the
923
- * spaces replaced with '_' is used. */
924
- sampleId?: string
925
- }
926
- export type SingleCellDataNative = SingleCellDataBase & {
927
- src: 'native'
928
- /** available tsne type of plots for each sample */
929
- plots: SingleCellPlot[]
930
- }
931
-
932
- export type SingleCellQuery = {
933
- /** methods to identify samples with singlecell data,
934
- this data allows client-side to display a table with these samples for user to choose from
935
- also, sampleView uses this to determine if to invoke the sc plot for a sample
936
- */
937
- samples: SingleCellSamples
938
- /** defines tsne/umap type of clustering maps for each sample
939
- */
940
- data: SingleCellDataGdc | SingleCellDataNative
941
- metaResults?: SingleCellMetaResult[]
942
- /** defines available gene-level expression values for each cell of each sample */
943
- geneExpression?: SingleCellGeneExpressionGdc | SingleCellGeneExpressionNative
944
- /** Precomputed top differentialy expressed genes for a cell cluster, against rest of cells */
945
- DEgenes?: SingleCellDEgeneGdc
946
- /** supplies per-sample images. will create a new tab on the ui. one image per sample */
947
- images?: SCImages
948
- /** Created on mds.init() from colorMap and alias within each plot. */
949
- terms?: object[]
950
- }
951
-
952
- export type SingleCellMetaResult = {
953
- /** identifier */
954
- name: string
955
- /** tsv file
956
- - 1st column is cell barcode
957
- - x/y coordinate column number is defined in coordsColumns{x,y} below
958
- - additional columns for cell annotations, corresponds to colorColumns
959
- - must have a column for sample name, to identify which sample the cell is from
960
- */
961
- file: string
962
- /** gene exp h5 file */
963
- geneExpFile?: string
964
- /** 0-based column number for x/y coordinate for this plot */
965
- coordsColumns: { x: number; y: number }
966
- colorColumns: ColorColumn[]
967
- }
968
-
969
- type SCImages = {
970
- /** folder where the per-sample image files are stored, as "SCImages/<folder>/<sample>/<fileName>" */
971
- folder: string
972
- /** see above */
973
- fileName: string
974
- /**Used to name the image tab in the single cell plot */
975
- label: string
976
- }
977
-
978
- /** genome browser LD track */
979
- type LdQuery = {
980
- /** each track obj defines a ld track */
981
- tracks: {
982
- /** for displaying and identifying a track. must not duplicate */
983
- name: string
984
- /** relative path of ld .gz file */
985
- file: string
986
- /** dynamically added */
987
- nochr?: boolean
988
- /** if to show by default */
989
- shown: boolean
990
- /** max range allowed to show data */
991
- viewrangelimit: number
992
- }[]
993
- /** color scale when LD is used to overlay on variants of a locus */
994
- overlay: {
995
- /** color for r2 value 1 */
996
- color_1: string
997
- /** Color for r2 value 0 */
998
- color_0: string
999
- }
1000
- }
1001
-
1002
- /** one more multiple sets of genome-wide plots per sample, e.g. dna meth probe beta values. the plot has a Y axis and shows all chromosomes. each key is one set of such plot. there could be multiple sets */
1003
- type SingleSampleGenomeQuantification = {
1004
- [index: string]: {
1005
- /** description of this data */
1006
- description: string
1007
- /** min value of Y axis */
1008
- min: number
1009
- /** max value of Y axis */
1010
- max: number
1011
- sample_id_key: string
1012
- /** folder path of data files per sample */
1013
- folder: string
1014
- /** plot color for positive values */
1015
- positiveColor: string
1016
- /** plot color for negative values */
1017
- negativeColor: string
1018
- /** optionally, link the plot to singleSampleGbtk, in that clicking on the plot will luanch a detailed block view defined by singleSampleGbtk */
1019
- singleSampleGbtk?: string
1020
- }
1021
- }
1022
-
1023
- /** single sample genome browser track. each key corresponds to one track. currently hardcoded to "<sampleId>.gz" bedgraph files in the folder */
1024
- type SingleSampleGbtk = {
1025
- [index: string]: {
1026
- /** description of this data */
1027
- description: string
1028
- /** min value of Y axis */
1029
- min: number
1030
- /** max value of Y axis */
1031
- max: number
1032
- /** */
1033
- sample_id_key: string
1034
- /** folder path of data files per sample */
1035
- folder: string
1036
- }
1037
- }
1038
-
1039
- type Mds3Queries = {
1040
- /** (gb=genomebrowser) controls gb chart button menu genesearchbox behavior,
1041
- add some additional options after a gene is found, and mode of gb launched from the menu
1042
-
1043
- - "protein":
1044
- genesearchbox only allow searching gene and not coord
1045
- launched gb goes into protein-mode
1046
- this is used for ds with only coding mutations over some protein-coding genes, and only want to show protein view for such
1047
- - "genomic":
1048
- searching either gene/coord will result in coord
1049
- gb will always be in genomic mode
1050
- this is used for ds with genome-wide variants only shown in genomic views, but not protein view
1051
- - none:
1052
- meaning gb can be shown in either protein or genomic mode
1053
- when searching coord, gb goes into genomic mode
1054
- when searching gene, show an option in chart btn menu to select protein or genomic view
1055
- */
1056
- gbRestrictMode?: 'protein' | 'genomic'
1057
- snvindel?: SnvIndelQuery
1058
- svfusion?: SvFusion
1059
- cnv?: CnvSegmentQuery
1060
- /** gene-level cnv, only available on gdc; query by gene symbol, ds must define getter
1061
- */
1062
- geneCnv?: {
1063
- bygene: {
1064
- get: (q: any) => any
1065
- }
1066
- }
1067
- trackLst?: TrackLst
1068
- ld?: LdQuery
1069
- defaultCoord?: string
1070
- singleSampleMutation?: SingleSampleMutationQuery
1071
- NIdata?: NIdataQuery
1072
- geneExpression?: GeneExpressionQuery
1073
- isoformExpression?: IsoformExpressionQuery
1074
- /** single-sample gsea precomputed scores for rnaseq samples, for genesets from geneset db
1075
- requires genome to be equipped with geneset db
1076
- */
1077
- ssGSEA?: {
1078
- /** path to h5 file, matrix of NES scores. rows are msigdb geneset ids, columns are rnaseq samples */
1079
- file: string
1080
- // in case a genome may have more than 1 geneset dbs, here may specify name of db that this result is based on */
1081
- }
1082
- /** dna methylation beta value matrix
1083
- */
1084
- dnaMethylation?: {
1085
- /** path to h5 file */
1086
- file: string
1087
- /** dna methylation unit (e.g. 'Average Beta Value') */
1088
- unit: string
1089
- /** promoter-by-sample matrix, values are average M-value */
1090
- promoter?: {
1091
- /** path to h5 file */
1092
- file: string
1093
- /** unit label for promoter values (e.g. 'Average M-value') */
1094
- unit: string
1095
- }
1096
- }
1097
- rnaseqGeneCount?: RnaseqGeneCount
1098
- /** Used to create the top mutated genes UI in the gene
1099
- * set edit ui and data requests. */
1100
- topMutatedGenes?: TopMutatedGenes
1101
- /** get top variably expressed genes */
1102
- topVariablyExpressedGenes?: TopVariablyExpressedGenesQuery
1103
- metaboliteIntensity?: {
1104
- src: 'native'
1105
- file: string
1106
- }
1107
- proteome?: ProteomeAbundanceQuery
1108
- singleCell?: SingleCellQuery
1109
- singleSampleGenomeQuantification?: SingleSampleGenomeQuantification
1110
- singleSampleGbtk?: SingleSampleGbtk
1111
- /** deprecated. replaced by WSImages */
1112
- DZImages?: DZImages
1113
- WSImages?: WSImages
1114
- images?: Images
1115
- chat?: any
1116
- alphaGenome?: {
1117
- ontologyTerm?: string // default ontology term for a dataset
1118
- default: {
1119
- gene: string
1120
- chromosome: string
1121
- position: number
1122
- reference: string
1123
- alternate: string
1124
- ontologyTerm: string
1125
- outputType: number
1126
- }
1127
- }
1128
- }
1129
-
1130
- /** chat app support
1131
- type Chat = {
1132
- }
1133
- */
1134
-
1135
- /** non-zoom small images
1136
- iamge file to sample mapping is stored in images table
1137
- */
1138
- type Images = {
1139
- /** folder where the per-sample image files are stored */
1140
- folder: string
1141
- }
1142
-
1143
- /** Deprecated. deep zoom image shown via openseadragon, with precomputed tiles.
1144
- * this is replaced by WSImages and should not be used anymore */
1145
- export type DZImages = {
1146
- // type of the image, e.g. H&E
1147
- type: string
1148
- // path to the folder where sample images are stored
1149
- imageBySampleFolder: string
1150
- }
1151
-
1152
- /** deep zoom image shown via tiatoolbox, covers any big image files including whole-slide image.
1153
- image file to sample mapping is stored in wsimages table
1154
- */
1155
- export type WSImages = {
1156
- db?: { file: string }
1157
- // type of the image, e.g. H&E
1158
- type: string
1159
-
1160
- /* path to the folder where sample images are stored
1161
- required; for both cases where image files are hosted locally, or loaded from remote via ds-supplied getter
1162
- */
1163
- imageBySampleFolder?: string
1164
-
1165
- aiToolImageFolder?: string
1166
-
1167
- activePatchColor?: string
1168
- predictionColor?: Array<number>
1169
- annotationsColor?: Array<number>
1170
- tileSize?: number
1171
- uncertainty?: { color: string; label?: string }[]
1172
-
1173
- /** dynamically added on launch with built in logic */
1174
- saveWSIAnnotation?: (annotation: SaveWSIAnnotationRequest) => Promise<void>
1175
-
1176
- /** dynamically added on launch with built in logic */
1177
- deleteWSIAnnotation?: (annotation: DeleteWSITileSelectionRequest) => Promise<void>
1178
-
1179
- /** dynamically added on launch with built in logic - returns all image filenames for a project */
1180
- getAllWSImages?: (projectId: string) => Promise<string[]>
1181
-
1182
- /** either ds supplied or dynamically added on launch with built in logic (retrieve the sample list from the wsimages table) */
1183
- getSamples?: () => Promise<Array<WSISample>>
1184
- /** either ds supplied or dynamically added on launch with built in logic */
1185
- getWSImages?: (sampleName: string) => Promise<WSImage[]>
1186
- /** ds supplied */
1187
- getWSIPredictionPatches?: (projectId: string, wsiImage: string) => Promise<Prediction[]>
1188
- /** ds supplied */
1189
- getWSIAnnotations?: (projectId: string, wsiImage: string) => Promise<string[]>
1190
- /** ds supplied */
1191
- getPredictionLayers?: (projectId: string, wsiImage: string) => Promise<Map<string, string> | undefined>
1192
- /** ds supplied */
1193
- getAnnotationClasses?: (projectId: string) => Promise<WSIClass[] | undefined>
1194
- /** ds supplied */
1195
- retrainModel?: (projectId: string, wsimages: string[]) => Promise<void>
1196
- /** ds supplied */
1197
- selectWSIImages?: () => Promise<string[]>
1198
- }
1199
-
1200
- export type WSIClass = { id: number; key_shortcut: string; label: string; color: string }
1201
-
1202
- /*** types supporting Termdb ***/
1203
-
1204
- type TermIds = {
1205
- [index: string]: string
1206
- }
1207
-
1208
- type SelectCohortValuesEntry = {
1209
- keys: string[]
1210
- label: string
1211
- shortLabel: string
1212
- isdefault?: boolean
1213
- note?: string
1214
- }
1215
-
1216
- export type SelectCohortEntry = {
1217
- /** subcohort term in db. uses hardcoded type=multivalue */
1218
- term: { id: string; type: string }
1219
- /** Title above the cohort introduction/content in the about tab */
1220
- title?: string
1221
- /** Text above radio cohort options in the about tab. */
1222
- prompt: string
1223
- values: SelectCohortValuesEntry[]
1224
- /** cohort-related static html shown in about tab */
1225
- description?: string
1226
- descriptionByCohort?: { [index: string]: string }
1227
- /** If the description is dependent on the user's role,
1228
- define this callback to return description based on auth
1229
- returns a static description
1230
- */
1231
- descriptionByUser?: (auth: any) => string
1232
- /** similar to descriptionByUser but returns an object with one description per cohort,
1233
- about tab will switch description based on user-selected cohort
1234
- */
1235
- descriptionByCohortBasedOnUserRole?: (auth: any) => object
1236
- /** subtext shown at the very bottom of the cohort/about tab subheader */
1237
- asterisk?: string
1238
- //The profile has clearOnChange. The terms used in the plots are not always the same for the profile.
1239
- //Therefore when switching cohorts, it is necessary to delete the plots opened and the global filter
1240
- clearOnChange?: { [index: string]: boolean }
1241
- }
1242
-
1243
- type MissingAccess = {
1244
- message: string
1245
- links: { [index: string]: string }
1246
- }
1247
-
1248
- type DataDownloadCatch = {
1249
- helpLink: string
1250
- missingAccess: MissingAccess
1251
- jwt: { [index: string]: string }
1252
- }
1253
-
1254
- type ScatterPlotsEntry = {
1255
- name: string
1256
- description?: string
1257
- descriptionShort?: string
1258
- dimension: number
1259
- file: string
1260
- coordsColumns?: { x: number; y: number; z?: number }
1261
- settings?: { [index: string]: any }
1262
- /** by default the dots are called "samples" on the plot, use this to call it by diff name e.g. "cells" */
1263
- sampleType?: string
1264
- /** a termsetting to supply dot color */
1265
- colorTW?: { id: string }
1266
- /** a termsetting to supply dot shape */
1267
- shapeTW?: { id: string } // TODO replace with tw type
1268
- colorColumn?: ColorColumn
1269
- /** provide a sampletype term to filter for specific type of samples for subjects with multiple samples and show in the plot.
1270
- e.g. to only show D samples from all patients
1271
- this is limited to only one term and doesn't allow switching between multiple terms
1272
- */
1273
- sampleCategory?: {
1274
- /** categorical term like "sampleType" which describes types of multiple samples from the same subject */
1275
- tw: { id: string }
1276
- /** default category */
1277
- defaultValue: string
1278
- /** order of categories */
1279
- order: string[]
1280
- }
1281
- }
1282
-
1283
- type Scatterplots = {
1284
- /**
1285
- if defined:
1286
- ds-supplied getter, arg is clientAuthResult, returns list of plot available for this request based on auth
1287
- here plots[] array is still needed! so on loading a plot the server can find the matching plot by requested name
1288
- if not defined:
1289
- entire plots[] is always send to client
1290
- */
1291
- get?: (clientAuthResult: any) => ScatterPlotsEntry[]
1292
- /** hardcoded plots */
1293
- plots: ScatterPlotsEntry[]
1294
- }
1295
-
1296
- /** this plot compares correlation of one feature against a bunch of variables across samples
1297
- */
1298
- type CorrelationVolcano = {
1299
- /** fixed feature, is one numeric term */
1300
- feature: {
1301
- /** array of allowed term types for feature tw */
1302
- termTypes: string[]
1303
- }
1304
- /** list of numeric variables to be compared against fixed feature*/
1305
- variables: {
1306
- /** later can expand */
1307
- type: 'dictionaryTerm'
1308
- /** when type=dictionaryTerm, is array of numeric term ids */
1309
- termIds?: string[]
1310
- }
1311
- }
1312
-
1313
- /** Configurations for box plots */
1314
- type BoxPlots = {
1315
- /** If true, allows user to 'remove outliers' from burger menu */
1316
- removeOutliers: boolean
1317
- }
1318
-
1319
- type UiLabels = {
1320
- [propName: string]: string | { label: string; [otherAttr: string]: string }
1321
- }
1322
-
1323
- type TieBreakerFilterValuesEntry = {
1324
- dt: number
1325
- }
1326
-
1327
- type TieBreakerFilter = {
1328
- values: TieBreakerFilterValuesEntry[]
1329
- }
1330
-
1331
- type TieBreakersEntry = {
1332
- by: string
1333
- order?: (string | number)[]
1334
- filter?: TieBreakerFilter
1335
- }
1336
-
1337
- type SortPriorityEntry = {
1338
- types: string[]
1339
- tiebreakers: TieBreakersEntry[]
1340
- }
1341
-
1342
- type SurvivalSettings = {
1343
- /** The max time-to-event to be displayed in plot, hide all the samples with Time-to-Event longer than this maxTimeToEvent */
1344
- maxTimeToEvent?: number
1345
- /** The time unit (years, months, weeks, or days) displayed in the x-axis of survival plot */
1346
- timeUnit?: string
1347
- /** The number of raw survival data's time units that make up one year, e.g., 12 for months */
1348
- numUnitInOneYear?: number
1349
- /** the customized x-axis tick values of survival plot */
1350
- xTickValues?: number[]
1351
- }
1352
-
1353
- type RegressionSettings = {
1354
- /** Disclaimer message shown under the cofficient table when
1355
- * regression type is cox. */
1356
- coxDisclaimer?: string
1357
- /** disable interactions */
1358
- disableInteractions?: boolean
1359
- /** hide type III statistics table in results */
1360
- hideType3?: boolean
1361
- /** hide statistical tests table in results */
1362
- hideTests?: boolean
1363
- }
1364
-
1365
- type MatrixSettings = {
1366
- maxSample?: number
1367
- svgCanvasSwitch?: number
1368
- cellEncoding?: string
1369
- cellbg?: string
1370
- controlLabels?: UiLabels
1371
- sortSamplesBy?: string
1372
- sortPriority?: SortPriorityEntry[]
1373
- ignoreCnvValues?: boolean
1374
- geneVariantCountSamplesSkipMclass?: string[]
1375
- /** all the truncating mutations exist in the dataset */
1376
- truncatingMutations?: string[]
1377
- /** all the protein-changing mutations mutations exist in the dataset */
1378
- proteinChangingMutations?: string[]
1379
- /** all the mutation classes exist in the dataset */
1380
- mutationClasses?: string[]
1381
- /** all the CNV classes exist in the dataset */
1382
- CNVClasses?: string[]
1383
- /** all the synonymous mutations exist in the dataset */
1384
- synonymousMutations?: string[]
1385
- showHints?: string[]
1386
- displayDictRowWithNoValues?: boolean
1387
- /** allow to add two buttons (CNV and mutation) to control panel for selecting
1388
- * mclasses displayed on oncoMatrix */
1389
- addMutationCNVButtons?: boolean
1390
- /** this is now computed from sortPriority[x].tiebreakers.find(tb =>
1391
- * tb.filter?.values[0]?.dt === 1) ... */
1392
- sortByMutation?: string
1393
- /** this is now computed from sortPriority[x].tiebreakers.find(tb =>
1394
- * tb.filter?.values[0]?.dt === 4).isOrdered */
1395
- sortByCNV?: boolean
1396
- cnvUnit?: 'log2ratio' | 'segmedian'
1397
- /** whether to show white cell border for SNVindel in oncoPrint mode */
1398
- oncoPrintSNVindelCellBorder?: boolean
1399
- /** use a geneset edit UI without or with initial radio inputs */
1400
- genesetEditUiVersion?: '' | 'withTabs'
1401
- }
1402
-
1403
- type NumericDictTermClusterSettings = {
1404
- /** default hiercluster group name */
1405
- termGroupName?: string
1406
- zScoreTransformation?: boolean
1407
- colorScale?: string
1408
- }
1409
-
1410
- type Matrix = {
1411
- /** alternative name, e.g. the plot is called "oncomatrix" in gdc; by default it's called "matrix" */
1412
- appName?: string
1413
- /** default settings for matrix plot */
1414
- settings?: MatrixSettings
1415
- /** matrix-specific mclass override? */
1416
- mclass?: Mclass
1417
- /** filter to hide entire legend group, e.g. hide all CNV */
1418
- legendGrpFilter?: any
1419
- /** filter to hide categories or mclass, e.g. hide male, hide MISSENSE */
1420
- legendValueFilter?: any
1421
- /** local filter to limit samples in matrix/hiercluster, merged with this.state.termfilter.filter when querying server */
1422
- filter?: any
1423
- /** matrix criteria for a CNV alteration */
1424
- cnvCutoffs?: any
1425
- }
1426
-
1427
- // specific hierCluster type settings, should be named as "dataType + Cluster"
1428
- type NumericDictTermCluster = {
1429
- /** alternative name, e.g. the plot is called "drug sensitivity" in ALL-pharmacotyping; by default it's called "Numeric Dictionary Term cluster" */
1430
- appName?: string
1431
- /** default settings for numericDictTermCluster plot */
1432
- settings?: NumericDictTermClusterSettings
1433
- /** list of numeric term ids that will be excluded from the numeric dictionary term cluster, add to usecase.detail to exclude terms*/
1434
- exclude?: string[]
1435
- /** list of pre-built numericDictTermcluster plots */
1436
- plots?: NumericDictTermClusterPlotsEntry[]
1437
- }
1438
-
1439
- type NumericDictTermClusterPlotsEntry = {
1440
- name: string
1441
- file: string
1442
- settings?: {
1443
- [key: string]: any
1444
- }
1445
- /** helper function to get plot config from saved session file */
1446
- getConfig?: (f: any) => void
1447
- }
1448
-
1449
- type Survival = {
1450
- /** default settings for survival plot */
1451
- settings?: SurvivalSettings
1452
- }
1453
-
1454
- type Regression = {
1455
- /** default settings for regression */
1456
- settings?: RegressionSettings
1457
- }
1458
-
1459
- type MatrixPlotsEntry = {
1460
- name: string
1461
- file: string
1462
- settings?: {
1463
- [key: string]: any
1464
- }
1465
- getConfig?: (f: any) => void
1466
- }
1467
-
1468
- type MatrixPlots = {
1469
- plots: MatrixPlotsEntry[]
1470
- }
1471
-
1472
- type AllowCaseDetails = {
1473
- sample_id_key: string
1474
- terms: string[]
1475
- }
1476
-
1477
- type MultipleTestingCorrection = {
1478
- method: string
1479
- skipLowSampleSize: boolean
1480
- }
1481
-
1482
- type TvsTerm = {
1483
- id: string
1484
- type: string
1485
- name: string
1486
- }
1487
-
1488
- type TvsValues = {
1489
- key?: string
1490
- label?: string
1491
- }
1492
-
1493
- type Tvs = {
1494
- term: TvsTerm
1495
- values: TvsValues[]
1496
- }
1497
-
1498
- type RestrictAncestriesEntry = {
1499
- name: string
1500
- tvs: Tvs
1501
- PCcount: number
1502
-
1503
- // TODO declare that either PCTermId or PCBySubcohort is required
1504
- PCTermId?: string
1505
- PCBySubcohort?: {
1506
- [subcohortId: string]: any
1507
- }
1508
- }
1509
-
1510
- /*
1511
- base type for deriving new types with new attributes
1512
-
1513
- */
1514
- type UrlTemplateBase = {
1515
- /** must end with '/' */
1516
- base: string
1517
- namekey: string
1518
- defaultText?: string
1519
- }
1520
- export type UrlTemplateSsm = UrlTemplateBase & {
1521
- /** to create separate link, but not directly on chr.pos.ref.alt string.
1522
- name of link is determined by either namekey or linkText. former allows to retrieve a name per m that's different from chr.pos.xx */
1523
- shownSeparately?: boolean
1524
- /** optional name of link, if set, same name will be used for all links. e.g. "ClinVar".
1525
- if missing, name is value of m[url.namekey], as used in url itself (e.g. snp rsid) */
1526
- linkText?: string
1527
- }
1528
-
1529
- export type GetSamplesOpts = {
1530
- filter: any // pp filter
1531
- filter0: any // mmrf filter
1532
- ds: any
1533
- }
1534
-
1535
- /*** type of ds.cohort.termdb{} ***/
1536
- export type Termdb = {
1537
- /** Terms */
1538
- termIds?: TermIds
1539
- /**
1540
- * Check for the required minimum number of samples with data as queried with getData() or other code,
1541
- * in order to minimize the ease of extracting identifiable information from aggregate data
1542
- * in server response
1543
- *
1544
- * returns: {minSize, canAccess}, see below
1545
- */
1546
- checkAccessToSampleData?: (
1547
- /** req.query as processed through app middleware (pre-parsed, may have req.body props, __protectec__, etc) */
1548
- q: any,
1549
- data: {
1550
- /** the number of samples or sites with matching data from one or more queried terms */
1551
- count: number
1552
- /** option to specify sample names or sites that are accessible to the current user,
1553
- */
1554
- names?: string[]
1555
- }
1556
- ) => {
1557
- /** the required minimum size for the current user to access certain data,
1558
- * may be dependent on login status or other context
1559
- * */
1560
- minSize: number
1561
- /** whether downstreadm backend code can proceed */
1562
- canAccess: boolean
1563
- }
1564
- /** if true, backend is allowed to send sample names to client in charts */
1565
- displaySampleIds?: (clientAuthResult: any) => boolean
1566
- /** get samples that match supplied filter */
1567
- getSamples?: (opts: GetSamplesOpts) => Promise<Set<any>>
1568
- converSampleIds?: boolean
1569
- alwaysShowBranchTerms?: boolean
1570
- minimumSampleAllowed4filter?: number
1571
- minTimeSinceDx?: number
1572
- timeUnit?: string
1573
- ageEndOffset?: number
1574
- cohortStartTimeMsg?: string
1575
- alwaysRefillCategoricalTermValues?: boolean
1576
- restrictAncestries?: RestrictAncestriesEntry[]
1577
- /** Cohort specific */
1578
- selectCohort?: SelectCohortEntry
1579
- /* When a dataset uses login this property allows to configure the login logic */
1580
- invalidTokenErrorHandling?: {
1581
- //Affected charts contains the list of charts that require a login, if * is present, all charts require a login
1582
- affectedCharts: string[]
1583
- //Error message that will be displayed in the UI when the login fails or the token is invalid
1584
- errorMessage: string
1585
- }
1586
-
1587
- /** quick fix to convert category values from a term to lower cases for comparison (case insensitive comparison)
1588
- for gdc, graphql and rest apis return case-mismatching strings for the same category e.g. "Breast/breast"
1589
- keep this setting here for reason of:
1590
- - in mds3.gdc.js, when received all-lowercase values from graphql, it's hard to convert them to Title case for comparison
1591
- - mds3.variant2samples consider this setting, allows to handle other datasets of same issue
1592
- */
1593
- useLower?: boolean
1594
- matrix?: Matrix
1595
- numericDictTermCluster?: NumericDictTermCluster
1596
- survival?: Survival
1597
- regression?: Regression
1598
- logscaleBase2?: boolean
1599
- plotConfigByCohort?: PlotConfigByCohort
1600
- /** Functionality */
1601
- dataDownloadCatch?: DataDownloadCatch
1602
- helpPages?: URLEntry[]
1603
- multipleTestingCorrection?: MultipleTestingCorrection
1604
- urlTemplates?: {
1605
- /** gene link definition */
1606
- gene?: UrlTemplateBase
1607
- /** sample link definition */
1608
- sample?: UrlTemplateBase
1609
- /** ssm link definition */
1610
- ssm?: UrlTemplateSsm | UrlTemplateSsm[]
1611
- /** allow to add link to "Experiment" field of singlecell app sample table */
1612
- scrnaExperimentId?: UrlTemplateBase
1613
- }
1614
-
1615
- termtypeByCohort?: any // FIXME see below
1616
- /** TODO not declared due to tsc err
1617
- ds-defined or dynamically created. the array has an extra "nested" property
1618
- only describes dictionary terms,
1619
- non-dict terms are dynamically generated in getAllowedTermTypes() of termdb.config.ts based on query types
1620
- termtypeByCohort?: {
1621
- cohort: string
1622
- termType: string
1623
- termCount: number
1624
- }[] & {
1625
- nested: {
1626
- [cohort: string]: {
1627
- [termType: string]: number
1628
- }
1629
- }
1630
- }
1631
- */
1632
-
1633
- /** ds defined add on to termtypeByCohort; note that this is not cohort-specific!
1634
- this is combined with termtypeByCohort in getAllowedTermTypes()
1635
- for now is used to support following types which lacks good way to auto generate them:
1636
-
1637
- - geneVariant
1638
- for somatic events. works for snvindel/svfusion/cnv.
1639
- since all these datatypes are optional, cannot define it in snvindel.termTypes which could be missing
1640
- ** must be defined via allowedTermTypes[] **
1641
-
1642
- - snp, snplst, snplocus
1643
- for germline markers
1644
- */
1645
- allowedTermTypes?: string[]
1646
-
1647
- /** ds-defined or dynamically created callbacks
1648
- {
1649
- getSupportedChartTypes: (a: any) => any
1650
- }
1651
- */
1652
- q?: any
1653
- /** mclass override (color, label etc) */
1654
- mclass?: Mclass
1655
- lollipop?: any
1656
- hasAncestry?: boolean
1657
- /** set to true for genome-level geneset db */
1658
- isGeneSetTermdb?: boolean
1659
-
1660
- /** method to get total sample size per category for a dict term. to use in mds3 tk sample summary
1661
- */
1662
- termid2totalsize2?: {
1663
- // ds-supplied getter. if missing, should be using native termdb
1664
- get?: (twLst: any, q: any, combination: any, ds: any) => void
1665
- // gdc flag for outdated design
1666
- gdcapi?: true
1667
- }
1668
- /** Do not use a union here. */
1669
- /** TODO: should use a union to distinguish between type defs */
1670
- dictionary?: GdcApi & AiApi & DictApi
1671
- allowCaseDetails?: AllowCaseDetails
1672
- /** Searches the genedb alias list to return the genecode ID */
1673
- getGeneAlias?: (q: any, tw: any) => { gencodeId: any }
1674
- convertSampleId?: GdcApi
1675
- hierCluster?: any
1676
-
1677
- /** ds customization of rules in TermTypeSelect on what term type to exclude for a usecase.
1678
- used by gdc in that gene exp cannot be used for filtering
1679
- note this applies to left-side term type tabs, but not terms in dict tree. latter is controlled by excludeTermtypeByTarget
1680
- */
1681
- useCasesExcluded?: {
1682
- /** key is target name (todo restrict values), value is array of 1 or more term
1683
- * types (todo restrict values) */
1684
- [useCaseTarget: string]: string[]
1685
- }
1686
- /** ds customization to rules in isUsableTerm(). this applies to what's showing in dict tree
1687
- */
1688
- excludedTermtypeByTarget?: {
1689
- /** key is usecase target (todo restrict). value is array of term type (todo restrict) */
1690
- [useCaseTarget: string]: string[]
1691
- }
1692
- /** in development!
1693
- * Supports the About tab in mass UI
1694
- */
1695
- hasSampleAncestry?: boolean
1696
- sampleTypes?: SampleType[]
1697
- /** ui labels used for plot controls and tooltips */
1698
- uiLabels?: UiLabels
1699
-
1700
- tracks?: {
1701
- /** allow color or shape changes in the lollipop */
1702
- allowSkewerChanges: boolean
1703
- }
1704
- //* specify color map per module/group of terms. Used in the profile dataset.
1705
- /** For example "National Context" is a profile module, that groups some multivalue terms for wich the category colors are the ones shown below:
1706
- colorMap: {
1707
- ['*']: {
1708
- ['Not applicable for my role']: '#aaa',
1709
- ['Not Available/Do Not Know']: '#aaa',
1710
- ["I don't know"]: '#aaa',
1711
- ['Almost Never']: '#595959',
1712
- ['Infrequently']: '#747474',
1713
- ['No']: '#aaa'
1714
- },
1715
- ['National Context']: {
1716
- ['Almost Always']: '#15557C',
1717
- ['Frequently']: '#1E77BB',
1718
- ['Sometimes']: '#2FA9F4',
1719
- ['Yes']: '#1E77BB'
1720
- },
1721
- }
1722
- If the colors are the same for all the categories, use the wildcard '*' to define the color for all the modules.
1723
- **/
1724
- colorMap?: {
1725
- /** colors for a category multivalues */
1726
- [index: string]: { [index: string]: string }
1727
- }
1728
- defaultTw4correlationPlot?: {
1729
- /** key is string as disease/survial etc, value is tw */
1730
- [index: string]: Tw
1731
- }
1732
- /** maximum number of genes to query in geneVariant gene set */
1733
- maxGeneVariantGeneSetSize?: number
1734
- /** (server-side) maximum number of awaited by-term queries for sample data */
1735
- maxConcurrentQueries?: number
1736
- /** (client-side) maximum number of terms that should be submitted in one fetch request in TermdbVocab.getAnnotatedSampleData() */
1737
- maxAnnoTermsPerClientRequest?: number
1738
- /** option to disable mayAddDataAvailability() based on request path and query parameters */
1739
- disableAssayAvailability?: (path: string, query: { [key: string]: any }) => boolean
1740
- //terms are shown in the dictionary based on term and user role.
1741
- isTermVisible?: (clientAuthResult: any, ids: string) => boolean
1742
- hiddenIds?: string[]
1743
- getAdditionalFilter?: (__protected__: any, term: any) => Filter | undefined
1744
- /** collections of dictionary terms (numeric or categorical) that are related and can be used together in some plots */
1745
- termCollections?: TermCollection[]
1746
- /** whether to set onlyChildren in getData() */
1747
- setOnlyChildren?: true
1748
- }
1749
-
1750
- type TermCollectionBase = {
1751
- /** human readable name as well as unique identifier for this collection */
1752
- name: string
1753
- /** array of dictionary term ids belonging to this collection.
1754
- * Optional for custom (non-dictionary) collections where termlst[] is the primary source. */
1755
- termIds?: string[]
1756
- /** full term objects corresponding to termIds[]; populated by server on dataset init,
1757
- * sent to client so fill() can resolve member term names without extra requests */
1758
- termlst?: BaseTerm[]
1759
- /** array of branch term ids belonging to this collection,
1760
- * may be used as state.tree.expandedTermIds[] option to termdb appInit() */
1761
- branchIds?: string[]
1762
- propsByTermId: {
1763
- [termId: string]: any
1764
- }
1765
- /** preconfigured cohort-level plots for this collection */
1766
- plots?: {
1767
- /** name of this plot */
1768
- name: string
1769
- /** json file path of this plot */
1770
- file: string
1771
- }[]
1772
- }
1773
-
1774
- type NumericTermCollection = TermCollectionBase & {
1775
- type: 'numeric'
1776
- /** optional transformations to apply to the term values when used in plots, specified by plot type */
1777
- valueTransformByPlots?: {
1778
- [chartType: string]: { offset?: number }
1779
- }
1780
- }
1781
-
1782
- type CategoricalTermCollection = TermCollectionBase & {
1783
- type: 'categorical'
1784
- /** category values to filter on; hydrated form uses CategoryKey[] */
1785
- categoryKeys: CategoryKey[]
1786
- }
1787
-
1788
- type TermCollection = NumericTermCollection | CategoricalTermCollection
1789
-
1790
- type SampleType = {
1791
- name: string
1792
- plural_name: string
1793
- parent_id: string
1794
- }
1795
-
1796
- /** predefined configuration objects per subcohort per plot type */
1797
- type PlotConfigByCohort = {
1798
- /** key is subcohort string */
1799
- [index: string]: {
1800
- /** key is plot type as in mass/charts.js */
1801
- [key: string]: object
1802
- }
1803
- }
1804
-
1805
- /** modified version of termwrapper*/
1806
- type Tw = {
1807
- /** short hand for using either id (dict term) or term{} */
1808
- id?: string
1809
- term?: object
1810
- q?: unknown
1811
- /** quick fix for generating URL links in mds3 tk sample table! adhoc design. may move to tw.term.baseURL and not specific to mds3 tk
1812
- */
1813
- baseURL?: string
1814
- /** quick fix. such a "publication" term can have values either pmid or doi, need to generate different links
1815
- cannot use ds-defined callback to compute the link as the links are only generated on client
1816
- thus this work around for client code to apply the url-building logic
1817
- a doi value must be defined as "doi: 10.1038/s41408-025-01309-6", beginning with "doi: ", this allows client code to recognize it is doi;
1818
- otherwise it is treated as pmid and joined to pubmed link as-is
1819
- */
1820
- pmidOrDoi?: true
1821
- }
1822
-
1823
- type Variant2Samples = GdcApi & {
1824
- variantkey: string
1825
- twLst?: Tw[]
1826
- sunburst_twLst?: Tw[]
1827
- /** ds-supplied getter */
1828
- getMutatedSamples?: (q: any, ds: any) => void
1829
- }
1830
-
1831
- type MutationSet = {
1832
- snvindel: string
1833
- cnv: string
1834
- fusion: string
1835
- }
1836
-
1837
- /** different methods to return samples with assay availability info */
1838
- /** using dictionary term */
1839
- type DtAssayAvailabilityTerm = {
1840
- /** id of this assay term for this dt */
1841
- term_id: string
1842
- /** optional label */
1843
- label?: string
1844
- /** categories meaning the sample has this assay */
1845
- yes: { value: string[] }
1846
- /** categories meaning the sample doesn't have this assay */
1847
- no: { value: string[] }
1848
- /** dynamically generated cached sample lists on server launch, can also be ds-supplied.
1849
- each is a Set of sample integer id (non-gdc ds) or sample name (case uuid for gdc)
1850
- */
1851
- yesSamples?: Set<string | number>
1852
- noSamples?: Set<string | number>
1853
- }
1854
-
1855
- type DtAssayAvailabilityByOrigin = {
1856
- byOrigin: {
1857
- /** each key is an origin value or category */
1858
- [index: string]: DtAssayAvailabilityTerm
1859
- }
1860
- }
1861
-
1862
- /** assay availability can be set up as below, during server init it will query by assay dictionary terms to populate yes/no samples for each dt
1863
- or as in gdc, it is entirely setup ad-hoc
1864
- */
1865
- type Mds3AssayAvailability = {
1866
- /** object of key-value pairs. keys are dt values */
1867
- byDt: {
1868
- /** each index is a dt value */
1869
- [index: number]: DtAssayAvailabilityByOrigin | DtAssayAvailabilityTerm
1870
- }
1871
- /** if true, ds will use both filter and filter0 to filter samples (this is a temp quick fix)
1872
- */
1873
- useFilter0?: true
1874
- }
1875
-
1876
- // mds legacy; delete when all are migrated to mds3
1877
- type LegacyAssayAvailability = {
1878
- file?: string
1879
- assays?: {
1880
- id: string
1881
- name: string
1882
- type: string
1883
- values?: {
1884
- [index: string]: { label: string; color: string }
1885
- }
1886
- }[]
1887
- }
1888
-
1889
- export type CumBurdenData = {
1890
- /** directory containing cumulative burden data */
1891
- dir: string
1892
- files: {
1893
- fit: string
1894
- surv: string
1895
- sample: string
1896
- }
1897
- /** subdirectory containing bootstrap data */
1898
- bootsubdir: string
1899
- db: {
1900
- /** db file created by separate repo, pcb/utils/create.sql */
1901
- file: string
1902
- /** sqlite connection */
1903
- connection?: any
1904
- }
1905
- }
1906
-
1907
- //Shared with genome.ts
1908
- export type Cohort = {
1909
- /** if present, means correlation volcano plot analysis is enabled */
1910
- correlationVolcano?: CorrelationVolcano
1911
- cumburden?: CumBurdenData
1912
- db?: FileObj
1913
- /** customize the default chart to open on mass ui when there's no charts. if
1914
- * missing it opens dictionary ui */
1915
- defaultChartType?: string
1916
- massNav?: MassNav
1917
- matrixplots?: MatrixPlots
1918
- mutationset?: MutationSet[]
1919
- renamedChartTypes?: { singleCellPlot?: string; sampleScatter?: string }
1920
- /** if present, supplies premade scatter plots */
1921
- scatterplots?: Scatterplots
1922
- termdb: Termdb
1923
- hiddenTermIds?: string[]
1924
- boxplots?: BoxPlots
1925
- }
1926
-
1927
- /** Customizations specific to the mass nav component */
1928
- type MassNav = {
1929
- /** Customization for the tabs*/
1930
- tabs?: {
1931
- /** supported keys: about, charts, groups, filter
1932
- invalid key is ignored
1933
- when dslabel is too long to show in about tab middle row or to define alternative label,
1934
- do .tabs:{about:{mid:'alt label'}} */
1935
- about?: MassNavAboutTabEntry
1936
- charts?: MassNavTabEntry
1937
- groups?: MassNavTabEntry
1938
- filter?: MassNavTabEntry
1939
- }
1940
- /** customize background color of active navigation tab */
1941
- activeColor?: string
1942
- /** customize background color of active navigation tab on hover */
1943
- activeColorHover?: string
1944
- }
1945
-
1946
- type MassNavTabEntry = {
1947
- /** show in a specific order of tabs */
1948
- order?: number
1949
- /** label appearing in the top row in upper case */
1950
- top?: string
1951
- /** biggest label appearing in the middle row */
1952
- mid?: string
1953
- /** label appearing in the bottom row*/
1954
- btm?: string
1955
- /** if true, does not show the tab */
1956
- hide?: boolean
1957
- }
1958
-
1959
- type MassNavAboutTabEntry = MassNavTabEntry & {
1960
- /** html string, can include links to other
1961
- * pages (e.g., tutorials, google group) */
1962
- additionalInfo?: string
1963
- /** static html contents to show specifically in "about" tab subheader
1964
- * maybe used for other tabs as well.
1965
- * Will not render if cohort.termdb.selectCohort is present */
1966
- html?: string
1967
- /** declare data release. Shown with the server info */
1968
- dataRelease?: {
1969
- /** data release version */
1970
- version: string
1971
- /** link to data release page */
1972
- link: string
1973
- }
1974
- /** "active" items, shown as clickable buttons in about tab. click an item to launch a plot */
1975
- activeItems?: {
1976
- items: ActiveItem[]
1977
- // can add holderStyle to customize
1978
- }
1979
- }
1980
-
1981
- type ActiveItem = {
1982
- /** string or html to show inside the button for the item, potentially allow to include <image> as logo */
1983
- title: string
1984
- /** plot object describing the plot to be launched */
1985
- plot: object
1986
- }
1987
-
1988
- type Title = {
1989
- text: string
1990
- link?: string
1991
- }
1992
-
1993
- type ViewMode = {
1994
- byAttribute?: string
1995
- byInfo?: string
1996
- inuse?: boolean
1997
- }
1998
-
1999
- /*** types supporting Mds Dataset types ***/
2000
- type BaseMds = {
2001
- genome?: string //Not declared in TermdbTest
2002
- assayAvailability?: Mds3AssayAvailability | LegacyAssayAvailability
2003
- }
2004
-
2005
- export type Mds = BaseMds & {
2006
- // replaced by mds3!!!
2007
- isMds: boolean
2008
- about?: KeyVal[]
2009
- sampleAssayTrack?: FileObj
2010
- singlesamplemutationjson?: FileObj
2011
- cohort?: any
2012
- queries?: any
2013
- mutationAttribute?: any
2014
- version?: { label: string; link: string }
2015
- gene2mutcount?: any
2016
- locusAttribute?: any
2017
- alleleAttribute?: {
2018
- attributes: {
2019
- [attrName: string]: {
2020
- label: string
2021
- isnumeric: number
2022
- filter: number
2023
- }
2024
- }
2025
- }
2026
- }
2027
-
2028
- type PreInitStatus = {
2029
- /**
2030
- * status: 'OK' indicates a valid response
2031
- *
2032
- * status: 'recoverableError' may cause the server code to retry until the response is healthy,
2033
- * depending on the server startup code flow
2034
- *
2035
- * other status will be considered fatal error
2036
- * */
2037
- status: string
2038
- /** response message as related to the status */
2039
- message?: string
2040
- /** arbitrary response payload properties that is specific to a dataset */
2041
- [props: string]: any
2042
- }
2043
-
2044
- export type PreInit = {
2045
- /**
2046
- getStatus() is used to make sure that data sources are ready before starting to query data;
2047
- for example, wait on GDC API server to be healthy before starting to initialize,
2048
- or wait for intermittent network errors to clear on a network mount;
2049
- HTTP connection timeout errors or status 5xx are considered recoverable,
2050
- status 4xx are not considered recoverable (client-related request errors)
2051
- */
2052
- getStatus: () => Promise<PreInitStatus>
2053
- /**
2054
- * dev only, used to test preInit handling by simulating different
2055
- * responses in a known sequence of steps that may edit the preInit
2056
- * response
2057
- */
2058
- test?: {
2059
- /** the current number of calls to preInit.getStatus() */
2060
- numCalls: number
2061
- /**
2062
- * an arbitrary response payload property that is edited in mayEditResponse()
2063
- * for example, this is used to simulate a stale or current GDC version
2064
- * */
2065
- minor: number
2066
- /**
2067
- * a callback to potentially edit the preInit.getStatus() response
2068
- */
2069
- mayEditResponse: (response: any) => any
2070
- }
2071
- }
2072
-
2073
- /** see details in termdb.server.init.ts
2074
- */
2075
- export type isSupportedChartCallbacks = {
2076
- [chartType: string]: (f: any) => boolean | undefined
2077
- }
2078
-
2079
- export type Mds3 = BaseMds & {
2080
- /** set in initGenomesDs.js during launch, should use .genomename instead of .genome */
2081
- genomename?: string // use this
2082
- genome?: string // avoid using it
2083
- /** server-side genome obj to which this ds belongs to is attached here in initGenomesDs.js during launch,
2084
- so this obj can be conveniently available to server side functions without having to introduce extra param
2085
- TODO apply Genome type
2086
- */
2087
- genomeObj?: any
2088
- label?: Title
2089
- isMds3: boolean
2090
- loadWithoutBlocking?: boolean
2091
- preInit?: PreInit
2092
- init?: {
2093
- /** number of milliseconds to wait before calling th preInit.getStatus() again */
2094
- retryDelay?: number
2095
- /** maximum number of tries to complete initialization, including preInit.getStatus() before validation steps
2096
- * and the nonblocking steps after validation. Before the retryMax is reached, errors are considered recoverable;
2097
- * errors when retryMax is reached will be fatal. */
2098
- retryMax?: number
2099
- /** option to trigger mds3InitNonblocking() on this dataset */
2100
- hasNonblockingSteps?: boolean
2101
- /** server-computed cumulative count of the attempted init retries */
2102
- currentRetry?: number
2103
- /**
2104
- * optional callback to send notifications of pre-init errors
2105
- * for St. Jude, this may reuse code that post to Slack channel;
2106
- * in dev and other portals, this may use custom callbacks
2107
- * */
2108
- errorCallback?: (response: PreInitStatus) => void
2109
- }
2110
- /** optional callback to invoke non-blocking code after dataset query validation in mds3.init.js;
2111
- * for GDC, this callback is created after buildDictionary in initGdc.js
2112
- **/
2113
- initNonblocking?: (a: any) => void
2114
- viewModes?: ViewMode[]
2115
- dsinfo?: KeyVal[]
2116
- queries?: Mds3Queries
2117
- cohort?: Cohort
2118
- isSupportedChartOverride?: isSupportedChartCallbacks
2119
- // TODO FIXME nest termdb under cohort
2120
- termdb?: Termdb
2121
- validate_filter0?: (f: any) => void
2122
- ssm2canonicalisoform?: GdcApi
2123
- variant2samples?: Variant2Samples
2124
- scatterplots?: Scatterplots
2125
- /** disables switching to genomic mode for the protein view mds3 tk of this ds
2126
- works by preventing block gmmode menu from showing "genomic" option
2127
- is only passed via mds3 adhoc ds copy, but not termdbConfig
2128
- for lack of a better place to put this attribute, as it's not appropriate to put in queries.snvindel{}
2129
- as snvindel is optional so even a cnv-only ds can disable genomic mode
2130
- */
2131
- noGenomicMode4lollipopTk?: true
2132
- /** if ds.queries{} exists, server launch adds this convenient getter to wrap multiple queries data types
2133
- */
2134
- mayGetGeneVariantData?: (f: any) => void
2135
- /** optional key-value pairs to pass to genomic queries getter when called in mayGetGeneVariantData()
2136
- - only used in mayGetGeneVariantData! not in mds3.load.js
2137
- - for now only passed to snvindel.*.get and not yet other data types; add when needed
2138
- the param contents will be assessed by ds specific getter
2139
- this is serverside only, not passed to termdbConfig
2140
- */
2141
- mayGetGeneVariantDataParam?: {
2142
- [key: string]: any
2143
- /** this flag determines whether geneVariant data is filtered during post-processing
2144
- normally, geneVariant data is filtered during data query
2145
- but the filter structure used by gdc is not compatible with
2146
- geneVariant data filtering, so this flag is used to filter
2147
- data during post-processing */
2148
- postProcessDtFilter?: boolean
2149
- }
2150
- demoJwtInput?: {
2151
- [role: string]: {
2152
- datasets?: string[]
2153
- /** unstructured json object */
2154
- clientAuthResult?: object
2155
- // below will be assigned by /demoToken route handler if not specified
2156
- iat?: number // jwt issued at time, unix time in seconds
2157
- exp?: number // jwt expiration, unix time in seconds
2158
- email?: string
2159
- }
2160
- }
2161
- // !!! TODO: improve these type definitions below !!!
2162
- serverconfigFeatures?: any
2163
- /** a dataset may supply custom URL host and headers to use when making external API requests, such as for GDC */
2164
- getHostHeaders?: (
2165
- q?: any,
2166
- overrides?: { [key: string]: string }
2167
- ) => {
2168
- host: {
2169
- [apiStyle: string]: string
2170
- }
2171
- headers?: {
2172
- [field: string]: string
2173
- }
2174
- }
2175
- /** a dataset may track req.headers based on a req.query, abort signal, and/or filter0;
2176
- * this tracking is necessary since the req.headers is not necessarily passed through all to downstream code
2177
- * when processing external API-based dataset data, such as for GDC, but req.query.__abortSignal and filter0
2178
- * both much more likely to be passed as-is and make it to when `getHostHeaders()` is called */
2179
- trackReqHeaders?: (req: any, res: any) => void
2180
- /** a dataset may supply additional information to include in the `/healthcheck` response payload, nested under byDataset[dslabel][genome] = {} property */
2181
- getHealth?: (ds: any) => {
2182
- [key: string]: any
2183
- }
2184
- }
2185
-
2186
- export type Mds3WithCohort = Mds3 & {
2187
- cohort: Cohort
2188
- }