@sjcrh/proteinpaint-types 2.86.0 → 2.87.1

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 (233) hide show
  1. package/README.md +22 -0
  2. package/dist/brainImaging.js +11 -0
  3. package/dist/brainImagingSamples.js +11 -0
  4. package/dist/burden.js +11 -0
  5. package/dist/chunk-37ZPCVP5.js +111 -0
  6. package/dist/chunk-5GG2FNAY.js +62 -0
  7. package/dist/chunk-5JWTIWVB.js +222 -0
  8. package/dist/chunk-5RZYB4M4.js +171 -0
  9. package/dist/chunk-6EFB6ZMB.js +62 -0
  10. package/dist/chunk-6LFMFM2C.js +122 -0
  11. package/dist/chunk-7PMGKVWQ.js +62 -0
  12. package/dist/chunk-7Z3IHB43.js +152 -0
  13. package/dist/chunk-B3D26X6X.js +337 -0
  14. package/dist/chunk-BY2JABTF.js +256 -0
  15. package/dist/chunk-CETMA2FU.js +144 -0
  16. package/dist/chunk-DCN75URO.js +1740 -0
  17. package/dist/chunk-DIDZMC3G.js +96 -0
  18. package/dist/chunk-DKSPASWZ.js +4058 -0
  19. package/dist/chunk-EWRK4PKZ.js +62 -0
  20. package/dist/chunk-FDTUTGQG.js +288 -0
  21. package/dist/chunk-FZ6QOTGM.js +205 -0
  22. package/dist/chunk-GU7LIGHN.js +174 -0
  23. package/dist/chunk-IL33L6MY.js +126 -0
  24. package/dist/chunk-INDBFC54.js +1538 -0
  25. package/dist/chunk-IT7IGDC4.js +1697 -0
  26. package/dist/chunk-IWG5IPXG.js +3409 -0
  27. package/dist/chunk-JEQ3TBVQ.js +1472 -0
  28. package/dist/chunk-JPW6LFDQ.js +1507 -0
  29. package/dist/chunk-K2KQTFQI.js +113 -0
  30. package/dist/chunk-M33KP65Z.js +3347 -0
  31. package/dist/chunk-MUJUKENL.js +62 -0
  32. package/dist/chunk-N45Z3JCY.js +62 -0
  33. package/dist/chunk-OMHEDUNA.js +62 -0
  34. package/dist/chunk-OY3EKV7F.js +130 -0
  35. package/dist/chunk-Q56YNQFK.js +3417 -0
  36. package/dist/chunk-QDIIM52V.js +165 -0
  37. package/dist/chunk-QX7QLUKY.js +228 -0
  38. package/dist/chunk-RLFGMVJZ.js +234 -0
  39. package/dist/chunk-SDOWCOGK.js +96 -0
  40. package/dist/chunk-UCG25D2C.js +109 -0
  41. package/dist/chunk-UIU3IQH4.js +62 -0
  42. package/dist/chunk-W3F2RMPU.js +3494 -0
  43. package/dist/chunk-W3QYIXXF.js +273 -0
  44. package/dist/chunk-XGAOGA3F.js +159 -0
  45. package/dist/chunk-XJCQEOPB.js +61 -0
  46. package/dist/chunk-XLBSZOMF.js +117 -0
  47. package/dist/chunk-XQQ5G6N6.js +109 -0
  48. package/dist/chunk-Z6B6IQIY.js +1785 -0
  49. package/dist/dataset.js +11 -0
  50. package/dist/dsdata.js +11 -0
  51. package/dist/dzimages.js +11 -0
  52. package/dist/gdc.maf.js +11 -0
  53. package/dist/gdc.mafBuild.js +11 -0
  54. package/dist/gdc.topMutatedGenes.js +11 -0
  55. package/dist/genelookup.js +11 -0
  56. package/dist/genesetEnrichment.js +11 -0
  57. package/dist/genesetOverrepresentation.js +11 -0
  58. package/dist/healthcheck.js +11 -0
  59. package/dist/hicdata.js +11 -0
  60. package/dist/hicgenome.js +11 -0
  61. package/dist/hicstat.js +11 -0
  62. package/dist/index.js +347 -0
  63. package/dist/isoformlst.js +11 -0
  64. package/dist/ntseq.js +11 -0
  65. package/dist/pdomain.js +11 -0
  66. package/dist/samplewsimages.js +11 -0
  67. package/dist/snp.js +11 -0
  68. package/dist/termdb.DE.js +11 -0
  69. package/dist/termdb.boxplot.js +11 -0
  70. package/dist/termdb.categories.js +11 -0
  71. package/dist/termdb.cluster.js +11 -0
  72. package/dist/termdb.cohort.summary.js +11 -0
  73. package/dist/termdb.cohorts.js +11 -0
  74. package/dist/termdb.descrstats.js +11 -0
  75. package/dist/termdb.numericcategories.js +11 -0
  76. package/dist/termdb.percentile.js +11 -0
  77. package/dist/termdb.rootterm.js +11 -0
  78. package/dist/termdb.sampleImages.js +11 -0
  79. package/dist/termdb.singleSampleMutation.js +11 -0
  80. package/dist/termdb.singlecellDEgenes.js +11 -0
  81. package/dist/termdb.singlecellData.js +11 -0
  82. package/dist/termdb.singlecellSamples.js +11 -0
  83. package/dist/termdb.termchildren.js +11 -0
  84. package/dist/termdb.termsbyids.js +11 -0
  85. package/dist/termdb.topTermsByType.js +11 -0
  86. package/dist/termdb.topVariablyExpressedGenes.js +11 -0
  87. package/dist/termdb.violin.js +11 -0
  88. package/dist/tileserver.js +11 -0
  89. package/dist/wsimages.js +11 -0
  90. package/package.json +17 -15
  91. package/src/Mclass.ts +8 -0
  92. package/src/dataset.ts +1588 -0
  93. package/src/docs.json +16417 -0
  94. package/src/fileOrUrl.ts +15 -0
  95. package/src/filter.ts +125 -0
  96. package/src/genome.ts +123 -0
  97. package/src/index.ts +67 -0
  98. package/src/routes/brainImaging.ts +47 -0
  99. package/src/routes/brainImagingSamples.ts +25 -0
  100. package/src/routes/burden.ts +111 -0
  101. package/src/routes/dataset.ts +14 -0
  102. package/src/routes/dsdata.ts +14 -0
  103. package/src/routes/dzimages.ts +25 -0
  104. package/src/routes/errorResponse.ts +6 -0
  105. package/src/routes/filter.gdc.ts +15 -0
  106. package/src/routes/gdc.maf.ts +52 -0
  107. package/src/routes/gdc.mafBuild.ts +20 -0
  108. package/src/routes/gdc.topMutatedGenes.ts +37 -0
  109. package/src/routes/genelookup.ts +22 -0
  110. package/src/routes/genesetEnrichment.ts +60 -0
  111. package/src/routes/genesetOverrepresentation.ts +48 -0
  112. package/src/routes/healthcheck.ts +79 -0
  113. package/src/routes/hicdata.ts +48 -0
  114. package/src/routes/hicgenome.ts +50 -0
  115. package/src/routes/hicstat.ts +57 -0
  116. package/src/routes/isoformlst.ts +14 -0
  117. package/src/routes/ntseq.ts +14 -0
  118. package/src/routes/pdomain.ts +14 -0
  119. package/src/routes/routeApi.ts +41 -0
  120. package/src/routes/samplewsimages.ts +27 -0
  121. package/src/routes/snp.ts +13 -0
  122. package/src/routes/termdb.DE.ts +57 -0
  123. package/src/routes/termdb.boxplot.ts +78 -0
  124. package/src/routes/termdb.categories.ts +73 -0
  125. package/src/routes/termdb.cluster.ts +103 -0
  126. package/src/routes/termdb.cohort.summary.ts +14 -0
  127. package/src/routes/termdb.cohorts.ts +14 -0
  128. package/src/routes/termdb.descrstats.ts +78 -0
  129. package/src/routes/termdb.numericcategories.ts +32 -0
  130. package/src/routes/termdb.percentile.ts +65 -0
  131. package/src/routes/termdb.rootterm.ts +49 -0
  132. package/src/routes/termdb.sampleImages.ts +26 -0
  133. package/src/routes/termdb.singleSampleMutation.ts +29 -0
  134. package/src/routes/termdb.singlecellDEgenes.ts +41 -0
  135. package/src/routes/termdb.singlecellData.ts +69 -0
  136. package/src/routes/termdb.singlecellSamples.ts +46 -0
  137. package/src/routes/termdb.termchildren.ts +49 -0
  138. package/src/routes/termdb.termsbyids.ts +26 -0
  139. package/src/routes/termdb.topTermsByType.ts +32 -0
  140. package/src/routes/termdb.topVariablyExpressedGenes.ts +56 -0
  141. package/src/routes/termdb.violin.ts +122 -0
  142. package/src/routes/tileserver.ts +14 -0
  143. package/src/routes/wsimages.ts +24 -0
  144. package/src/terms/categorical.ts +106 -0
  145. package/src/terms/condition.ts +55 -0
  146. package/src/terms/geneExpression.ts +32 -0
  147. package/src/terms/geneVariant.ts +51 -0
  148. package/src/terms/metaboliteIntensity.ts +31 -0
  149. package/src/terms/numeric.ts +253 -0
  150. package/src/terms/q.ts +38 -0
  151. package/src/terms/samplelst.ts +41 -0
  152. package/src/terms/singleCellCellType.ts +22 -0
  153. package/src/terms/singleCellGeneExpression.ts +28 -0
  154. package/src/terms/snp.ts +28 -0
  155. package/src/terms/snps.ts +110 -0
  156. package/src/terms/term.ts +184 -0
  157. package/src/terms/tw.ts +38 -0
  158. package/src/terms/updated-types.ts +9 -0
  159. package/src/termsetting.ts +197 -0
  160. package/src/test/numeric.type.spec.ts +275 -0
  161. package/src/vocab.ts +37 -0
  162. package/dist/routes.ts +0 -28911
  163. package/src/Mclass.js +0 -0
  164. package/src/checkers/routes.js +0 -167
  165. package/src/dataset.js +0 -0
  166. package/src/fileOrUrl.js +0 -0
  167. package/src/filter.js +0 -0
  168. package/src/genome.js +0 -0
  169. package/src/index.js +0 -66
  170. package/src/routes/brainImaging.js +0 -11
  171. package/src/routes/brainImagingSamples.js +0 -11
  172. package/src/routes/burden.js +0 -44
  173. package/src/routes/dataset.js +0 -12
  174. package/src/routes/dsdata.js +0 -12
  175. package/src/routes/dzimages.js +0 -12
  176. package/src/routes/errorResponse.js +0 -0
  177. package/src/routes/filter.gdc.js +0 -0
  178. package/src/routes/gdc.maf.js +0 -17
  179. package/src/routes/gdc.mafBuild.js +0 -12
  180. package/src/routes/gdc.topMutatedGenes.js +0 -12
  181. package/src/routes/genelookup.js +0 -12
  182. package/src/routes/genesetEnrichment.js +0 -12
  183. package/src/routes/genesetOverrepresentation.js +0 -12
  184. package/src/routes/healthcheck.js +0 -23
  185. package/src/routes/hicdata.js +0 -12
  186. package/src/routes/hicgenome.js +0 -29
  187. package/src/routes/hicstat.js +0 -12
  188. package/src/routes/isoformlst.js +0 -12
  189. package/src/routes/ntseq.js +0 -12
  190. package/src/routes/pdomain.js +0 -12
  191. package/src/routes/routeApi.js +0 -0
  192. package/src/routes/samplewsimages.js +0 -12
  193. package/src/routes/snp.js +0 -11
  194. package/src/routes/termdb.DE.js +0 -13
  195. package/src/routes/termdb.boxplot.js +0 -12
  196. package/src/routes/termdb.categories.js +0 -48
  197. package/src/routes/termdb.cluster.js +0 -12
  198. package/src/routes/termdb.cohort.summary.js +0 -12
  199. package/src/routes/termdb.cohorts.js +0 -12
  200. package/src/routes/termdb.descrstats.js +0 -48
  201. package/src/routes/termdb.numericcategories.js +0 -12
  202. package/src/routes/termdb.percentile.js +0 -49
  203. package/src/routes/termdb.rootterm.js +0 -27
  204. package/src/routes/termdb.sampleImages.js +0 -12
  205. package/src/routes/termdb.singleSampleMutation.js +0 -12
  206. package/src/routes/termdb.singlecellDEgenes.js +0 -12
  207. package/src/routes/termdb.singlecellData.js +0 -12
  208. package/src/routes/termdb.singlecellSamples.js +0 -12
  209. package/src/routes/termdb.termchildren.js +0 -28
  210. package/src/routes/termdb.termsbyids.js +0 -12
  211. package/src/routes/termdb.topTermsByType.js +0 -12
  212. package/src/routes/termdb.topVariablyExpressedGenes.js +0 -12
  213. package/src/routes/termdb.violin.js +0 -49
  214. package/src/routes/tileserver.js +0 -12
  215. package/src/routes/wsimages.js +0 -12
  216. package/src/terms/categorical.js +0 -0
  217. package/src/terms/condition.js +0 -0
  218. package/src/terms/geneExpression.js +0 -0
  219. package/src/terms/geneVariant.js +0 -0
  220. package/src/terms/metaboliteIntensity.js +0 -0
  221. package/src/terms/numeric.js +0 -0
  222. package/src/terms/q.js +0 -0
  223. package/src/terms/samplelst.js +0 -0
  224. package/src/terms/singleCellCellType.js +0 -0
  225. package/src/terms/singleCellGeneExpression.js +0 -0
  226. package/src/terms/snp.js +0 -0
  227. package/src/terms/snps.js +0 -0
  228. package/src/terms/term.js +0 -0
  229. package/src/terms/tw.js +0 -0
  230. package/src/terms/updated-types.js +0 -0
  231. package/src/termsetting.js +0 -0
  232. package/src/test/numeric.type.spec.js +0 -117
  233. package/src/vocab.js +0 -0
