@sjcrh/proteinpaint-types 2.85.0 → 2.87.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.
- 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 +19 -14
- package/src/Mclass.ts +8 -0
- package/src/dataset.ts +1578 -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 -28847
- 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,37 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type GdcTopMutatedGeneRequest = {
|
|
4
|
+
/** to restrict to CGC genes */
|
|
5
|
+
geneFilter?: 'CGC'
|
|
6
|
+
/** max number of genes to return */
|
|
7
|
+
maxGenes?: number
|
|
8
|
+
/** gdc cohort filter */
|
|
9
|
+
filter0?: object
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type GdcGene = {
|
|
13
|
+
/** gene symbol */
|
|
14
|
+
gene: string
|
|
15
|
+
/** optional attributes on number of mutated cases per dt */
|
|
16
|
+
mutationStat?: {
|
|
17
|
+
/** each stat object is identified by either dt or class */
|
|
18
|
+
dt?: number
|
|
19
|
+
class?: string
|
|
20
|
+
/** number of samples with alterations of this gene */
|
|
21
|
+
count: number
|
|
22
|
+
}[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type GdcTopMutatedGeneResponse = {
|
|
26
|
+
genes: GdcGene[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const gdcTopMutatedGenePayload: RoutePayload = {
|
|
30
|
+
request: {
|
|
31
|
+
typeId: 'GdcTopMutatedGeneRequest'
|
|
32
|
+
},
|
|
33
|
+
response: {
|
|
34
|
+
typeId: 'GdcTopMutatedGeneResponse'
|
|
35
|
+
}
|
|
36
|
+
//examples: []
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type GeneLookupRequest = {
|
|
4
|
+
input: string
|
|
5
|
+
genome: string
|
|
6
|
+
deep: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type GeneLookupResponse = {
|
|
10
|
+
error?: string
|
|
11
|
+
hits: string[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const geneLookupPayload: RoutePayload = {
|
|
15
|
+
request: {
|
|
16
|
+
typeId: 'GeneLookupRequest'
|
|
17
|
+
},
|
|
18
|
+
response: {
|
|
19
|
+
typeId: 'GeneLookupResponse'
|
|
20
|
+
}
|
|
21
|
+
//examples: []
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type GenesetEnrichmentRequest = {
|
|
4
|
+
/** Sample genes to be queried */
|
|
5
|
+
genes: string[]
|
|
6
|
+
/** Background genes against which the sample genes will be queried */
|
|
7
|
+
fold_change: number[]
|
|
8
|
+
/** Filter non-coding genes */
|
|
9
|
+
filter_non_coding_genes: boolean
|
|
10
|
+
/** Genome build */
|
|
11
|
+
genome: string
|
|
12
|
+
/** Type of GO to be queried e.g MF, CC, BP */
|
|
13
|
+
geneSetGroup: string
|
|
14
|
+
/** Gene set name whose enrichment score is to be profiled */
|
|
15
|
+
geneset_name?: string
|
|
16
|
+
/** Pickle file to be queried for generating gsea image of a particular geneset */
|
|
17
|
+
pickle_file?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type pathway_attributes = {
|
|
21
|
+
/** Absolute enrichment score */
|
|
22
|
+
es: number
|
|
23
|
+
/** Normalized enrichment score */
|
|
24
|
+
nes: number
|
|
25
|
+
/** Size of gene set */
|
|
26
|
+
geneset_size: number
|
|
27
|
+
/** Leading edge genes */
|
|
28
|
+
leading_edge: string
|
|
29
|
+
/** pvalue */
|
|
30
|
+
pvalue: number
|
|
31
|
+
/** sidak (multiple testing correction) */
|
|
32
|
+
sidak: number
|
|
33
|
+
/** false discovery rate */
|
|
34
|
+
fdr: number
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type gsea_result = {
|
|
38
|
+
/** array of pathway_attributes */
|
|
39
|
+
data: pathway_attributes[]
|
|
40
|
+
/** file name of pickle file containing the stored gsea result in cache directory */
|
|
41
|
+
pickle_file: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Pass gsea image to client side */
|
|
45
|
+
type gsea_image = any
|
|
46
|
+
|
|
47
|
+
export type GenesetEnrichmentResponse = {
|
|
48
|
+
/** gsea result or an image (for plotting) is sent to client side */
|
|
49
|
+
pathway: gsea_result | gsea_image
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const genesetEnrichmentPayload: RoutePayload = {
|
|
53
|
+
request: {
|
|
54
|
+
typeId: 'GenesetEnrichmentRequest'
|
|
55
|
+
},
|
|
56
|
+
response: {
|
|
57
|
+
typeId: 'GenesetEnrichmentResponse'
|
|
58
|
+
}
|
|
59
|
+
//examples: []
|
|
60
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type GenesetOverrepresentationRequest = {
|
|
4
|
+
/** Sample genes to be queried */
|
|
5
|
+
sample_genes: string
|
|
6
|
+
/** Background genes against which the sample genes will be queried. if missing will use all protein-coding genes, available in gene db */
|
|
7
|
+
background_genes?: string
|
|
8
|
+
/** Genome build */
|
|
9
|
+
genome: string
|
|
10
|
+
/** msigdb branch term name. all genesets under this branch will be analyzed */
|
|
11
|
+
geneSetGroup: string
|
|
12
|
+
/** Boolean variable describing if non-coding genes should be filtered */
|
|
13
|
+
filter_non_coding_genes: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type GenesetOverrepresentationResponse = {
|
|
17
|
+
/** Name of pathway */
|
|
18
|
+
pathway_name: string
|
|
19
|
+
/** Original p-value */
|
|
20
|
+
p_value_original: number
|
|
21
|
+
/** Adjusted p-value */
|
|
22
|
+
p_value_adjusted: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type gene_overrepresentation_input = {
|
|
26
|
+
/** Input sample genes */
|
|
27
|
+
sample_genes: string
|
|
28
|
+
/** Input background genes */
|
|
29
|
+
background_genes?: string
|
|
30
|
+
/** Path to msigdb */
|
|
31
|
+
msigdb: string
|
|
32
|
+
/** Name of Gene Set Group */
|
|
33
|
+
gene_set_group: string
|
|
34
|
+
/** Path to gene db */
|
|
35
|
+
genedb: string
|
|
36
|
+
/** Boolean variable describing if non-coding genes should be filtered */
|
|
37
|
+
filter_non_coding_genes: boolean
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const genesetOverrepresentationPayload: RoutePayload = {
|
|
41
|
+
request: {
|
|
42
|
+
typeId: 'GenesetOverrepresentationRequest'
|
|
43
|
+
},
|
|
44
|
+
response: {
|
|
45
|
+
typeId: 'GenesetOverrepresentationResponse'
|
|
46
|
+
}
|
|
47
|
+
// examples: []
|
|
48
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
}
|
|
59
|
+
|
|
60
|
+
export const healthcheckPayload: RoutePayload = {
|
|
61
|
+
request: {
|
|
62
|
+
typeId: 'HealthCheckRequest'
|
|
63
|
+
},
|
|
64
|
+
response: {
|
|
65
|
+
typeId: 'HealthCheckResponse'
|
|
66
|
+
},
|
|
67
|
+
examples: [
|
|
68
|
+
{
|
|
69
|
+
request: { body: {} }
|
|
70
|
+
//response: {}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
request: {
|
|
74
|
+
body: { dsLabel: 'TermdbTest' }
|
|
75
|
+
}
|
|
76
|
+
//response: {}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BaseHicRequest, XYZCoord } from './hicdata.ts'
|
|
2
|
+
import { 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
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { 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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type RouteApi = {
|
|
2
|
+
endpoint: string
|
|
3
|
+
methods: {
|
|
4
|
+
get?: RoutePayload
|
|
5
|
+
post?: RoutePayload
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type RoutePayload = {
|
|
10
|
+
init?: RouteInit
|
|
11
|
+
request: RouteMethod
|
|
12
|
+
response: RouteMethod
|
|
13
|
+
/** if examples are not provided, will not test */
|
|
14
|
+
examples?: PayloadExample[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type RouteMethod = {
|
|
18
|
+
typeId: string
|
|
19
|
+
checker?: any
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type RouteInitArg = {
|
|
23
|
+
app: any
|
|
24
|
+
genome: any
|
|
25
|
+
genomes: any
|
|
26
|
+
}
|
|
27
|
+
type RouteHandler = (req: any, res: any) => void
|
|
28
|
+
type RouteInit = (a: RouteInitArg) => RouteHandler
|
|
29
|
+
type PayloadExample = {
|
|
30
|
+
request: {
|
|
31
|
+
body: any
|
|
32
|
+
}
|
|
33
|
+
response?: {
|
|
34
|
+
header?: any
|
|
35
|
+
/**
|
|
36
|
+
* if omitted, only payload shape is checked at runtime;
|
|
37
|
+
* if provided, will use deep equal to check at runtime
|
|
38
|
+
*/
|
|
39
|
+
body?: any
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
|
|
3
|
+
export type SampleWSImagesRequest = {
|
|
4
|
+
genome: string
|
|
5
|
+
dslabel: string
|
|
6
|
+
sample_id: string
|
|
7
|
+
wsimage: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type SampleWSImagesResponse = {
|
|
11
|
+
sampleWSImages: string[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type WSImage = {
|
|
15
|
+
filename: string
|
|
16
|
+
metadata: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const sampleWSImagesPayload: RoutePayload = {
|
|
20
|
+
request: {
|
|
21
|
+
typeId: 'SampleWSImagesRequest'
|
|
22
|
+
},
|
|
23
|
+
response: {
|
|
24
|
+
typeId: 'SampleWSImagesResponse'
|
|
25
|
+
}
|
|
26
|
+
// examples: []
|
|
27
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type DERequest = {
|
|
4
|
+
/** Genome build name */
|
|
5
|
+
genome: string
|
|
6
|
+
/** dataset label */
|
|
7
|
+
dslabel: string
|
|
8
|
+
/* Object containing two arrays of RNA seq count for DE analysis */
|
|
9
|
+
samplelst: any //{number[]; number[];}
|
|
10
|
+
/** Relative cpm cutoff for filtering a gene compared to all samples and genes in dataset */
|
|
11
|
+
min_count: number
|
|
12
|
+
/** Minimum total read count required for each sample */
|
|
13
|
+
min_total_count: number
|
|
14
|
+
/** Storage_type for storing data. Will deprecate text files */
|
|
15
|
+
storage_type: 'text' | 'HDF5'
|
|
16
|
+
/** Method of DE used wilcoxon/edgeR */
|
|
17
|
+
method?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ExpressionInput = {
|
|
21
|
+
/** Case samples separated by , */
|
|
22
|
+
case: string
|
|
23
|
+
/** Control samples separated by , */
|
|
24
|
+
control: string
|
|
25
|
+
/** data_type instructs rust to carry out differential gene expression analysis */
|
|
26
|
+
data_type: 'do_DE'
|
|
27
|
+
/** File containing raw gene counts for DE analysis */
|
|
28
|
+
input_file: string
|
|
29
|
+
/** Relative cpm cutoff for filtering a gene compared to all samples and genes in dataset */
|
|
30
|
+
min_count: number
|
|
31
|
+
/** Minimum total read count required for each sample */
|
|
32
|
+
min_total_count: number
|
|
33
|
+
/** Type of storage file: HDF5 or text. Text will be deprecated in the future */
|
|
34
|
+
storage_type: 'HDF5' | 'text'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type DEResponse = {
|
|
38
|
+
/** Array containing objects of each gene containing foldchange, gene name, gene symbol, original pvalue, adjusted pvalue */
|
|
39
|
+
data: string
|
|
40
|
+
/** Effective sample size for group 1 */
|
|
41
|
+
sample_size1: number
|
|
42
|
+
/** Effective sample size for group 2 */
|
|
43
|
+
sample_size2: number
|
|
44
|
+
/** Method of DE used wilcoxon/edgeR */
|
|
45
|
+
method: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const diffExpPayload: RoutePayload = {
|
|
49
|
+
request: {
|
|
50
|
+
typeId: 'DERequest'
|
|
51
|
+
},
|
|
52
|
+
response: {
|
|
53
|
+
typeId: 'DEResponse'
|
|
54
|
+
// will combine this with type checker
|
|
55
|
+
//valid: (t) => {}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type BoxPlotRequest = {
|
|
4
|
+
/** Args set in TermVocab */
|
|
5
|
+
/** term1 or term */
|
|
6
|
+
tw: any
|
|
7
|
+
genome: string
|
|
8
|
+
dslabel: string
|
|
9
|
+
/** term2 */
|
|
10
|
+
overlayTw?: any
|
|
11
|
+
filter: any
|
|
12
|
+
filter0: any
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type BoxPlotResponse = {
|
|
16
|
+
/** Absolute min value for all plots */
|
|
17
|
+
absMin?: number
|
|
18
|
+
/** Absolute max value for all plots */
|
|
19
|
+
absMax?: number
|
|
20
|
+
plots: BoxPlotEntry[]
|
|
21
|
+
/** Categories not shown in the final plot */
|
|
22
|
+
uncomputableValues: { label: string; value: number }[] | null
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type BoxPlotEntry = {
|
|
26
|
+
boxplot: BoxPlotData & { label: string }
|
|
27
|
+
/** color matching the value/category color */
|
|
28
|
+
color?: string
|
|
29
|
+
descrStats: BoxPlotDescrStatsEntry[]
|
|
30
|
+
/** Pertains to an uncomputable term value and
|
|
31
|
+
* whether or not the plot is hidden by default */
|
|
32
|
+
isHidden?: boolean
|
|
33
|
+
key: string
|
|
34
|
+
/** Formatted bins for numeric terms */
|
|
35
|
+
overlayBins?: any
|
|
36
|
+
/** Usually the same as key, but determined by the tw */
|
|
37
|
+
seriesId?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type BoxPlotData = {
|
|
41
|
+
/** Min/1st whisker value */
|
|
42
|
+
w1: number | undefined
|
|
43
|
+
/** Max/2nd whisker value */
|
|
44
|
+
w2: number | undefined
|
|
45
|
+
/** 5% */
|
|
46
|
+
p05: number
|
|
47
|
+
/** 25% */
|
|
48
|
+
p25: number
|
|
49
|
+
/** 50%, median */
|
|
50
|
+
p50: number
|
|
51
|
+
/** 75% */
|
|
52
|
+
p75: number
|
|
53
|
+
/** 95% */
|
|
54
|
+
p95: number
|
|
55
|
+
/** Interquartile region */
|
|
56
|
+
iqr: number
|
|
57
|
+
/** Outliers */
|
|
58
|
+
out: { value: number }[]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type BoxPlotDescrStatsEntry = {
|
|
62
|
+
/** Use lower case for sanity check
|
|
63
|
+
* 'total' | 'min' | 'p25' | 'median' | 'mean' | 'p75' | 'max' | 'sd' | 'variance' | 'iqr'
|
|
64
|
+
*/
|
|
65
|
+
id: string
|
|
66
|
+
label: string
|
|
67
|
+
value: number
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const boxplotPayload: RoutePayload = {
|
|
71
|
+
request: {
|
|
72
|
+
typeId: 'BoxPlotRequest'
|
|
73
|
+
},
|
|
74
|
+
response: {
|
|
75
|
+
typeId: 'BoxPlotResponse'
|
|
76
|
+
}
|
|
77
|
+
//examples: []
|
|
78
|
+
}
|