@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.
- package/README.md +22 -0
- package/dist/brainImaging.js +11 -0
- package/dist/brainImagingSamples.js +11 -0
- package/dist/burden.js +11 -0
- package/dist/chunk-37ZPCVP5.js +111 -0
- package/dist/chunk-5GG2FNAY.js +62 -0
- package/dist/chunk-5JWTIWVB.js +222 -0
- package/dist/chunk-5RZYB4M4.js +171 -0
- package/dist/chunk-6EFB6ZMB.js +62 -0
- package/dist/chunk-6LFMFM2C.js +122 -0
- package/dist/chunk-7PMGKVWQ.js +62 -0
- package/dist/chunk-7Z3IHB43.js +152 -0
- package/dist/chunk-B3D26X6X.js +337 -0
- package/dist/chunk-BY2JABTF.js +256 -0
- package/dist/chunk-CETMA2FU.js +144 -0
- package/dist/chunk-DCN75URO.js +1740 -0
- package/dist/chunk-DIDZMC3G.js +96 -0
- package/dist/chunk-DKSPASWZ.js +4058 -0
- package/dist/chunk-EWRK4PKZ.js +62 -0
- package/dist/chunk-FDTUTGQG.js +288 -0
- package/dist/chunk-FZ6QOTGM.js +205 -0
- package/dist/chunk-GU7LIGHN.js +174 -0
- package/dist/chunk-IL33L6MY.js +126 -0
- package/dist/chunk-INDBFC54.js +1538 -0
- package/dist/chunk-IT7IGDC4.js +1697 -0
- package/dist/chunk-IWG5IPXG.js +3409 -0
- package/dist/chunk-JEQ3TBVQ.js +1472 -0
- package/dist/chunk-JPW6LFDQ.js +1507 -0
- package/dist/chunk-K2KQTFQI.js +113 -0
- package/dist/chunk-M33KP65Z.js +3347 -0
- package/dist/chunk-MUJUKENL.js +62 -0
- package/dist/chunk-N45Z3JCY.js +62 -0
- package/dist/chunk-OMHEDUNA.js +62 -0
- package/dist/chunk-OY3EKV7F.js +130 -0
- package/dist/chunk-Q56YNQFK.js +3417 -0
- package/dist/chunk-QDIIM52V.js +165 -0
- package/dist/chunk-QX7QLUKY.js +228 -0
- package/dist/chunk-RLFGMVJZ.js +234 -0
- package/dist/chunk-SDOWCOGK.js +96 -0
- package/dist/chunk-UCG25D2C.js +109 -0
- package/dist/chunk-UIU3IQH4.js +62 -0
- package/dist/chunk-W3F2RMPU.js +3494 -0
- package/dist/chunk-W3QYIXXF.js +273 -0
- package/dist/chunk-XGAOGA3F.js +159 -0
- package/dist/chunk-XJCQEOPB.js +61 -0
- package/dist/chunk-XLBSZOMF.js +117 -0
- package/dist/chunk-XQQ5G6N6.js +109 -0
- package/dist/chunk-Z6B6IQIY.js +1785 -0
- package/dist/dataset.js +11 -0
- package/dist/dsdata.js +11 -0
- package/dist/dzimages.js +11 -0
- package/dist/gdc.maf.js +11 -0
- package/dist/gdc.mafBuild.js +11 -0
- package/dist/gdc.topMutatedGenes.js +11 -0
- package/dist/genelookup.js +11 -0
- package/dist/genesetEnrichment.js +11 -0
- package/dist/genesetOverrepresentation.js +11 -0
- package/dist/healthcheck.js +11 -0
- package/dist/hicdata.js +11 -0
- package/dist/hicgenome.js +11 -0
- package/dist/hicstat.js +11 -0
- package/dist/index.js +347 -0
- package/dist/isoformlst.js +11 -0
- package/dist/ntseq.js +11 -0
- package/dist/pdomain.js +11 -0
- package/dist/samplewsimages.js +11 -0
- package/dist/snp.js +11 -0
- package/dist/termdb.DE.js +11 -0
- package/dist/termdb.boxplot.js +11 -0
- package/dist/termdb.categories.js +11 -0
- package/dist/termdb.cluster.js +11 -0
- package/dist/termdb.cohort.summary.js +11 -0
- package/dist/termdb.cohorts.js +11 -0
- package/dist/termdb.descrstats.js +11 -0
- package/dist/termdb.numericcategories.js +11 -0
- package/dist/termdb.percentile.js +11 -0
- package/dist/termdb.rootterm.js +11 -0
- package/dist/termdb.sampleImages.js +11 -0
- package/dist/termdb.singleSampleMutation.js +11 -0
- package/dist/termdb.singlecellDEgenes.js +11 -0
- package/dist/termdb.singlecellData.js +11 -0
- package/dist/termdb.singlecellSamples.js +11 -0
- package/dist/termdb.termchildren.js +11 -0
- package/dist/termdb.termsbyids.js +11 -0
- package/dist/termdb.topTermsByType.js +11 -0
- package/dist/termdb.topVariablyExpressedGenes.js +11 -0
- package/dist/termdb.violin.js +11 -0
- package/dist/tileserver.js +11 -0
- package/dist/wsimages.js +11 -0
- package/package.json +17 -15
- package/src/Mclass.ts +8 -0
- package/src/dataset.ts +1588 -0
- package/src/docs.json +16417 -0
- package/src/fileOrUrl.ts +15 -0
- package/src/filter.ts +125 -0
- package/src/genome.ts +123 -0
- package/src/index.ts +67 -0
- package/src/routes/brainImaging.ts +47 -0
- package/src/routes/brainImagingSamples.ts +25 -0
- package/src/routes/burden.ts +111 -0
- package/src/routes/dataset.ts +14 -0
- package/src/routes/dsdata.ts +14 -0
- package/src/routes/dzimages.ts +25 -0
- package/src/routes/errorResponse.ts +6 -0
- package/src/routes/filter.gdc.ts +15 -0
- package/src/routes/gdc.maf.ts +52 -0
- package/src/routes/gdc.mafBuild.ts +20 -0
- package/src/routes/gdc.topMutatedGenes.ts +37 -0
- package/src/routes/genelookup.ts +22 -0
- package/src/routes/genesetEnrichment.ts +60 -0
- package/src/routes/genesetOverrepresentation.ts +48 -0
- package/src/routes/healthcheck.ts +79 -0
- package/src/routes/hicdata.ts +48 -0
- package/src/routes/hicgenome.ts +50 -0
- package/src/routes/hicstat.ts +57 -0
- package/src/routes/isoformlst.ts +14 -0
- package/src/routes/ntseq.ts +14 -0
- package/src/routes/pdomain.ts +14 -0
- package/src/routes/routeApi.ts +41 -0
- package/src/routes/samplewsimages.ts +27 -0
- package/src/routes/snp.ts +13 -0
- package/src/routes/termdb.DE.ts +57 -0
- package/src/routes/termdb.boxplot.ts +78 -0
- package/src/routes/termdb.categories.ts +73 -0
- package/src/routes/termdb.cluster.ts +103 -0
- package/src/routes/termdb.cohort.summary.ts +14 -0
- package/src/routes/termdb.cohorts.ts +14 -0
- package/src/routes/termdb.descrstats.ts +78 -0
- package/src/routes/termdb.numericcategories.ts +32 -0
- package/src/routes/termdb.percentile.ts +65 -0
- package/src/routes/termdb.rootterm.ts +49 -0
- package/src/routes/termdb.sampleImages.ts +26 -0
- package/src/routes/termdb.singleSampleMutation.ts +29 -0
- package/src/routes/termdb.singlecellDEgenes.ts +41 -0
- package/src/routes/termdb.singlecellData.ts +69 -0
- package/src/routes/termdb.singlecellSamples.ts +46 -0
- package/src/routes/termdb.termchildren.ts +49 -0
- package/src/routes/termdb.termsbyids.ts +26 -0
- package/src/routes/termdb.topTermsByType.ts +32 -0
- package/src/routes/termdb.topVariablyExpressedGenes.ts +56 -0
- package/src/routes/termdb.violin.ts +122 -0
- package/src/routes/tileserver.ts +14 -0
- package/src/routes/wsimages.ts +24 -0
- package/src/terms/categorical.ts +106 -0
- package/src/terms/condition.ts +55 -0
- package/src/terms/geneExpression.ts +32 -0
- package/src/terms/geneVariant.ts +51 -0
- package/src/terms/metaboliteIntensity.ts +31 -0
- package/src/terms/numeric.ts +253 -0
- package/src/terms/q.ts +38 -0
- package/src/terms/samplelst.ts +41 -0
- package/src/terms/singleCellCellType.ts +22 -0
- package/src/terms/singleCellGeneExpression.ts +28 -0
- package/src/terms/snp.ts +28 -0
- package/src/terms/snps.ts +110 -0
- package/src/terms/term.ts +184 -0
- package/src/terms/tw.ts +38 -0
- package/src/terms/updated-types.ts +9 -0
- package/src/termsetting.ts +197 -0
- package/src/test/numeric.type.spec.ts +275 -0
- package/src/vocab.ts +37 -0
- package/dist/routes.ts +0 -28911
- package/src/Mclass.js +0 -0
- package/src/checkers/routes.js +0 -167
- package/src/dataset.js +0 -0
- package/src/fileOrUrl.js +0 -0
- package/src/filter.js +0 -0
- package/src/genome.js +0 -0
- package/src/index.js +0 -66
- package/src/routes/brainImaging.js +0 -11
- package/src/routes/brainImagingSamples.js +0 -11
- package/src/routes/burden.js +0 -44
- package/src/routes/dataset.js +0 -12
- package/src/routes/dsdata.js +0 -12
- package/src/routes/dzimages.js +0 -12
- package/src/routes/errorResponse.js +0 -0
- package/src/routes/filter.gdc.js +0 -0
- package/src/routes/gdc.maf.js +0 -17
- package/src/routes/gdc.mafBuild.js +0 -12
- package/src/routes/gdc.topMutatedGenes.js +0 -12
- package/src/routes/genelookup.js +0 -12
- package/src/routes/genesetEnrichment.js +0 -12
- package/src/routes/genesetOverrepresentation.js +0 -12
- package/src/routes/healthcheck.js +0 -23
- package/src/routes/hicdata.js +0 -12
- package/src/routes/hicgenome.js +0 -29
- package/src/routes/hicstat.js +0 -12
- package/src/routes/isoformlst.js +0 -12
- package/src/routes/ntseq.js +0 -12
- package/src/routes/pdomain.js +0 -12
- package/src/routes/routeApi.js +0 -0
- package/src/routes/samplewsimages.js +0 -12
- package/src/routes/snp.js +0 -11
- package/src/routes/termdb.DE.js +0 -13
- package/src/routes/termdb.boxplot.js +0 -12
- package/src/routes/termdb.categories.js +0 -48
- package/src/routes/termdb.cluster.js +0 -12
- package/src/routes/termdb.cohort.summary.js +0 -12
- package/src/routes/termdb.cohorts.js +0 -12
- package/src/routes/termdb.descrstats.js +0 -48
- package/src/routes/termdb.numericcategories.js +0 -12
- package/src/routes/termdb.percentile.js +0 -49
- package/src/routes/termdb.rootterm.js +0 -27
- package/src/routes/termdb.sampleImages.js +0 -12
- package/src/routes/termdb.singleSampleMutation.js +0 -12
- package/src/routes/termdb.singlecellDEgenes.js +0 -12
- package/src/routes/termdb.singlecellData.js +0 -12
- package/src/routes/termdb.singlecellSamples.js +0 -12
- package/src/routes/termdb.termchildren.js +0 -28
- package/src/routes/termdb.termsbyids.js +0 -12
- package/src/routes/termdb.topTermsByType.js +0 -12
- package/src/routes/termdb.topVariablyExpressedGenes.js +0 -12
- package/src/routes/termdb.violin.js +0 -49
- package/src/routes/tileserver.js +0 -12
- package/src/routes/wsimages.js +0 -12
- package/src/terms/categorical.js +0 -0
- package/src/terms/condition.js +0 -0
- package/src/terms/geneExpression.js +0 -0
- package/src/terms/geneVariant.js +0 -0
- package/src/terms/metaboliteIntensity.js +0 -0
- package/src/terms/numeric.js +0 -0
- package/src/terms/q.js +0 -0
- package/src/terms/samplelst.js +0 -0
- package/src/terms/singleCellCellType.js +0 -0
- package/src/terms/singleCellGeneExpression.js +0 -0
- package/src/terms/snp.js +0 -0
- package/src/terms/snps.js +0 -0
- package/src/terms/term.js +0 -0
- package/src/terms/tw.js +0 -0
- package/src/terms/updated-types.js +0 -0
- package/src/termsetting.js +0 -0
- package/src/test/numeric.type.spec.js +0 -117
- package/src/vocab.js +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
import type { TermWrapper } from '../terms/tw.ts'
|
|
3
|
+
|
|
4
|
+
export type TermsByIdsRequest = {
|
|
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
|
+
embedder: string
|
|
10
|
+
/** term id string */
|
|
11
|
+
ids: string[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type TermsByIdsResponse = {
|
|
15
|
+
terms: { [id: string]: TermWrapper }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const termsByIdsPayload: RoutePayload = {
|
|
19
|
+
request: {
|
|
20
|
+
typeId: 'TermsByIdsRequest'
|
|
21
|
+
},
|
|
22
|
+
response: {
|
|
23
|
+
typeId: 'TermsByIdsResponse'
|
|
24
|
+
}
|
|
25
|
+
// examples: []
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
//import GdcFilter0 from './filter.gdc'
|
|
3
|
+
import type { Term } from '../terms/term.ts'
|
|
4
|
+
import type { Filter } from '../filter.ts'
|
|
5
|
+
|
|
6
|
+
export type TermdbTopTermsByTypeRequest = {
|
|
7
|
+
/** Ref genome */
|
|
8
|
+
genome: string
|
|
9
|
+
/** Ds label */
|
|
10
|
+
dslabel: string
|
|
11
|
+
/* Term type */
|
|
12
|
+
type: string
|
|
13
|
+
/** pp filter */
|
|
14
|
+
filter?: Filter
|
|
15
|
+
/** JSON, optional GDC cohort filter to restrict cases */
|
|
16
|
+
filter0?: any //GdcFilter0
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type TermdbTopTermsByTypeResponse = {
|
|
20
|
+
/** Array of gene names TODO may change element to objs */
|
|
21
|
+
terms: Term[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const termdbTopTermsByTypePayload: RoutePayload = {
|
|
25
|
+
request: {
|
|
26
|
+
typeId: 'TermdbTopTermsByTypeRequest'
|
|
27
|
+
},
|
|
28
|
+
response: {
|
|
29
|
+
typeId: 'TermdbTopTermsByTypeResponse'
|
|
30
|
+
},
|
|
31
|
+
// examples: []
|
|
32
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
//import GdcFilter0 from './filter.gdc'
|
|
3
|
+
import type { Filter } from '../filter.ts'
|
|
4
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
5
|
+
|
|
6
|
+
export type TermdbTopVariablyExpressedGenesRequest = {
|
|
7
|
+
/** Ref genome */
|
|
8
|
+
genome: string
|
|
9
|
+
/** Ds label */
|
|
10
|
+
dslabel: string
|
|
11
|
+
/** Number of top genes requested */
|
|
12
|
+
maxGenes: number
|
|
13
|
+
/** optional param defined by dataset. if to scan all or subset of genes */
|
|
14
|
+
geneSet?: {
|
|
15
|
+
/** Indicates the geneset to return
|
|
16
|
+
* all - all genes
|
|
17
|
+
* custom - user defined list of genes
|
|
18
|
+
* msigdb - msigdb geneset
|
|
19
|
+
*/
|
|
20
|
+
type: 'all' | 'custom' | 'msigdb'
|
|
21
|
+
/** Sent as null for 'all' types. Otherwise a list of gene symbols */
|
|
22
|
+
geneList: string[] | null
|
|
23
|
+
}
|
|
24
|
+
/** optional parameter defined in gdc dataset. not used for non-gdc ds */
|
|
25
|
+
min_median_log2_uqfpkm?: number
|
|
26
|
+
/** filter extreme values (in native implementation): true/false */
|
|
27
|
+
filter_extreme_values?: number
|
|
28
|
+
/** min_count of fpkm when filter_extreme_values (in native implementation) = true */
|
|
29
|
+
min_count?: number
|
|
30
|
+
/** min_total_count of fpkm when filter_extreme_values (in native implementation) = true */
|
|
31
|
+
min_total_count?: number
|
|
32
|
+
/** Filter type: variance/inter-quartile region (in native implementation) */
|
|
33
|
+
rank_type?: {
|
|
34
|
+
type: 'var' | 'iqr'
|
|
35
|
+
}
|
|
36
|
+
filter?: Filter
|
|
37
|
+
/** JSON, optional GDC cohort filter to restrict cases */
|
|
38
|
+
filter0?: any //GdcFilter0
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type ValidResponse = {
|
|
42
|
+
/** Array of gene names TODO may change element to objs */
|
|
43
|
+
genes: string[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type TermdbTopVariablyExpressedGenesResponse = ErrorResponse | ValidResponse
|
|
47
|
+
|
|
48
|
+
export const termdbTopVariablyExpressedGenesPayload: RoutePayload = {
|
|
49
|
+
request: {
|
|
50
|
+
typeId: 'TermdbTopVariablyExpressedGenesRequest'
|
|
51
|
+
},
|
|
52
|
+
response: {
|
|
53
|
+
typeId: 'TermdbTopVariablyExpressedGenesResponse'
|
|
54
|
+
}
|
|
55
|
+
// examples: []
|
|
56
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
import type { Filter } from '../filter.ts'
|
|
3
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
4
|
+
|
|
5
|
+
export type ViolinRequest = {
|
|
6
|
+
genome: string
|
|
7
|
+
dslabel: string
|
|
8
|
+
embedder: string
|
|
9
|
+
/** main tw to fetch numeric data to show in violin */
|
|
10
|
+
tw: any
|
|
11
|
+
/** optional tw to divide tw data into multiple violins and show under one axis */
|
|
12
|
+
divideTw?: any
|
|
13
|
+
/** A number representing the device's pixel ratio, which may be used for rendering quality adjustments */
|
|
14
|
+
devicePixelRatio: number
|
|
15
|
+
/** optional mass filter */
|
|
16
|
+
filter?: Filter
|
|
17
|
+
/** optional read-only invisible filter TODO GdcFilter0 */
|
|
18
|
+
filter0?: any
|
|
19
|
+
/** A number representing the width of the SVG (Scalable Vector Graphics) box, used for rendering the chart */
|
|
20
|
+
svgw: number
|
|
21
|
+
/** A string with two possible values: 'horizontal' or 'vertical', indicating the orientation of the chart, either horizontal or vertical */
|
|
22
|
+
orientation: 'horizontal' | 'vertical'
|
|
23
|
+
/** A string representing the type of symbol used on the plot, which can be either 'circles' or 'rugs' */
|
|
24
|
+
datasymbol: string
|
|
25
|
+
/** A number representing the radius of the data symbols rendered on the plot */
|
|
26
|
+
radius: number
|
|
27
|
+
/** A number representing the width of the stroke used to generate the data symbols (data symbols are rendered on the server side) */
|
|
28
|
+
strokeWidth: number
|
|
29
|
+
/** A number representing the dimension perpendicular to the violin spread (the height of the axis) */
|
|
30
|
+
axisHeight: number
|
|
31
|
+
/** A number representing the right margin of the chart or plot */
|
|
32
|
+
rightMargin: number
|
|
33
|
+
/** A string representing a unit of measurement (e.g., 'log' for log scale) */
|
|
34
|
+
unit: string
|
|
35
|
+
/** ?? */
|
|
36
|
+
isKDE: boolean
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface binsEntries {
|
|
40
|
+
x0: number
|
|
41
|
+
x1: number
|
|
42
|
+
density: number
|
|
43
|
+
}
|
|
44
|
+
interface valuesEntries {
|
|
45
|
+
id: string
|
|
46
|
+
label: string
|
|
47
|
+
value: number
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface pvalueEntries {
|
|
51
|
+
value?: string
|
|
52
|
+
html?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type plot = {
|
|
56
|
+
label: string
|
|
57
|
+
plotValueCount: number
|
|
58
|
+
src: string
|
|
59
|
+
bins: binsEntries[]
|
|
60
|
+
densityMax: number
|
|
61
|
+
biggestBin: number
|
|
62
|
+
summaryStats: {
|
|
63
|
+
values: valuesEntries[]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type ViolinResponse = ValidResponse | ErrorResponse
|
|
68
|
+
|
|
69
|
+
type ValidResponse = {
|
|
70
|
+
min: number
|
|
71
|
+
max: number
|
|
72
|
+
plots: plot[]
|
|
73
|
+
pvalues?: pvalueEntries[][]
|
|
74
|
+
uncomputableValueObj: any
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const violinPayload: RoutePayload = {
|
|
78
|
+
request: {
|
|
79
|
+
typeId: 'ViolinRequest'
|
|
80
|
+
},
|
|
81
|
+
response: {
|
|
82
|
+
typeId: 'ViolinResponse'
|
|
83
|
+
},
|
|
84
|
+
examples: [
|
|
85
|
+
{
|
|
86
|
+
request: {
|
|
87
|
+
body: {
|
|
88
|
+
genome: 'hg38-test',
|
|
89
|
+
dslabel: 'TermdbTest',
|
|
90
|
+
embedder: 'localhost',
|
|
91
|
+
devicePixelRatio: 2.200000047683716,
|
|
92
|
+
maxThickness: 150,
|
|
93
|
+
screenThickness: 1218,
|
|
94
|
+
filter: {
|
|
95
|
+
type: 'tvslst',
|
|
96
|
+
in: true,
|
|
97
|
+
join: '',
|
|
98
|
+
lst: [
|
|
99
|
+
{
|
|
100
|
+
tag: 'cohortFilter',
|
|
101
|
+
type: 'tvs',
|
|
102
|
+
tvs: { term: { id: 'subcohort', type: 'categorical' }, values: [{ key: 'ABC', label: 'ABC' }] }
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
svgw: 227.27272234672367,
|
|
107
|
+
orientation: 'horizontal',
|
|
108
|
+
datasymbol: 'bean',
|
|
109
|
+
radius: 5,
|
|
110
|
+
strokeWidth: 0.2,
|
|
111
|
+
axisHeight: 60,
|
|
112
|
+
rightMargin: 50,
|
|
113
|
+
unit: 'abs',
|
|
114
|
+
termid: 'agedx'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
response: {
|
|
118
|
+
header: { status: 200 }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type TileRequest = any
|
|
4
|
+
export type TileResponse = any
|
|
5
|
+
|
|
6
|
+
export const tilePayload: RoutePayload = {
|
|
7
|
+
request: {
|
|
8
|
+
typeId: 'TileRequest'
|
|
9
|
+
},
|
|
10
|
+
response: {
|
|
11
|
+
typeId: 'TileResponse'
|
|
12
|
+
}
|
|
13
|
+
// examples: []
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type WSImagesRequest = {
|
|
4
|
+
genome: string
|
|
5
|
+
dslabel: string
|
|
6
|
+
sampleId: string
|
|
7
|
+
wsimage: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type WSImagesResponse = {
|
|
11
|
+
sessionId?: string
|
|
12
|
+
slide_dimensions: number[]
|
|
13
|
+
status: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const wsImagesPayload: RoutePayload = {
|
|
17
|
+
request: {
|
|
18
|
+
typeId: 'WSImagesRequest'
|
|
19
|
+
},
|
|
20
|
+
response: {
|
|
21
|
+
typeId: 'WSImagesResponse'
|
|
22
|
+
}
|
|
23
|
+
// examples: []
|
|
24
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseTerm,
|
|
3
|
+
TermValues,
|
|
4
|
+
GroupSettingQ,
|
|
5
|
+
ValuesQ,
|
|
6
|
+
TermGroupSetting,
|
|
7
|
+
BaseTW,
|
|
8
|
+
PredefinedGroupSettingQ,
|
|
9
|
+
CustomGroupSettingQ
|
|
10
|
+
} from './term.ts'
|
|
11
|
+
import { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
|
|
12
|
+
import { TermSettingInstance } from '../termsetting.ts'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A raw categorical term q object, before filling-in
|
|
16
|
+
*
|
|
17
|
+
* test:CategoricalQ:
|
|
18
|
+
*
|
|
19
|
+
* @category TW
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export type RawCatTWValues = BaseTW & {
|
|
23
|
+
type?: 'CatTWValues'
|
|
24
|
+
/** must already exist, for dictionary terms, TwRouter.fill() will use mayHydrateDictTwLst() */
|
|
25
|
+
term: CategoricalTerm
|
|
26
|
+
q: RawValuesQ
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type RawCatTWPredefinedGS = BaseTW & {
|
|
30
|
+
type?: 'CatTWPredefinedGS'
|
|
31
|
+
term: CategoricalTerm
|
|
32
|
+
q: RawPredefinedGroupsetQ
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type RawCatTWCustomGS = BaseTW & {
|
|
36
|
+
type?: 'CatTWCustomGS'
|
|
37
|
+
term: CategoricalTerm
|
|
38
|
+
q: RawCustomGroupsetQ
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type RawCatTW = RawCatTWValues | RawCatTWPredefinedGS | RawCatTWCustomGS
|
|
42
|
+
|
|
43
|
+
export type CategoricalBaseQ = MinBaseQ & {
|
|
44
|
+
mode?: 'discrete' | 'binary'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type CategoricalQ = GroupSettingQ | ValuesQ
|
|
48
|
+
|
|
49
|
+
export type CategoricalTerm = BaseTerm & {
|
|
50
|
+
type: 'categorical'
|
|
51
|
+
values: TermValues
|
|
52
|
+
groupsetting: TermGroupSetting
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A categorical term wrapper object
|
|
57
|
+
*
|
|
58
|
+
* @group Termdb
|
|
59
|
+
* @category TW
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
export type CategoricalTW = BaseTW & {
|
|
63
|
+
//id: string
|
|
64
|
+
type: 'CatTWValues' | 'CatTWPredefinedGS' | 'CatTWCustomGS'
|
|
65
|
+
q: CategoricalQ
|
|
66
|
+
term: CategoricalTerm
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type CatTWValues = BaseTW & {
|
|
70
|
+
//id: string
|
|
71
|
+
term: CategoricalTerm
|
|
72
|
+
q: ValuesQ
|
|
73
|
+
type: 'CatTWValues'
|
|
74
|
+
// do not use this boolean flag, defined here only to help illustrate
|
|
75
|
+
// in tw/test/fake/app.js why this is type check error prone and
|
|
76
|
+
// less preferred than a discriminant prop that also works at runtime
|
|
77
|
+
isCatTWValues?: true
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type CatTWPredefinedGS = BaseTW & {
|
|
81
|
+
//id: string
|
|
82
|
+
term: CategoricalTerm
|
|
83
|
+
q: PredefinedGroupSettingQ
|
|
84
|
+
type: 'CatTWPredefinedGS'
|
|
85
|
+
// do not use this boolean flag, defined here only to help illustrate
|
|
86
|
+
// in tw/test/fake/app.js why this is type check error prone and
|
|
87
|
+
// less preferred than a discriminant prop that also works at runtime
|
|
88
|
+
isCatTWPredefiendGS?: true
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type CatTWCustomGS = BaseTW & {
|
|
92
|
+
//id: string
|
|
93
|
+
term: CategoricalTerm
|
|
94
|
+
q: CustomGroupSettingQ
|
|
95
|
+
type: 'CatTWCustomGS'
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type CatTWTypes = CatTWValues | CatTWPredefinedGS | CatTWCustomGS
|
|
99
|
+
|
|
100
|
+
export type CategoricalTermSettingInstance = TermSettingInstance & {
|
|
101
|
+
q: CategoricalQ
|
|
102
|
+
term: CategoricalTerm
|
|
103
|
+
category2samplecount: any
|
|
104
|
+
validateGroupsetting: () => { text: string; bgcolor?: string }
|
|
105
|
+
error?: string
|
|
106
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BaseTerm, BaseQ, TermValues } from './term.ts'
|
|
2
|
+
import { TermWrapper } from './tw.ts'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @category TW
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type ConditionQ = BaseQ & {
|
|
9
|
+
mode: 'discrete' | 'binary' | 'cuminc' | 'cox'
|
|
10
|
+
type?: 'values'
|
|
11
|
+
bar_by_children?: boolean // 'true' if term is not a leaf and has subconditions
|
|
12
|
+
bar_by_grade?: boolean /* 'true' for barchart. Always 'true' for cuminc and logistic/cox outcome (children terms are not allowed for those cases)
|
|
13
|
+
when 'true', 'value_by_*' flags are effective.*/
|
|
14
|
+
breaks?: number[] /*
|
|
15
|
+
Breaks grades into groups
|
|
16
|
+
Array length=1, will break grades to 2 groups.
|
|
17
|
+
E.g. [3] divides to [-1,0,1,2,], [3,4,5]
|
|
18
|
+
Allowed for both conditionModes "discrete/binary"
|
|
19
|
+
Array length=2, break to 3 groups.
|
|
20
|
+
E.g. [1,2] divides to [-1,0], [1], [2,3,4,5]
|
|
21
|
+
E.g. [1,3] divides to [-1,0], [1,2], [3,4,5]
|
|
22
|
+
Only allowed for conditionMode="discrete" but not "binary"
|
|
23
|
+
*/
|
|
24
|
+
timeScale: 'age' | 'time'
|
|
25
|
+
value_by_max_grade?: boolean //'false' if bar_by_children is 'true'
|
|
26
|
+
value_by_most_recent?: boolean //'false' if bar_by_children is 'true'
|
|
27
|
+
value_by_computable_grade?: boolean //'true' if bar_by_children is 'true'
|
|
28
|
+
groups?: any // TODO: should use a defined type
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type ConditionTerm = BaseTerm & {
|
|
32
|
+
type: 'condition'
|
|
33
|
+
values: TermValues
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @group Termdb
|
|
38
|
+
* @category TW
|
|
39
|
+
*/
|
|
40
|
+
export type ConditionTW = TermWrapper & {
|
|
41
|
+
term: ConditionTerm
|
|
42
|
+
q: ConditionQ //replace the generic Q with specific condition Q
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @group Termdb
|
|
47
|
+
* @category TW
|
|
48
|
+
*/
|
|
49
|
+
/*
|
|
50
|
+
export type ConditionTermSettingInstance = TermSettingInstance & {
|
|
51
|
+
q: ConditionQ
|
|
52
|
+
category2samplecount: { key: string; label: string; count: number }[]
|
|
53
|
+
refGrp: any
|
|
54
|
+
}
|
|
55
|
+
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TermWrapper } from './tw.ts'
|
|
2
|
+
import { NumericTerm, NumericQ } from './numeric.ts'
|
|
3
|
+
import { TermSettingInstance } from '../termsetting.ts'
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
--------EXPORTED--------
|
|
7
|
+
GeneExpressionQ
|
|
8
|
+
GeneExpressionTermWrapper
|
|
9
|
+
GeneExpressionTermSettingInstance
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export type GeneExpressionQ = NumericQ & { dt?: number }
|
|
14
|
+
|
|
15
|
+
export type GeneExpressionTW = TermWrapper & {
|
|
16
|
+
q: GeneExpressionQ
|
|
17
|
+
term: GeneExpressionTerm
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type GeneExpressionTerm = NumericTerm & {
|
|
21
|
+
gene: string
|
|
22
|
+
// temporarily allowing chr/start/stop to support
|
|
23
|
+
// legacy fpkm files
|
|
24
|
+
chr?: string
|
|
25
|
+
start?: number
|
|
26
|
+
stop?: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type GeneExpressionTermSettingInstance = TermSettingInstance & {
|
|
30
|
+
q: GeneExpressionQ
|
|
31
|
+
term: GeneExpressionTerm
|
|
32
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { MinBaseQ, BaseTerm, EnabledTermGroupSetting, BaseTW, GroupSettingQ, ValuesQ } from '../index.ts'
|
|
2
|
+
import { TermSettingInstance } from '../termsetting.ts'
|
|
3
|
+
|
|
4
|
+
export type GeneVariantBaseQ = MinBaseQ & {
|
|
5
|
+
cnvGainCutoff?: number
|
|
6
|
+
cnvMaxLength?: number
|
|
7
|
+
cnvMinAbsValue?: number
|
|
8
|
+
cnvLossCutoff?: number
|
|
9
|
+
exclude: string[]
|
|
10
|
+
dt?: number
|
|
11
|
+
origin?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type GeneVariantQ = GeneVariantBaseQ & (ValuesQ | GroupSettingQ)
|
|
15
|
+
|
|
16
|
+
type GeneVariantBaseTerm = BaseTerm & {
|
|
17
|
+
type: 'geneVariant'
|
|
18
|
+
groupsetting: EnabledTermGroupSetting
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type GeneVariantGeneTerm = GeneVariantBaseTerm & {
|
|
22
|
+
kind: 'gene'
|
|
23
|
+
gene: string
|
|
24
|
+
// chr,start,stop should exist together as a separate type called
|
|
25
|
+
// 'Coord', but hard to code as atomic `& Coord` because it may
|
|
26
|
+
// need to be filled in
|
|
27
|
+
chr?: string
|
|
28
|
+
start?: number
|
|
29
|
+
stop?: number
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type GeneVariantCoordTerm = GeneVariantBaseTerm & {
|
|
33
|
+
kind: 'coord'
|
|
34
|
+
chr: string
|
|
35
|
+
start: number
|
|
36
|
+
stop: number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type GeneVariantTerm = GeneVariantGeneTerm | GeneVariantCoordTerm
|
|
40
|
+
|
|
41
|
+
export type GeneVariantTW = BaseTW & {
|
|
42
|
+
term: GeneVariantTerm
|
|
43
|
+
q: GeneVariantQ
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type GeneVariantTermSettingInstance = TermSettingInstance & {
|
|
47
|
+
q: GeneVariantQ
|
|
48
|
+
term: GeneVariantTerm
|
|
49
|
+
category2samplecount: any
|
|
50
|
+
groupSettingInstance?: any
|
|
51
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TermWrapper } from './tw.ts'
|
|
2
|
+
import { BaseQ } from './term.ts'
|
|
3
|
+
import { NumericTerm } from './numeric.ts'
|
|
4
|
+
import { TermSettingInstance } from '../termsetting.ts'
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
--------EXPORTED--------
|
|
8
|
+
MetaboliteIntensityQ
|
|
9
|
+
MetaboliteIntensityTermWrapper
|
|
10
|
+
MetaboliteIntensityTermSettingInstance
|
|
11
|
+
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export type MetaboliteIntensityQ = BaseQ & {
|
|
15
|
+
mode: 'continuous'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type MetaboliteIntensityTW = TermWrapper & {
|
|
19
|
+
q: MetaboliteIntensityQ
|
|
20
|
+
term: MetaboliteIntensityTerm
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type MetaboliteIntensityTerm = NumericTerm & {
|
|
24
|
+
metabolite: string
|
|
25
|
+
bins: any
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type MetaboliteIntensityTermSettingInstance = TermSettingInstance & {
|
|
29
|
+
q: MetaboliteIntensityQ
|
|
30
|
+
term: MetaboliteIntensityTerm
|
|
31
|
+
}
|