@sjcrh/proteinpaint-types 2.188.1 → 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-46YIGVUP.js +0 -908
  18. package/dist/chunk-4EAGOSMN.js +0 -128
  19. package/dist/chunk-5H2LJKPX.js +0 -104
  20. package/dist/chunk-5L4VF3ZL.js +0 -266
  21. package/dist/chunk-5N7V62ZL.js +0 -231
  22. package/dist/chunk-62XTWOVJ.js +0 -273
  23. package/dist/chunk-6GKG55BT.js +0 -232
  24. package/dist/chunk-7MUISZHS.js +0 -61
  25. package/dist/chunk-7OA6G77M.js +0 -113
  26. package/dist/chunk-AGMCAWBR.js +0 -454
  27. package/dist/chunk-BCBSHTHS.js +0 -75
  28. package/dist/chunk-BZVFHGN3.js +0 -350
  29. package/dist/chunk-CQXBQY2H.js +0 -161
  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-DUCWIRPX.js +0 -311
  34. package/dist/chunk-EIJT53QB.js +0 -240
  35. package/dist/chunk-EOKM345J.js +0 -222
  36. package/dist/chunk-FK7OCBPT.js +0 -341
  37. package/dist/chunk-FMC4G5BP.js +0 -62
  38. package/dist/chunk-G4MMYXP6.js +0 -405
  39. package/dist/chunk-GTS2G4R4.js +0 -62
  40. package/dist/chunk-HQV2A7JV.js +0 -62
  41. package/dist/chunk-IS74WYQF.js +0 -207
  42. package/dist/chunk-JDF7A2LY.js +0 -361
  43. package/dist/chunk-JEQGBUK2.js +0 -5993
  44. package/dist/chunk-K4FSDTDW.js +0 -109
  45. package/dist/chunk-KCMPDEH7.js +0 -62
  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-PTE2I7DF.js +0 -91
  55. package/dist/chunk-Q3HGHP3J.js +0 -174
  56. package/dist/chunk-QNH3PKJK.js +0 -343
  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-SZZXZZKO.js +0 -3991
  61. package/dist/chunk-TD4YLTHL.js +0 -158
  62. package/dist/chunk-TEXOICIS.js +0 -11810
  63. package/dist/chunk-THQOFV2K.js +0 -205
  64. package/dist/chunk-TQQWSHFM.js +0 -5980
  65. package/dist/chunk-U3BTVE5T.js +0 -111
  66. package/dist/chunk-UBOVHONH.js +0 -62
  67. package/dist/chunk-ULKGA7YY.js +0 -158
  68. package/dist/chunk-UYJA4UM7.js +0 -97
  69. package/dist/chunk-V3JDD3ZG.js +0 -3671
  70. package/dist/chunk-VJB6F2HL.js +0 -309
  71. package/dist/chunk-VUKRI3TG.js +0 -164
  72. package/dist/chunk-W3F3CLYP.js +0 -61
  73. package/dist/chunk-X4JBWMXY.js +0 -130
  74. package/dist/chunk-X5E72ZXA.js +0 -5979
  75. package/dist/chunk-YNHC5SXO.js +0 -1780
  76. package/dist/chunk-YPEFUAJW.js +0 -62
  77. package/dist/chunk-YSTMGNYR.js +0 -113
  78. package/dist/chunk-YW5G4M5D.js +0 -158
  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 -2186
  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 -48
  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 -220
  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
