@sjcrh/proteinpaint-types 2.78.0-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/package.json +29 -0
- package/src/Mclass.ts +8 -0
- package/src/dataset.ts +1416 -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 +56 -0
- package/src/routes/brainImaging.ts +21 -0
- package/src/routes/burden.ts +67 -0
- package/src/routes/dzimages.ts +9 -0
- package/src/routes/errorResponse.ts +6 -0
- package/src/routes/filter.gdc.ts +15 -0
- package/src/routes/gdc.maf.ts +41 -0
- package/src/routes/gdc.mafBuild.ts +13 -0
- package/src/routes/gdc.topMutatedGenes.ts +25 -0
- package/src/routes/genelookup.ts +10 -0
- package/src/routes/genesetEnrichment.ts +46 -0
- package/src/routes/genesetOverrepresentation.ts +32 -0
- package/src/routes/healthcheck.ts +57 -0
- package/src/routes/hicdata.ts +37 -0
- package/src/routes/hicgenome.ts +22 -0
- package/src/routes/hicstat.ts +45 -0
- package/src/routes/sampledzimages.ts +1 -0
- package/src/routes/samplewsimages.ts +15 -0
- package/src/routes/termdb.DE.ts +25 -0
- package/src/routes/termdb.categories.ts +26 -0
- package/src/routes/termdb.cluster.ts +75 -0
- package/src/routes/termdb.getSampleImages.ts +14 -0
- package/src/routes/termdb.getTopTermsByType.ts +21 -0
- package/src/routes/termdb.getdescrstats.ts +31 -0
- package/src/routes/termdb.getnumericcategories.ts +21 -0
- package/src/routes/termdb.getpercentile.ts +17 -0
- package/src/routes/termdb.getrootterm.ts +22 -0
- package/src/routes/termdb.gettermchildren.ts +21 -0
- package/src/routes/termdb.singleSampleMutation.ts +18 -0
- package/src/routes/termdb.singlecellDEgenes.ts +30 -0
- package/src/routes/termdb.singlecellData.ts +55 -0
- package/src/routes/termdb.singlecellSamples.ts +35 -0
- package/src/routes/termdb.termsbyids.ts +15 -0
- package/src/routes/termdb.topVariablyExpressedGenes.ts +45 -0
- package/src/routes/termdb.violin.ts +74 -0
- package/src/routes/wsimages.ts +12 -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 +245 -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 +193 -0
- package/src/test/numeric.type.spec.ts +275 -0
- package/src/typedoc.js +30 -0
- package/src/vocab.ts +37 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { FileORURL } from '../fileOrUrl.ts'
|
|
2
|
+
|
|
3
|
+
export type BaseHicRequest = FileORURL & {
|
|
4
|
+
/** Value relates to the 1st parameter of straw tool, which accepts 'observed', 'expected', 'oe', 'norm', and 'distance' */
|
|
5
|
+
matrixType: 'observed' | 'expected' | 'oe' | 'log(oe)'
|
|
6
|
+
/** Either a base pair or fragment resolution calculated from the array*/
|
|
7
|
+
resolution: number
|
|
8
|
+
/** Normalization method, an option read from the file or NONE */
|
|
9
|
+
nmeth: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type HicdataRequest = BaseHicRequest & {
|
|
13
|
+
/** Position of first locus, in the format of chr:start:stop */
|
|
14
|
+
pos1: string
|
|
15
|
+
/** Position of second locus, in the format of chr:start:stop */
|
|
16
|
+
pos2: string // portal code must validate pos1 and pos2 values, to prevent xxx:456-321
|
|
17
|
+
/** If is in fragment resolution */
|
|
18
|
+
isfrag?: boolean
|
|
19
|
+
/** Minimum value cutoff */
|
|
20
|
+
mincutoff?: number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Item typed for documentation/explanation purposes*/
|
|
24
|
+
export type Item = [
|
|
25
|
+
/** position 1, x coordinate */
|
|
26
|
+
number,
|
|
27
|
+
/** position 2, y coordinate */
|
|
28
|
+
number,
|
|
29
|
+
/** inter-loci contact value */
|
|
30
|
+
number
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
export type HicdataResponse = {
|
|
34
|
+
/** Error message to display on the client, if applicable */
|
|
35
|
+
error?: string
|
|
36
|
+
items: Item[]
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseHicRequest, Item } from './hicdata.ts'
|
|
2
|
+
|
|
3
|
+
export type HicGenomeRequest = BaseHicRequest & {
|
|
4
|
+
/** Entire chromosome list read from the file (see hicstate) */
|
|
5
|
+
chrlst: string[]
|
|
6
|
+
/** window location */
|
|
7
|
+
embedder: string
|
|
8
|
+
/** whether or not the file contains 'chr' for the chromosomes */
|
|
9
|
+
nochr: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type HicGenomeResponse = {
|
|
13
|
+
data: {
|
|
14
|
+
/** First chromosome */
|
|
15
|
+
lead: string
|
|
16
|
+
/** Second chromosome */
|
|
17
|
+
follow: string
|
|
18
|
+
items: Item[]
|
|
19
|
+
}[]
|
|
20
|
+
/** Error message to display on the client, if applicable */
|
|
21
|
+
error?: string
|
|
22
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type HicstatRequestWithFile = {
|
|
2
|
+
/** HiC 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 HicstatRequestWithUrl = {
|
|
9
|
+
/** If url is provided, file should not be provided. Checked in validation type */
|
|
10
|
+
file?: never
|
|
11
|
+
/** Remote HiC file URL */
|
|
12
|
+
url: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type HicstatRequest = HicstatRequestWithFile | HicstatRequestWithUrl
|
|
16
|
+
|
|
17
|
+
/** Checks if a file or url is present before proceeding */
|
|
18
|
+
type RequireFileOrUrl<T> = T extends HicstatRequestWithFile | HicstatRequestWithUrl
|
|
19
|
+
? T
|
|
20
|
+
: { error: 'Either "file" or "url" must be provided' }
|
|
21
|
+
|
|
22
|
+
export type HicstatRequestWithValidation = RequireFileOrUrl<HicstatRequest>
|
|
23
|
+
|
|
24
|
+
export type HicstatResponse = {
|
|
25
|
+
/** Version number pulled from the header. Only hic versions 7-9 are acceptable */
|
|
26
|
+
version: 7 | 8 | 9
|
|
27
|
+
/**genome identifer */
|
|
28
|
+
'Genome ID': string
|
|
29
|
+
/** k:v of chrs and a position */
|
|
30
|
+
Chromosomes: {
|
|
31
|
+
/** Index of chr 1 through 22 */
|
|
32
|
+
[index: number]: number
|
|
33
|
+
All: number
|
|
34
|
+
X: number
|
|
35
|
+
Y: number
|
|
36
|
+
M: number
|
|
37
|
+
}
|
|
38
|
+
/** Orders Chromosomes keys (see above) */
|
|
39
|
+
chrorder: number[]
|
|
40
|
+
/** bins for base pair resolutions */
|
|
41
|
+
'Base pair-delimited resolutions': number[]
|
|
42
|
+
/** bins for fragment resolutions */
|
|
43
|
+
'Fragment-delimited resolutions': number[]
|
|
44
|
+
normalization: string[]
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './dzimages.ts'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type GetSampleWSImagesRequest = {
|
|
2
|
+
genome: string
|
|
3
|
+
dslabel: string
|
|
4
|
+
sample_id: string
|
|
5
|
+
wsimage: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type GetSampleWSImagesResponse = {
|
|
9
|
+
sampleWSImages: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type WSImage = {
|
|
13
|
+
filename: string
|
|
14
|
+
metadata: string
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type DERequest = {
|
|
2
|
+
/** Genome build name */
|
|
3
|
+
genome: string
|
|
4
|
+
/** dataset label */
|
|
5
|
+
dslabel: string
|
|
6
|
+
/* Object containing two arrays of RNA seq count for DE analysis */
|
|
7
|
+
samplelst: any //{number[]; number[];}
|
|
8
|
+
/** Relative cpm cutoff for filtering a gene compared to all samples and genes in dataset */
|
|
9
|
+
min_count: number
|
|
10
|
+
/** Minimum total read count required for each sample */
|
|
11
|
+
min_total_count: number
|
|
12
|
+
/** Method of DE used wilcoxon/edgeR */
|
|
13
|
+
method?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type DEResponse = {
|
|
17
|
+
/** Array containing objects of each gene containing foldchange, gene name, gene symbol, original pvalue, adjusted pvalue */
|
|
18
|
+
data: string
|
|
19
|
+
/** Effective sample size for group 1 */
|
|
20
|
+
sample_size1: number
|
|
21
|
+
/** Effective sample size for group 2 */
|
|
22
|
+
sample_size2: number
|
|
23
|
+
/** Method of DE used wilcoxon/edgeR */
|
|
24
|
+
method: string
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Filter } from '../filter.ts'
|
|
2
|
+
import type { TermWrapper } from '../terms/tw.ts'
|
|
3
|
+
|
|
4
|
+
export type getcategoriesRequest = {
|
|
5
|
+
genome: string
|
|
6
|
+
dslabel: string
|
|
7
|
+
embedder: string
|
|
8
|
+
/** termwrapper object */
|
|
9
|
+
tw: TermWrapper
|
|
10
|
+
filter?: Filter
|
|
11
|
+
/** quick fix only for gdc */
|
|
12
|
+
currentGeneNames?: string[]
|
|
13
|
+
/** optional property added by mds3 tk, to limit to cases mutated in this region */
|
|
14
|
+
rglst?: any
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface entries {
|
|
18
|
+
samplecount: number
|
|
19
|
+
key: string
|
|
20
|
+
label: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type getcategoriesResponse = {
|
|
24
|
+
lst: entries[]
|
|
25
|
+
orderedLabels?: []
|
|
26
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ErrorResponse } from './errorResponse.ts'
|
|
2
|
+
import { Filter } from '../filter.ts'
|
|
3
|
+
import { Term } from '../terms/term.ts'
|
|
4
|
+
import { GeneExpressionTerm } from '../terms/geneExpression.ts'
|
|
5
|
+
import { MetaboliteIntensityTerm } from '../terms/metaboliteIntensity.ts'
|
|
6
|
+
|
|
7
|
+
export type Gene = {
|
|
8
|
+
/** gene symbol, required */
|
|
9
|
+
gene: string
|
|
10
|
+
/** optionally, client may supply chr/start/stop; if missing, backend code may add them when processing native dataset */
|
|
11
|
+
chr?: string
|
|
12
|
+
start?: number
|
|
13
|
+
stop?: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type TermdbClusterRequestBase = {
|
|
17
|
+
/** Genome id */
|
|
18
|
+
genome: string
|
|
19
|
+
/** Dataset label */
|
|
20
|
+
dslabel: string
|
|
21
|
+
/** cluster method */
|
|
22
|
+
clusterMethod: string
|
|
23
|
+
/** distance method */
|
|
24
|
+
distanceMethod: string
|
|
25
|
+
/** pp filter */
|
|
26
|
+
filter?: Filter
|
|
27
|
+
/** todo gdc filter */
|
|
28
|
+
filter0?: any
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type TermdbClusterRequestGeneExpression = TermdbClusterRequestBase & {
|
|
32
|
+
/** Data type */
|
|
33
|
+
dataType: 'geneExpression'
|
|
34
|
+
/** List of terms */
|
|
35
|
+
terms: GeneExpressionTerm[]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type TermdbClusterRequestMetabolite = TermdbClusterRequestBase & {
|
|
39
|
+
/** Data type */
|
|
40
|
+
dataType: 'metaboliteIntensity'
|
|
41
|
+
/** List of terms */
|
|
42
|
+
terms: MetaboliteIntensityTerm[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type TermdbClusterRequest = TermdbClusterRequestGeneExpression | TermdbClusterRequestMetabolite
|
|
46
|
+
|
|
47
|
+
export type Hclust = {
|
|
48
|
+
merge: { n1: number; n2: number }[]
|
|
49
|
+
height: { height: number }[]
|
|
50
|
+
order: { name: string }[]
|
|
51
|
+
inputOrder: string[]
|
|
52
|
+
}
|
|
53
|
+
export type Clustering = {
|
|
54
|
+
row: Hclust
|
|
55
|
+
col: Hclust
|
|
56
|
+
matrix: number[][]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// response with clustering result of multiple gene/rows
|
|
60
|
+
export type ValidResponse = {
|
|
61
|
+
/** */
|
|
62
|
+
clustering: Clustering
|
|
63
|
+
/** */
|
|
64
|
+
byTermId: { [index: string]: any }
|
|
65
|
+
/** */
|
|
66
|
+
bySampleId: { [index: string]: any }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//response of just 1 gene, thus unable to do clustering
|
|
70
|
+
export type SingletermResponse = {
|
|
71
|
+
term: Term
|
|
72
|
+
data: any
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type TermdbClusterResponse = ErrorResponse | ValidResponse | SingletermResponse
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//import GdcFilter0 from './filter.gdc'
|
|
2
|
+
import type { Term } from '../terms/term.ts'
|
|
3
|
+
import type { Filter } from '../filter.ts'
|
|
4
|
+
|
|
5
|
+
export type TermdbTopTermsByTypeRequest = {
|
|
6
|
+
/** Ref genome */
|
|
7
|
+
genome: string
|
|
8
|
+
/** Ds label */
|
|
9
|
+
dslabel: string
|
|
10
|
+
/* Term type */
|
|
11
|
+
type: string
|
|
12
|
+
/** pp filter */
|
|
13
|
+
filter?: Filter
|
|
14
|
+
/** JSON, optional GDC cohort filter to restrict cases */
|
|
15
|
+
filter0?: any //GdcFilter0
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type TermdbTopTermsByTypeResponse = {
|
|
19
|
+
/** Array of gene names TODO may change element to objs */
|
|
20
|
+
terms: Term[]
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Filter } from '../filter.ts'
|
|
2
|
+
import type { TermWrapper } from '../terms/tw.ts'
|
|
3
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
4
|
+
|
|
5
|
+
export type getdescrstatsRequest = {
|
|
6
|
+
/** genome label in the serverconfig.json */
|
|
7
|
+
genome: string
|
|
8
|
+
/** dataset label for the given genome */
|
|
9
|
+
dslabel: string
|
|
10
|
+
embedder: string
|
|
11
|
+
/** wrapper of a numeric term, q.mode can be any as getData() will always pull sample-level values for summarizing */
|
|
12
|
+
tw: TermWrapper
|
|
13
|
+
/** if true, the (violin) plot is in log scale and must exclude 0-values from the stat */
|
|
14
|
+
logScale?: boolean
|
|
15
|
+
/** optional pp filter */
|
|
16
|
+
filter?: Filter
|
|
17
|
+
/** optional gdc filter */
|
|
18
|
+
filter0?: any
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface entries {
|
|
22
|
+
id: string
|
|
23
|
+
label: string
|
|
24
|
+
value: number
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type ValidResponse = {
|
|
28
|
+
values: entries[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type getdescrstatsResponse = ValidResponse | ErrorResponse
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Filter } from '../filter.ts'
|
|
2
|
+
|
|
3
|
+
export type getnumericcategoriesRequest = {
|
|
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
|
+
embedder: string
|
|
9
|
+
/** term id string */
|
|
10
|
+
tid: string
|
|
11
|
+
filter?: Filter
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface entries {
|
|
15
|
+
value: number
|
|
16
|
+
samplecount: number
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type getnumericcategoriesResponse = {
|
|
20
|
+
lst: entries[]
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Filter } from '../filter.ts'
|
|
2
|
+
|
|
3
|
+
export type getpercentileRequest = {
|
|
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
|
+
embedder: string
|
|
9
|
+
getpercentile: number[]
|
|
10
|
+
/** term id string */
|
|
11
|
+
tid: string
|
|
12
|
+
filter: Filter
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type getpercentileResponse = {
|
|
16
|
+
values: number[]
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type getroottermRequest = {
|
|
2
|
+
/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
|
|
3
|
+
genome: string
|
|
4
|
+
/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
|
|
5
|
+
dslabel: string
|
|
6
|
+
embedder: string
|
|
7
|
+
default_rootterm: number
|
|
8
|
+
cohortValues: string
|
|
9
|
+
treeFilter: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface entries {
|
|
13
|
+
name: string
|
|
14
|
+
id: string
|
|
15
|
+
isleaf: boolean
|
|
16
|
+
included_types: string[]
|
|
17
|
+
child_types: string[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type getroottermResponse = {
|
|
21
|
+
lst: entries[]
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type gettermchildrenRequest = {
|
|
2
|
+
/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
|
|
3
|
+
genome: string
|
|
4
|
+
/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
|
|
5
|
+
dslabel: string
|
|
6
|
+
embedder: string
|
|
7
|
+
get_children: number
|
|
8
|
+
tid: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface entries {
|
|
12
|
+
name: string
|
|
13
|
+
id: string
|
|
14
|
+
isleaf: boolean
|
|
15
|
+
included_types: string[]
|
|
16
|
+
child_types: string[]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type gettermchildrenResponse = {
|
|
20
|
+
lst: entries[]
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
2
|
+
|
|
3
|
+
export type TermdbSingleSampleMutationRequest = {
|
|
4
|
+
/** Genome id */
|
|
5
|
+
genome: string
|
|
6
|
+
/** Dataset label */
|
|
7
|
+
dslabel: string
|
|
8
|
+
/** sample id */
|
|
9
|
+
sample: string
|
|
10
|
+
}
|
|
11
|
+
type ValidResponse = {
|
|
12
|
+
/** List of mutation data points from this sample TODO change to type of M elements */
|
|
13
|
+
mlst: object[]
|
|
14
|
+
/** */
|
|
15
|
+
dt2total?: { dt: number; total: number }[]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type TermdbSingleSampleMutationResponse = ErrorResponse | ValidResponse
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
2
|
+
|
|
3
|
+
export type TermdbSinglecellDEgenesRequest = {
|
|
4
|
+
/** Genome id */
|
|
5
|
+
genome: string
|
|
6
|
+
/** Dataset label */
|
|
7
|
+
dslabel: string
|
|
8
|
+
/** Sample name
|
|
9
|
+
for GDC the value is "seurat.analysis.tsv" file UUID rather than sample name. the file contains the analysis results for an experiment
|
|
10
|
+
*/
|
|
11
|
+
sample: string
|
|
12
|
+
/** column name to provide cell groups/clustering, for which DE genes are precomputed. */
|
|
13
|
+
columnName: string
|
|
14
|
+
/** User selected cell group/cluster, corresponds to columnName, for which DE genes will be returned to client */
|
|
15
|
+
categoryName: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type HasDataResponse = {
|
|
19
|
+
/** list of significant DE genes for the given category in the sample */
|
|
20
|
+
genes: {
|
|
21
|
+
/** gene name */
|
|
22
|
+
name: string
|
|
23
|
+
/** adjusted p-value */
|
|
24
|
+
p_val_adj: number
|
|
25
|
+
/** log foldchange */
|
|
26
|
+
avg_log2FC: number
|
|
27
|
+
}[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type TermdbSinglecellDEgenesResponse = ErrorResponse | HasDataResponse
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
2
|
+
|
|
3
|
+
export type Cell = {
|
|
4
|
+
/** Cell id or barcode */
|
|
5
|
+
cellId: string
|
|
6
|
+
/** X coord of the cell */
|
|
7
|
+
x: number
|
|
8
|
+
/** Y coord of the cell */
|
|
9
|
+
y: number
|
|
10
|
+
/** Z coord of the cell, should be present for all cells and trigger 3d plot */
|
|
11
|
+
z?: number
|
|
12
|
+
/** The cell may have different classifications, e.g. by cell type, CNV, FUSION, etc. */
|
|
13
|
+
category: string
|
|
14
|
+
/** Gene expression data for this cell */
|
|
15
|
+
geneExp?: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type Plot = {
|
|
19
|
+
/** name of the plot */
|
|
20
|
+
name: string
|
|
21
|
+
/** List of cells */
|
|
22
|
+
cells: Cell[]
|
|
23
|
+
/** Column name to color by, e.g Cell type, CNV, Fusion */
|
|
24
|
+
colorBy: string
|
|
25
|
+
colorMap?: { [key: string]: string }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type TermdbSinglecellDataRequest = {
|
|
29
|
+
/** Genome id */
|
|
30
|
+
genome: string
|
|
31
|
+
/** Dataset label */
|
|
32
|
+
dslabel: string
|
|
33
|
+
/** Sample name for which the sc results will be shown.
|
|
34
|
+
for GDC the value is "seurat.analysis.tsv" file UUID rather than any sample name. the file contains the analysis results for an experiment */
|
|
35
|
+
sample: { eID?: string; sID: string }
|
|
36
|
+
/** List of plot names from this sample to request data for */
|
|
37
|
+
plots: string[]
|
|
38
|
+
/** Gene name to retrieve expression data for all cells of the given sample, and to overlay on maps */
|
|
39
|
+
gene?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type HasdataResponse = {
|
|
43
|
+
/** List of plots from singlecell experiment of this sample */
|
|
44
|
+
plots: Plot[]
|
|
45
|
+
|
|
46
|
+
/** Terms used to annotate cells */
|
|
47
|
+
//terms: Term[]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type NodataResponse = {
|
|
51
|
+
/** Flag to indicate no sc data for this sample */
|
|
52
|
+
nodata: boolean
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type TermdbSinglecellDataResponse = NodataResponse | ErrorResponse | HasdataResponse
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
2
|
+
|
|
3
|
+
export type Sample = {
|
|
4
|
+
/** Sample name, required */
|
|
5
|
+
sample: string
|
|
6
|
+
/** optional list of sc data files available for this sample, gdc-specific
|
|
7
|
+
if available:
|
|
8
|
+
each row of sample table will infact be one experiment.
|
|
9
|
+
selecting one will use its experimentID as "sample" value in request parameter
|
|
10
|
+
each experiment may have additional fields that may be displayed in table. see singleCell.samples.experimentColumns[]
|
|
11
|
+
|
|
12
|
+
if no exp, then each sample will just have one experiment identifiable by its sample name, and this name is used in request
|
|
13
|
+
*/
|
|
14
|
+
[key: string]: any //sample column/term value
|
|
15
|
+
experiments?: { experimentID: string }[]
|
|
16
|
+
|
|
17
|
+
// a sample may have additional fields that will be displayed in table, see singleCell.samples.sampleColumns[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type TermdbSinglecellsamplesRequest = {
|
|
21
|
+
/** Genome id */
|
|
22
|
+
genome: string
|
|
23
|
+
/** Dataset label */
|
|
24
|
+
dslabel: string
|
|
25
|
+
//filter0?: Filter0 // for gdc
|
|
26
|
+
}
|
|
27
|
+
type ValidResponse = {
|
|
28
|
+
/** List of sample names with singlecell data */
|
|
29
|
+
samples: Sample[]
|
|
30
|
+
fields: string[]
|
|
31
|
+
columnNames: string[]
|
|
32
|
+
sameLegend?: boolean
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type TermdbSinglecellsamplesResponse = ErrorResponse | ValidResponse
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TermWrapper } from '../terms/tw.ts'
|
|
2
|
+
|
|
3
|
+
export type gettermsbyidsRequest = {
|
|
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
|
+
embedder: string
|
|
9
|
+
/** term id string */
|
|
10
|
+
ids: string[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type gettermsbyidsResponse = {
|
|
14
|
+
terms: { [id: string]: TermWrapper }
|
|
15
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//import GdcFilter0 from './filter.gdc'
|
|
2
|
+
import type { Filter } from '../filter.ts'
|
|
3
|
+
import type { ErrorResponse } from './errorResponse.ts'
|
|
4
|
+
|
|
5
|
+
export type TermdbTopVariablyExpressedGenesRequest = {
|
|
6
|
+
/** Ref genome */
|
|
7
|
+
genome: string
|
|
8
|
+
/** Ds label */
|
|
9
|
+
dslabel: string
|
|
10
|
+
/** Number of top genes requested */
|
|
11
|
+
maxGenes: number
|
|
12
|
+
/** optional param defined by dataset. if to scan all or subset of genes */
|
|
13
|
+
geneSet?: {
|
|
14
|
+
/** Indicates the geneset to return
|
|
15
|
+
* all - all genes
|
|
16
|
+
* custom - user defined list of genes
|
|
17
|
+
* msigdb - msigdb geneset
|
|
18
|
+
*/
|
|
19
|
+
type: 'all' | 'custom' | 'msigdb'
|
|
20
|
+
/** Sent as null for 'all' types. Otherwise a list of gene symbols */
|
|
21
|
+
geneList: string[] | null
|
|
22
|
+
}
|
|
23
|
+
/** optional parameter defined in gdc dataset. not used for non-gdc ds */
|
|
24
|
+
min_median_log2_uqfpkm?: number
|
|
25
|
+
/** filter extreme values (in native implementation): true/false */
|
|
26
|
+
filter_extreme_values?: number
|
|
27
|
+
/** min_count of fpkm when filter_extreme_values (in native implementation) = true */
|
|
28
|
+
min_count?: number
|
|
29
|
+
/** min_total_count of fpkm when filter_extreme_values (in native implementation) = true */
|
|
30
|
+
min_total_count?: number
|
|
31
|
+
/** Filter type: variance/inter-quartile region (in native implementation) */
|
|
32
|
+
rank_type?: {
|
|
33
|
+
type: 'var' | 'iqr'
|
|
34
|
+
}
|
|
35
|
+
filter?: Filter
|
|
36
|
+
/** JSON, optional GDC cohort filter to restrict cases */
|
|
37
|
+
filter0?: any //GdcFilter0
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type ValidResponse = {
|
|
41
|
+
/** Array of gene names TODO may change element to objs */
|
|
42
|
+
genes: string[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type TermdbTopVariablyExpressedGenesResponse = ErrorResponse | ValidResponse
|