@@ -0,0 +1,15 @@
1
+ type FileNotURL = {
2
+ /** File path from tp/ */
3
+ file: string
4
+ /** If file is provided, url should not be provided. Checked in validation type */
5
+ url?: never
6
+ }
7
+
8
+ type URLNotFile = {
9
+ /** If url is provided, file should not be provided. Checked in validation type */
10
+ file?: never
11
+ /** Remote file URL */
12
+ url: string
13
+ }
14
+
15
+ export type FileORURL = FileNotURL | URLNotFile
package/src/filter.ts ADDED
@@ -0,0 +1,125 @@
1
+ import { BaseValue } from './terms/term.ts'
2
+ import { NumericTerm, NumericBin } from './terms/numeric.ts'
3
+ import { CategoricalTerm } from './terms/categorical.ts'
4
+ import { GeneVariantTerm } from './terms/geneVariant.ts'
5
+ import { ConditionTerm } from './terms/condition.ts'
6
+
7
+ /*
8
+ --------EXPORTED--------
9
+ Tvs
10
+ LstEntry
11
+ Filter
12
+
13
+ */
14
+
15
+ /*** types supporting Tvs type ***/
16
+
17
+ export type BaseTvs = {
18
+ join?: string //and, or
19
+ isnot?: boolean
20
+ }
21
+
22
+ export type CategoricalTvs = BaseTvs & {
23
+ term: CategoricalTerm
24
+ groupset_label?: string
25
+ values: BaseValue[]
26
+ }
27
+
28
+ export type NumericTvs = BaseTvs & {
29
+ term: NumericTerm
30
+ ranges: NumericBin[]
31
+ // TODO: define uncomputable values object
32
+ values: {
33
+ key: string
34
+ value: number
35
+ uncomputable: true
36
+ label?: string
37
+ }[]
38
+ }
39
+
40
+ type GradeAndChildEntry = {
41
+ grade: number
42
+ grade_label: string
43
+ child_id: string | undefined
44
+ child_label: string
45
+ }
46
+
47
+ export type ConditionTvs = BaseTvs & {
48
+ term: ConditionTerm
49
+ value_by_max_grade?: boolean
50
+ value_by_most_recent?: boolean
51
+ value_by_computable_grade?: boolean
52
+ grade_and_child?: GradeAndChildEntry[]
53
+ }
54
+
55
+ type GeneVariantOrigin = 'somatic' | 'germline'
56
+
57
+ type SNVIndelClasses =
58
+ | 'M'
59
+ | 'E'
60
+ | 'F'
61
+ | 'N'
62
+ | 'S'
63
+ | 'D'
64
+ | 'I'
65
+ | 'P'
66
+ | 'L'
67
+ | 'Intron'
68
+ | 'Blank'
69
+ | 'WT'
70
+ | 'ITD'
71
+ | 'DEL'
72
+ | 'NLOSS'
73
+ | 'CLOSS'
74
+ | 'Utr3'
75
+ | 'Utr5'
76
+ | 'X'
77
+ | 'noncoding'
78
+ type SNVIndelTvsValue = {
79
+ dt: 1
80
+ mclassLst: SNVIndelClasses[]
81
+ mclassExcludeLst: SNVIndelClasses[]
82
+ origin?: GeneVariantOrigin
83
+ }
84
+
85
+ type CNVClasses = 'CNV_amp' | 'CNV_losss' | 'CNV_loh' | 'Blank' | 'WT'
86
+ type CNVTvsValue = {
87
+ dt: 4
88
+ mclassLst: CNVClasses[]
89
+ mclassExcludeLst: CNVClasses[]
90
+ origin?: GeneVariantOrigin
91
+ }
92
+
93
+ type SVClasses = 'SV' | 'Blank' | 'WT'
94
+ type SVTvsValue = {
95
+ dt: 5
96
+ mclassLst: SVClasses[]
97
+ mclassExcludeLst: SVClasses[]
98
+ origin?: GeneVariantOrigin
99
+ }
100
+
101
+ type FusionRNAClasses = 'Fuserna' | 'Blank' | 'WT'
102
+ type FusionTvsValue = {
103
+ dt: 2
104
+ mclassLst: FusionRNAClasses[]
105
+ mclassExcludeLst: FusionRNAClasses[]
106
+ origin?: GeneVariantOrigin
107
+ }
108
+
109
+ type GeneVariantTvsValue = SNVIndelTvsValue | CNVTvsValue | SVTvsValue | FusionTvsValue
110
+
111
+ type GeneVariantTvs = BaseTvs & {
112
+ term: GeneVariantTerm
113
+ values: GeneVariantTvsValue[]
114
+ }
115
+ /*** types supporting Filter type ***/
116
+
117
+ export type Tvs = CategoricalTvs | NumericTvs | ConditionTvs | GeneVariantTvs // | SampleLstTvs ...
118
+
119
+ export type Filter = {
120
+ type: 'lst'
121
+ in?: boolean
122
+ join: 'and' | 'or'
123
+ tag?: string // client-side only
124
+ lst: (Filter | Tvs)[]
125
+ }
package/src/genome.ts ADDED
@@ -0,0 +1,123 @@
1
+ import { Cohort } from './dataset.ts'
2
+
3
+ /********* server/genome ********
4
+
5
+ --------EXPORTED--------
6
+ MinGenome
7
+ Genome
8
+
9
+ */
10
+
11
+ type GeneDb = {
12
+ dbfile: string
13
+ }
14
+
15
+ type TermDbs = {
16
+ [key: string]: TermDbsEntry
17
+ }
18
+
19
+ type TermDbsEntry = {
20
+ label: string
21
+ cohort: Cohort
22
+ }
23
+
24
+ type DbStatement = {
25
+ dbfile: string
26
+ statement: string
27
+ }
28
+
29
+ type Snp = {
30
+ bigbedfile: string
31
+ }
32
+
33
+ type FimoMotif = {
34
+ db: string
35
+ annotationfile: string
36
+ }
37
+
38
+ type TrackCategoryEntry = {
39
+ color: string
40
+ label: string
41
+ }
42
+
43
+ type TrackCategories = {
44
+ [index: string]: TrackCategoryEntry | undefined
45
+ }
46
+
47
+ type Track = {
48
+ __isgene?: boolean
49
+ translatecoding?: boolean
50
+ file: string
51
+ type: string
52
+ name: string
53
+ categories?: TrackCategories
54
+ stackheight?: number
55
+ stackspace?: number
56
+ vpad?: number
57
+ color?: string
58
+ onerow?: boolean
59
+ }
60
+
61
+ type DefaultCoord = {
62
+ chr: string
63
+ start: number
64
+ stop: number
65
+ gene?: string
66
+ }
67
+
68
+ type GeneSet = {
69
+ name: string
70
+ lst: string[]
71
+ }
72
+
73
+ type HicEnzymeFragment = {
74
+ enzyme: string
75
+ file: string
76
+ }
77
+
78
+ type HicDomainSetEntry = {
79
+ name: string
80
+ longname: string
81
+ file: string
82
+ }
83
+
84
+ type HicDomainSet = {
85
+ [index: string]: HicDomainSetEntry
86
+ }
87
+
88
+ type HicDomainGrpEntry = {
89
+ name: string
90
+ reference: string
91
+ sets: HicDomainSet
92
+ }
93
+
94
+ type HicDomainGroups = {
95
+ [index: string]: HicDomainGrpEntry
96
+ }
97
+
98
+ type HicDomain = {
99
+ [index: string]: HicDomainGroups
100
+ }
101
+
102
+ //Separated to force g.tracks as required, see hgvirus.ts
103
+ export type MinGenome = {
104
+ isMinGenome?: boolean
105
+ species: string
106
+ genomefile: string
107
+ genedb: GeneDb
108
+ defaultcoord: DefaultCoord
109
+ hicenzymefragment?: HicEnzymeFragment[]
110
+ majorchr: string
111
+ }
112
+
113
+ export type Genome = MinGenome & {
114
+ termdbs?: TermDbs
115
+ proteindomain?: DbStatement
116
+ repeatmasker?: DbStatement
117
+ snp?: Snp
118
+ fimo_motif?: FimoMotif
119
+ tracks?: Track[]
120
+ geneset?: GeneSet[]
121
+ hicdomain?: HicDomain
122
+ minorchr?: string
123
+ }
package/src/index.ts ADDED
@@ -0,0 +1,67 @@
1
+ // please list in alphanumeric order, include file extension
2
+ export * from './genome.ts'
3
+ export * from './dataset.ts'
4
+ export * from './termsetting.ts'
5
+ export * from './filter.ts'
6
+ export * from './routes/routeApi.ts'
7
+ export * from './routes/brainImaging.ts'
8
+ export * from './routes/brainImagingSamples.ts'
9
+ export * from './routes/burden.ts'
10
+ export * from './routes/dataset.ts'
11
+ export * from './routes/dsdata.ts'
12
+ export * from './routes/dzimages.ts'
13
+ export * from './routes/errorResponse.ts'
14
+ export * from './routes/filter.gdc.ts'
15
+ export * from './routes/gdc.maf.ts'
16
+ export * from './routes/gdc.mafBuild.ts'
17
+ export * from './routes/gdc.topMutatedGenes.ts'
18
+ export * from './routes/genelookup.ts'
19
+ export * from './routes/genesetEnrichment.ts'
20
+ export * from './routes/genesetOverrepresentation.ts'
21
+ export * from './routes/healthcheck.ts'
22
+ export * from './routes/hicdata.ts'
23
+ export * from './routes/hicgenome.ts'
24
+ export * from './routes/hicstat.ts'
25
+ export * from './routes/isoformlst.ts'
26
+ export * from './routes/ntseq.ts'
27
+ export * from './routes/pdomain.ts'
28
+ export * from './routes/samplewsimages.ts'
29
+ export * from './routes/snp.ts'
30
+ export * from './routes/termdb.boxplot.ts'
31
+ export * from './routes/termdb.categories.ts'
32
+ export * from './routes/termdb.cluster.ts'
33
+ export * from './routes/termdb.cohort.summary.ts'
34
+ export * from './routes/termdb.cohorts.ts'
35
+ export * from './routes/termdb.DE.ts'
36
+ export * from './routes/termdb.descrstats.ts'
37
+ export * from './routes/termdb.numericcategories.ts'
38
+ export * from './routes/termdb.percentile.ts'
39
+ export * from './routes/termdb.rootterm.ts'
40
+ export * from './routes/termdb.termchildren.ts'
41
+ export * from './routes/termdb.sampleImages.ts'
42
+ export * from './routes/termdb.singlecellData.ts'
43
+ export * from './routes/termdb.singlecellDEgenes.ts'
44
+ export * from './routes/termdb.singlecellSamples.ts'
45
+ export * from './routes/termdb.singleSampleMutation.ts'
46
+ export * from './routes/termdb.termsbyids.ts'
47
+ export * from './routes/termdb.termchildren.ts'
48
+ export * from './routes/termdb.topTermsByType.ts'
49
+ export * from './routes/termdb.topVariablyExpressedGenes.ts'
50
+ export * from './routes/termdb.violin.ts'
51
+ export * from './routes/tileserver.ts'
52
+ export * from './routes/wsimages.ts'
53
+ export * from './terms/categorical.ts'
54
+ export * from './terms/condition.ts'
55
+ export * from './terms/numeric.ts'
56
+ export * from './terms/geneVariant.ts'
57
+ export * from './terms/geneExpression.ts'
58
+ export * from './terms/metaboliteIntensity.ts'
59
+ export * from './terms/singleCellCellType.ts'
60
+ export * from './terms/singleCellGeneExpression.ts'
61
+ export * from './terms/snp.ts'
62
+ export * from './terms/snps.ts'
63
+ export * from './terms/samplelst.ts'
64
+ export * from './terms/q.ts'
65
+ export * from './terms/term.ts'
66
+ export * from './terms/tw.ts'
67
+ export * from './vocab.ts'
@@ -0,0 +1,47 @@
1
+ import type { CategoricalTW } from '../terms/categorical.ts'
2
+ import type { RoutePayload } from './routeApi.ts'
3
+
4
+ export type BrainImagingRequest = {
5
+ /** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
6
+ genome: string
7
+ /** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
8
+ dslabel: string
9
+ /** a user-defined brain template label in dataset file, such as Ref1, Ref2 */
10
+ refKey: string
11
+ /** the slice index of sagittal, coronal and axial planes*/
12
+ l?: string
13
+ f?: string
14
+ t?: string
15
+ /** the sample names selected by the users to plot on brain template */
16
+ selectedSampleFileNames: string[]
17
+ /* the term to divide the samples into groups */
18
+ divideByTW?: CategoricalTW
19
+ /* the term to color the samples based on their category */
20
+ overlayTW?: CategoricalTW
21
+ /* the term categories that were filtered out */
22
+ legendFilter?: string[]
23
+ }
24
+
25
+ export type BrainImagingResponse = {
26
+ /** the brain imaging plot */
27
+ brainImage: string
28
+ plane?: any
29
+ legend?: {
30
+ [key: string]: {
31
+ color: string
32
+ maxLength: number
33
+ crossedOut: boolean
34
+ }
35
+ }
36
+ }
37
+
38
+ export type FilesByCategory = { [category: string]: { samples: string[]; color: string } }
39
+
40
+ export const brainImagingPayload: RoutePayload = {
41
+ request: {
42
+ typeId: 'BrainImagingRequest'
43
+ },
44
+ response: {
45
+ typeId: 'BrainImagingResponse'
46
+ }
47
+ }
@@ -0,0 +1,25 @@
1
+ import type { RoutePayload } from './routeApi.ts'
2
+
3
+ export type BrainImagingSamplesRequest = {
4
+ /** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
5
+ genome: string
6
+ /** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
7
+ dslabel: string
8
+ /** a user-defined brain template label in dataset file, such as Ref1, Ref2 */
9
+ refKey: string
10
+ }
11
+
12
+ export type BrainImagingSamplesResponse = {
13
+ samples: BrainSample[]
14
+ }
15
+
16
+ export type BrainSample = { [key: string]: string }
17
+
18
+ export const brainImagingSamplesPayload: RoutePayload = {
19
+ request: {
20
+ typeId: 'BrainImagingSamplesRequest'
21
+ },
22
+ response: {
23
+ typeId: 'BrainImagingSamplesResponse'
24
+ }
25
+ }
@@ -0,0 +1,111 @@
1
+ import type { RoutePayload } from './routeApi.js'
2
+
3
+ export type BurdenRequest = {
4
+ /** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
5
+ genome: string
6
+ /** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
7
+ dslabel: string
8
+ /** the diagnosis group:
9
+ * 1= "Acute lymphoblastic leukemia (ALL)"
10
+ * 2= "Acute Myeloid Leukemia (AML)"
11
+ * 3= "Hodgkin lymphoma (HL)"
12
+ * 4= "Non-Hodgkin lymphoma (NHL)"
13
+ * 5= "Central nervous system (CNS)"
14
+ * 6= "Bone tumor (BT)"
15
+ * 7= "Soft Tissue Sarcoma (STS)"
16
+ * 8= "Wilms tumor (WT)"
17
+ * 9= "Neuroblastoma (NB)"
18
+ * 10= "Retinoblastoma (Rb)"
19
+ * 11= "Germ cell tumor (GCT)"
20
+ */
21
+ diaggrp: number
22
+ /** sex: 0=Female, 1=Male */
23
+ sex: number
24
+ /** race or ethnicity: 1=Yes, 0=No */
25
+ white: number
26
+ /** Age of diagnosis, in years */
27
+ agedx: number
28
+ /** bleomycin: a chemotherapy treatment drug, mg/m^2 */
29
+ bleo: number
30
+ /** Etoposide: a chemotherapy treatment drug, mg/m^2 */
31
+ etop: number
32
+ /** Cisplatin: a chemotherapy treatment drug, mg/m^2 */
33
+ cisp: number
34
+ /** Carboplatin: a class of chemotherapy treatment drugs, mg/m^2 */
35
+ carbo: number
36
+ /** Steriods: a class of chemotherapy treatment drugs, mg/m^2 */
37
+ steriod: number
38
+ /** Vincristine: a chemotherapy treatment drug, mg/m^2 */
39
+ vcr: number
40
+ /** High-dose methothrexate: a chemotherapy treatment drug, mg/m^2 */
41
+ hdmtx: number
42
+ /** Intrathecal methothrexate: a chemotherapy treatment drug, mg/m^2 */
43
+ itmt: number
44
+ /** Cyclophosphamide: a chemotherapy treatment drug, mg/m^2 */
45
+ ced: number
46
+ /** Anthracycline: a chemotherapy treatment drug, mg/m^2 */
47
+ dox: number
48
+ /** Heart radiation, Gy */
49
+ heart: number
50
+ /** Brain radiation, Gy */
51
+ brain: number
52
+ /** Abdominal radiation, Gy */
53
+ abd: number
54
+ /** Pelvic radiation, Gy */
55
+ pelvis: number
56
+ /** Chest radiation, Gy */
57
+ chest: number
58
+ }
59
+
60
+ // tentative code for migrating api code from `server/routes` code
61
+ export type BurdenResponse = {
62
+ status: string
63
+ keys: string[]
64
+ rows: number[][]
65
+ }
66
+
67
+ // tentative code to generate runtime "type" checkers, requires tsx/bundler to have transform for typia createValidate to work
68
+ // export const validBurdenRequest = createValidate<BurdenRequest>()
69
+ // export const validBurdenResponse = createValidate<BurdenResponse>()
70
+
71
+ export const burdenPayload: RoutePayload = {
72
+ request: {
73
+ typeId: 'BurdenRequest'
74
+ },
75
+ response: {
76
+ typeId: 'BurdenResponse'
77
+ },
78
+ examples: [
79
+ {
80
+ request: {
81
+ body: {
82
+ genome: 'hg38',
83
+ // TODO: !!! use hg38-test and TermdbTest !!!
84
+ dslabel: 'SJLife',
85
+ diaggrp: 5,
86
+ sex: 1,
87
+ white: 1,
88
+ agedx: 1,
89
+ bleo: 0,
90
+ etop: 0,
91
+ cisp: 0,
92
+ carbo: 0,
93
+ steriod: 0,
94
+ vcr: 0,
95
+ hdmtx: 0,
96
+ itmt: 0,
97
+ ced: 0,
98
+ dox: 0,
99
+ heart: 0,
100
+ brain: 0,
101
+ abd: 0,
102
+ pelvis: 0,
103
+ chest: 0
104
+ }
105
+ },
106
+ response: {
107
+ header: { status: 200 }
108
+ }
109
+ }
110
+ ]
111
+ }
@@ -0,0 +1,14 @@
1
+ import type { RoutePayload } from './routeApi.js'
2
+
3
+ export type DatasetRequest = any
4
+ export type DatasetResponse = any
5
+
6
+ export const datasetPayload: RoutePayload = {
7
+ request: {
8
+ typeId: 'DatasetRequest'
9
+ },
10
+ response: {
11
+ typeId: 'DatasetResponse'
12
+ }
13
+ // examples: []
14
+ }
@@ -0,0 +1,14 @@
1
+ import type { RoutePayload } from './routeApi.js'
2
+
3
+ export type DsDataRequest = any
4
+ export type DsDataResponse = any
5
+
6
+ export const dsDataPayload: RoutePayload = {
7
+ request: {
8
+ typeId: 'DsDataRequest'
9
+ },
10
+ response: {
11
+ typeId: 'DsDataResponse'
12
+ }
13
+ // examples: []
14
+ }
@@ -0,0 +1,25 @@
1
+ import type { RoutePayload } from './routeApi.js'
2
+
3
+ export type DZImagesRequest = {
4
+ genome: string
5
+ dslabel: string
6
+ file: string
7
+
8
+ // params: {
9
+ // [key: string]: any
10
+ // }
11
+ sampleId?: string
12
+ sample_id?: string
13
+ }
14
+
15
+ export type DZImagesResponse = string
16
+
17
+ export const dzImagesPayload: RoutePayload = {
18
+ request: {
19
+ typeId: 'DZImagesRequest'
20
+ },
21
+ response: {
22
+ typeId: 'DZImagesResponse'
23
+ }
24
+ // examples: []
25
+ }
@@ -0,0 +1,6 @@
1
+ export type ErrorResponse = {
2
+ /* Status code. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */
3
+ status: number
4
+ /* Msg */
5
+ error: string
6
+ }
@@ -0,0 +1,15 @@
1
+ /* the gdc cohort filter object
2
+ is invisible on pp ui
3
+ always used as "filter0" property in pp client code and in request to pp back
4
+ pp does not compute on it, on pp backend, it's passed to gdc api queries
5
+
6
+ FIXME type is not properly defined yet
7
+ */
8
+ export type GdcFilter0 = {
9
+ op: string
10
+ // TODO: this should allow an array of objects, and/or nesting ???
11
+ content: {
12
+ field: string
13
+ value: string
14
+ }
15
+ }
@@ -0,0 +1,52 @@
1
+ import type { RoutePayload } from './routeApi.js'
2
+ //import GdcFilter0 from './filter.gdc'
3
+
4
+ // an object representing gdc maf file, to be shown on client table
5
+
6
+ export type File = {
7
+ /** A string representing the file's UUID (Universally Unique Identifier) , can be accessed via https://api.gdc.cancer.gov/data/<uuid>*/
8
+ id: string
9
+ /** A string representing a submitter ID for the case associated with this file */
10
+ case_submitter_id: string
11
+ // case uuid
12
+ case_uuid: string
13
+ /** An integer as the byte size of this file, compressed */
14
+ file_size: number
15
+ /** Array of strings, each is a sample type, for all samples involved in generating the maf file */
16
+ sample_types?: string[]
17
+ /** A string representing the type of workflow used to generate or process this file */
18
+ //workflow_type: string
19
+ /** A string as the project id of the case */
20
+ project_id: string
21
+ }
22
+
23
+ enum ExperimentalStrategy {
24
+ targeted = 'Targeted Sequencing',
25
+ wxs = 'WXS'
26
+ }
27
+
28
+ export type GdcMafRequest = {
29
+ /** Name of exp strategy to get maf files for */
30
+ experimentalStrategy: ExperimentalStrategy
31
+ /** JSON, optional GDC cohort filter to restrict cases; if supplied, will only get maf files for these cases. the filter is readonly and pass to GDC API query */
32
+ filter0?: any
33
+ }
34
+
35
+ export type GdcMafResponse = {
36
+ /** List of file objects passing filter and to be displayed on client */
37
+ files: File[]
38
+ /** Total number of files found by API (in case bigger than files.length) */
39
+ filesTotal: number
40
+ /** Maximum total size of maf files allowed, for indicating on ui while selecting files */
41
+ maxTotalSizeCompressed: number
42
+ }
43
+
44
+ export const gdcMafPayload: RoutePayload = {
45
+ request: {
46
+ typeId: 'GdcMafRequest'
47
+ },
48
+ response: {
49
+ typeId: 'GdcMafResponse'
50
+ }
51
+ //examples: []
52
+ }
@@ -0,0 +1,20 @@
1
+ import type { RoutePayload } from './routeApi.ts'
2
+
3
+ export type GdcMafBuildRequest = {
4
+ /** List of input file uuids in gdc */
5
+ fileIdLst: string[]
6
+ /** List of columns in output MAF file */
7
+ columns: string[]
8
+ }
9
+
10
+ export type GdcMafBuildResponse = any
11
+
12
+ export const GdcMafPayload: RoutePayload = {
13
+ request: {
14
+ typeId: 'GdcMafBuildRequest'
15
+ },
16
+ response: {
17
+ typeId: 'GdcMafBuildResponse'
18
+ }
19
+ //examples: []
20
+ }