@@ -1,173 +0,0 @@
1
- import type { RoutePayload } from './routeApi.js'
2
- import type { Filter } from '../filter.ts'
3
-
4
- /** GRIN2 request */
5
- export type GRIN2Request = {
6
- /** Genome build identifier (e.g., 'hg38', 'hg19') */
7
- genome: string
8
-
9
- /** Dataset label within the genome */
10
- dslabel: string
11
-
12
- /** Device pixel ratio for rendering */
13
- devicePixelRatio?: number
14
-
15
- /** Desired plot width in pixels (default: 1000) */
16
- width?: number
17
-
18
- /** Desired plot height in pixels (default: 400) */
19
- height?: number
20
-
21
- /** Radius of the PNG rendered dots (default: 2) */
22
- pngDotRadius?: number
23
-
24
- /** Lesion type colors */
25
- lesionTypeColors?: any
26
-
27
- /** Threshold for q-values to be included as interactive dots, have significance indicators in the table and tooltips */
28
- qValueThreshold?: number
29
-
30
- /** Log cutoff for Manhattan plot rendering before we scale the y-axis (default: 40).
31
- * This is not user defined but rather a constant defined in #shared/manhattan.js.
32
- * Sending it with request for consistency. In future we will allow user to set scale value or disable scaling if they wish */
33
- logCutoff?: number
34
-
35
- /** Maximum number of points to cap the dynamic y-axis in Manhattan plots */
36
- maxCappedPoints: number
37
-
38
- /** Absolute maximum cap for the y-axis in Manhattan plots regardless of its data distribution */
39
- hardCap: number
40
-
41
- /** Bin size for Manhattan plot histogram bin size. Used in the calculation of dynamic y-axis capping process (default: 10) */
42
- binSize: number
43
-
44
- /** pp filter */
45
- filter?: Filter
46
-
47
- /** Options for filtering SNV/indel file content */
48
- snvindelOptions?: {
49
- /** Minimum total depth of returned SNV/indel files */
50
- minTotalDepth?: number // Default: 10
51
- /** Minimum alternate allele count of returned SNV/indel files */
52
- minAltAlleleCount?: number // Default: 2
53
- /** String array of consequence types to include */
54
- consequences?: string[]
55
- /** Maximum mutation count cutoff for highly mutated scenarios */
56
- hyperMutator?: number // Default: 1000
57
- /** Number of bases to include as 5' flank around the mutation position */
58
- fivePrimeFlankSize?: number
59
- /** Number of bases to include as 3' flank around the mutation position */
60
- threePrimeFlankSize?: number
61
- /** MAF filter object (tvslst) to filter mutations by allele frequency */
62
- mafFilter?: Filter
63
- }
64
-
65
- /** Options for filtering CNV file content */
66
- cnvOptions?: {
67
- /** Threshold for copy number loss detection */
68
- lossThreshold?: number // Default: -0.4
69
- /** Threshold for copy number gain detection */
70
- gainThreshold?: number // Default: 0.3
71
- /** Maximum segment length to include (0 = no filter) */
72
- maxSegLength?: number // Default: 0
73
- /** Hypermutator max cut off for CNVs per case */
74
- hyperMutator?: number // Default: 500
75
- /** Number of bases to include as 5' flank around the segment position */
76
- fivePrimeFlankSize?: number
77
- /** Number of bases to include as 3' flank around the segment position */
78
- threePrimeFlankSize?: number
79
- }
80
-
81
- /** Options for filtering fusion file content */
82
- fusionOptions?: {
83
- /** Number of bases to include as 5' flank around the fusion position */
84
- fivePrimeFlankSize?: number
85
- /** Number of bases to include as 3' flank around the fusion position */
86
- threePrimeFlankSize?: number
87
- }
88
-
89
- /** Options for filtering structural variant file content */
90
- svOptions?: {
91
- /** Number of bases to include as 5' flank around the sv position */
92
- fivePrimeFlankSize?: number
93
- /** Number of bases to include as 3' flank around the sv position */
94
- threePrimeFlankSize?: number
95
- }
96
- maxGenesToShow?: number // Default: 500
97
- }
98
-
99
- /** Simple Interface to store the complex plot data from the rust Manhattan plot */
100
- interface grin2PlotData {
101
- points: Array<{
102
- x: number // X-axis position (base pair/genomic position in the pixel space)
103
- y: number // Y-axis position (-log10(q-value) in the pixel space)
104
- color: string // Point color (hexadecimal string representing a color for mutation type)
105
- type: string // Mutation type (e.g., 'mutation', 'loss', 'gain', 'fusion', 'sv')
106
- gene: string // Gene symbol
107
- chrom: string // Chromosome in the form of <chrX>
108
- start: number // Starting position of this chromosome in base pairs/genomic coordinates. Used in hover table
109
- end: number // Ending position of this chromosome in base pairs/genomic coordinates
110
- pos: number // Mid-point of this chromosome in base pairs/genomic coordinates
111
- nsubj: number // Number of subjects with this mutation. Used for hover table subject count
112
- }>
113
- chrom_data: Record<
114
- // Data for chromosome labels and positioning on the x-axis
115
- string,
116
- {
117
- start: number
118
- size: number
119
- center: number
120
- }
121
- >
122
- total_genome_length: number // Gives us the full length of the genome so we can easily append x buffer space when building d3 x-axis
123
- has_capped_points: boolean // Whether we have capped the y-axis due to q-values exceeding the cap
124
- }
125
-
126
- /**
127
- * Response for GRIN2 analysis run
128
- */
129
- export type GRIN2Response = {
130
- /** Status of the analysis */
131
- status: 'success' | 'error'
132
- /** Error message if status is 'error' */
133
- error?: string
134
- /** Base64-encoded PNG Manhattan plot image */
135
- pngImg?: string
136
- /** Plot data for the Manhattan plot */
137
- plotData?: grin2PlotData
138
- /** Download status/info */
139
- download?: any
140
- /** Sortable table of top genes identified by GRIN2 */
141
- topGeneTable?: {
142
- /** Column definitions with labels and sort capabilities */
143
- columns: Array<{
144
- label: string
145
- sortable: boolean
146
- }>
147
- /** Data rows with gene information and statistics */
148
- rows: Array<
149
- Array<{
150
- value: string | number
151
- }>
152
- >
153
- }
154
-
155
- stats?: {
156
- lst: Array<{
157
- name: string
158
- rows: string[][]
159
- }>
160
- }
161
- }
162
-
163
- /**
164
- * Route payload definitions for type checking
165
- */
166
- export const GRIN2Payload: RoutePayload = {
167
- request: {
168
- typeId: 'GRIN2Request'
169
- },
170
- response: {
171
- typeId: 'GRIN2Response'
172
- }
173
- }
@@ -1,80 +0,0 @@
1
- import type { RoutePayload } from './routeApi.js'
2
-
3
- export type HealthCheckRequest = {
4
- dslabel?: string
5
- }
6
-
7
- /**
8
- * Information aboute the server build version and dates,
9
- * including the date when the server was last launched
10
- */
11
- export type VersionInfo = {
12
- pkgver: string
13
- codedate: string
14
- launchdate: string
15
- deps: {
16
- [pkgName: string]: {
17
- /** the version as found in node_modules/[package]/package.json */
18
- installed?: string
19
- /** the version as entered in the project's package.dependencies */
20
- entry?: string
21
- }
22
- }
23
- }
24
-
25
- type BuildByGenome = {
26
- [index: string]: GenomeBuildInfo
27
- }
28
-
29
- export type GenomeBuildInfo = {
30
- genedb: DbInfo
31
- termdbs?: {
32
- [index: string]: DbInfo
33
- }
34
- }
35
-
36
- type DbInfo = {
37
- buildDate: string // "unknown" or a Date-convertible string
38
- tables?: {
39
- [index: string]: number
40
- }
41
- }
42
-
43
- /**
44
- * Server status and data related to it's health
45
- */
46
- export type HealthCheckResponse = {
47
- status: 'ok' | 'error'
48
- genomes: BuildByGenome
49
- versionInfo: VersionInfo
50
- byDataset?: {
51
- [dslabel: string]: any
52
- }
53
- auth?: {
54
- errors?: string[]
55
- }
56
- w?: number[]
57
- rs?: number
58
- dsInitStatus: any[]
59
- }
60
-
61
- export const healthcheckPayload: RoutePayload = {
62
- request: {
63
- typeId: 'HealthCheckRequest'
64
- },
65
- response: {
66
- typeId: 'HealthCheckResponse'
67
- },
68
- examples: [
69
- {
70
- request: { body: {} }
71
- //response: {}
72
- },
73
- {
74
- request: {
75
- body: { dsLabel: 'TermdbTest' }
76
- }
77
- //response: {}
78
- }
79
- ]
80
- }
@@ -1,48 +0,0 @@
1
- import type { FileORURL } from '../fileOrUrl.ts'
2
- import type { RoutePayload } from './routeApi.ts'
3
-
4
- export type BaseHicRequest = FileORURL & {
5
- /** Value relates to the 1st parameter of straw tool, which accepts 'observed', 'expected', 'oe', 'norm', and 'distance' */
6
- matrixType: 'observed' | 'expected' | 'oe' | 'log(oe)'
7
- /** Either a base pair or fragment resolution calculated from the array*/
8
- resolution: number
9
- /** Normalization method, an option read from the file or NONE */
10
- nmeth: string
11
- }
12
-
13
- export type HicdataRequest = BaseHicRequest & {
14
- /** Position of first locus, in the format of chr:start:stop */
15
- pos1: string
16
- /** Position of second locus, in the format of chr:start:stop */
17
- pos2: string // portal code must validate pos1 and pos2 values, to prevent xxx:456-321
18
- /** If is in fragment resolution */
19
- isfrag?: boolean
20
- /** Minimum value cutoff */
21
- mincutoff?: number
22
- }
23
-
24
- /** Item typed for documentation/explanation purposes*/
25
- export type XYZCoord = [
26
- /** position 1, x coordinate */
27
- number,
28
- /** position 2, y coordinate */
29
- number,
30
- /** inter-loci contact value */
31
- number
32
- ]
33
-
34
- export type HicdataResponse = {
35
- /** Error message to display on the client, if applicable */
36
- error?: string
37
- items: XYZCoord[]
38
- }
39
-
40
- export const hicdataPayload: RoutePayload = {
41
- request: {
42
- typeId: 'HicdataRequest'
43
- },
44
- response: {
45
- typeId: 'HicdataResponse'
46
- }
47
- // examples: []
48
- }
@@ -1,50 +0,0 @@
1
- import type { BaseHicRequest, XYZCoord } from './hicdata.ts'
2
- import type { RoutePayload } from './routeApi.ts'
3
-
4
- export type HicGenomeRequest = BaseHicRequest & {
5
- /** Entire chromosome list read from the file (see hicstate) */
6
- chrlst: string[]
7
- /** window location */
8
- embedder: string
9
- /** whether or not the file contains 'chr' for the chromosomes */
10
- nochr: boolean
11
- }
12
-
13
- export type HicGenomeResponse = {
14
- data: {
15
- /** First chromosome */
16
- lead: string
17
- /** Second chromosome */
18
- follow: string
19
- items: XYZCoord[]
20
- }[]
21
- /** Error message to display on the client, if applicable */
22
- error?: string
23
- }
24
-
25
- export const hicGenomePayload: RoutePayload = {
26
- request: {
27
- typeId: 'HicGenomeRequest'
28
- },
29
- response: {
30
- typeId: 'HicGenomeResponse'
31
- },
32
- examples: [
33
- {
34
- request: {
35
- body: {
36
- embedder: 'localhost',
37
- url: 'https://proteinpaint.stjude.org/ppdemo/hg19/hic/hic_demo.hic',
38
- matrixType: 'observed',
39
- nmeth: 'NONE',
40
- pos1: '3',
41
- pos2: '2',
42
- resolution: 1000000
43
- }
44
- },
45
- response: {
46
- header: { status: 200 }
47
- }
48
- }
49
- ]
50
- }
@@ -1,57 +0,0 @@
1
- import type { RoutePayload } from './routeApi.ts'
2
-
3
- export type HicstatRequestWithFile = {
4
- /** HiC file path from tp/ */
5
- file: string
6
- /** If file is provided, url should not be provided. Checked in validation type */
7
- url?: never
8
- }
9
-
10
- export type HicstatRequestWithUrl = {
11
- /** If url is provided, file should not be provided. Checked in validation type */
12
- file?: never
13
- /** Remote HiC file URL */
14
- url: string
15
- }
16
-
17
- export type HicstatRequest = HicstatRequestWithFile | HicstatRequestWithUrl
18
-
19
- /** Checks if a file or url is present before proceeding */
20
- type RequireFileOrUrl<T> = T extends HicstatRequestWithFile | HicstatRequestWithUrl
21
- ? T
22
- : { error: 'Either "file" or "url" must be provided' }
23
-
24
- export type HicstatRequestWithValidation = RequireFileOrUrl<HicstatRequest>
25
-
26
- export type HicstatResponse = {
27
- /** Version number pulled from the header. Only hic versions 7-9 are acceptable */
28
- version: 7 | 8 | 9
29
- /**genome identifer */
30
- 'Genome ID': string
31
- /** k:v of chrs and a position */
32
- Chromosomes: {
33
- /** Index of chr 1 through 22 */
34
- [index: number]: number
35
- All: number
36
- X: number
37
- Y: number
38
- M: number
39
- }
40
- /** Orders Chromosomes keys (see above) */
41
- chrorder: number[]
42
- /** bins for base pair resolutions */
43
- 'Base pair-delimited resolutions': number[]
44
- /** bins for fragment resolutions */
45
- 'Fragment-delimited resolutions': number[]
46
- normalization: string[]
47
- }
48
-
49
- export const hicstatPayload: RoutePayload = {
50
- request: {
51
- typeId: 'HicstatRequest'
52
- },
53
- response: {
54
- typeId: 'HicstatResponse'
55
- }
56
- // examples: []
57
- }
package/src/routes/img.ts DELETED
@@ -1,23 +0,0 @@
1
- import type { RoutePayload } from './routeApi.js'
2
-
3
- export type imgRequest = {
4
- file: string
5
- }
6
-
7
- export type SrcImage = {
8
- src: any
9
- }
10
-
11
- export type imgResponse = {
12
- src: string
13
- size: string
14
- }
15
-
16
- export const imgPayload: RoutePayload = {
17
- request: {
18
- typeId: 'imgRequest'
19
- },
20
- response: {
21
- typeId: 'imgResponse'
22
- }
23
- }
@@ -1,14 +0,0 @@
1
- import type { RoutePayload } from './routeApi.js'
2
-
3
- export type IsoformLstRequest = any
4
- export type IsoformLstResponse = any
5
-
6
- export const isoformlstPayload: RoutePayload = {
7
- request: {
8
- typeId: 'IsoformLstRequest'
9
- },
10
- response: {
11
- typeId: 'IsoformLstResponse'
12
- }
13
- //examples: []
14
- }
@@ -1,14 +0,0 @@
1
- import type { RoutePayload } from './routeApi.js'
2
-
3
- export type NtseqRequest = any
4
- export type NtseqResponse = any
5
-
6
- export const ntseqPayload: RoutePayload = {
7
- request: {
8
- typeId: 'NtseqRequest'
9
- },
10
- response: {
11
- typeId: 'NtseqResponse'
12
- }
13
- //examples: []
14
- }
@@ -1,14 +0,0 @@
1
- import type { RoutePayload } from './routeApi.ts'
2
-
3
- export type PdomainRequest = any
4
- export type PdomainResponse = any
5
-
6
- export const pdomainPayload: RoutePayload = {
7
- request: {
8
- typeId: 'PdomainRequest'
9
- },
10
- response: {
11
- typeId: 'PdomainResponse'
12
- }
13
- //examples: []
14
- }
@@ -1,47 +0,0 @@
1
- export type RouteApi = {
2
- endpoint: string
3
- methods: {
4
- get?: RoutePayload
5
- post?: RoutePayload
6
- put?: RoutePayload
7
- delete?: RoutePayload
8
- }
9
- }
10
-
11
- export type RoutePayload = {
12
- init?: RouteInit
13
- request: RouteMethod
14
- response: RouteMethod
15
- /** if examples are not provided, will not test */
16
- examples?: PayloadExample[]
17
- }
18
- export type RouteMethod = {
19
- typeId: string
20
- checker?: any
21
- }
22
- /* later replace actual values */
23
- export type Point = {
24
- x: string
25
- y: string | number
26
- }
27
-
28
- type RouteInitArg = {
29
- app: any
30
- genome: any
31
- genomes: any
32
- }
33
- type RouteHandler = (req: any, res: any) => void
34
- type RouteInit = (a: RouteInitArg) => RouteHandler
35
- type PayloadExample = {
36
- request: {
37
- body: any
38
- }
39
- response?: {
40
- header?: any
41
- /**
42
- * if omitted, only payload shape is checked at runtime;
43
- * if provided, will use deep equal to check at runtime
44
- */
45
- body?: any
46
- }
47
- }
@@ -1,44 +0,0 @@
1
- import type { RoutePayload } from './routeApi.ts'
2
- import type { WSIClass } from '../dataset.ts'
3
- import type { Annotation, Prediction } from './aiProjectSelectedWSImages.ts'
4
-
5
- export type SampleWSImagesRequest = {
6
- genome: string
7
- dslabel: string
8
- sample_id: string
9
- wsimage: string
10
- }
11
-
12
- export type SampleWSImagesResponse = {
13
- sampleWSImages: WSImage[]
14
- }
15
-
16
- export class WSImage {
17
- id?: number
18
- filename: string
19
- metadata?: string
20
- predictionLayers?: Array<string>
21
- annotations?: Array<Annotation>
22
- predictions?: Array<Prediction>
23
- classes?: Array<WSIClass>
24
- /** ds defined uncertainity labels and colors */
25
- uncertainty?: any
26
- /** Color to highlight active patches */
27
- activePatchColor?: string
28
- /** Tile size in pixels needed for AI scripts */
29
- tileSize?: number
30
-
31
- constructor(filename: string) {
32
- this.filename = filename
33
- }
34
- }
35
-
36
- export const sampleWSImagesPayload: RoutePayload = {
37
- request: {
38
- typeId: 'SampleWSImagesRequest'
39
- },
40
- response: {
41
- typeId: 'SampleWSImagesResponse'
42
- }
43
- // examples: []
44
- }
@@ -1,25 +0,0 @@
1
- import type { TileSelection } from '../index.ts'
2
- import type { RoutePayload } from './routeApi.ts'
3
-
4
- export type SaveWSIAnnotationRequest = {
5
- genome: string
6
- dslabel: string
7
- tileSelection: TileSelection
8
- classId: number
9
- projectId: number
10
- wsimage: string
11
- }
12
-
13
- export type SaveWSIAnnotationResponse = {
14
- status: 'ok' | 'error'
15
- error?: string
16
- }
17
-
18
- export const saveWSIAnnotationPayload: RoutePayload = {
19
- request: {
20
- typeId: 'SaveWSIAnnotationRequest'
21
- },
22
- response: {
23
- typeId: 'SaveWSIAnnotationResponse'
24
- }
25
- }
package/src/routes/snp.ts DELETED
@@ -1,13 +0,0 @@
1
- import type { RoutePayload } from './routeApi.js'
2
-
3
- export type SnpRequest = any
4
- export type SnpResponse = any
5
-
6
- export const snpPayload: RoutePayload = {
7
- request: {
8
- typeId: 'SnpRequest'
9
- },
10
- response: {
11
- typeId: 'SnpResponse'
12
- }
13
- }