@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.
Files changed (62) hide show
  1. package/package.json +29 -0
  2. package/src/Mclass.ts +8 -0
  3. package/src/dataset.ts +1416 -0
  4. package/src/docs.json +16417 -0
  5. package/src/fileOrUrl.ts +15 -0
  6. package/src/filter.ts +125 -0
  7. package/src/genome.ts +123 -0
  8. package/src/index.ts +56 -0
  9. package/src/routes/brainImaging.ts +21 -0
  10. package/src/routes/burden.ts +67 -0
  11. package/src/routes/dzimages.ts +9 -0
  12. package/src/routes/errorResponse.ts +6 -0
  13. package/src/routes/filter.gdc.ts +15 -0
  14. package/src/routes/gdc.maf.ts +41 -0
  15. package/src/routes/gdc.mafBuild.ts +13 -0
  16. package/src/routes/gdc.topMutatedGenes.ts +25 -0
  17. package/src/routes/genelookup.ts +10 -0
  18. package/src/routes/genesetEnrichment.ts +46 -0
  19. package/src/routes/genesetOverrepresentation.ts +32 -0
  20. package/src/routes/healthcheck.ts +57 -0
  21. package/src/routes/hicdata.ts +37 -0
  22. package/src/routes/hicgenome.ts +22 -0
  23. package/src/routes/hicstat.ts +45 -0
  24. package/src/routes/sampledzimages.ts +1 -0
  25. package/src/routes/samplewsimages.ts +15 -0
  26. package/src/routes/termdb.DE.ts +25 -0
  27. package/src/routes/termdb.categories.ts +26 -0
  28. package/src/routes/termdb.cluster.ts +75 -0
  29. package/src/routes/termdb.getSampleImages.ts +14 -0
  30. package/src/routes/termdb.getTopTermsByType.ts +21 -0
  31. package/src/routes/termdb.getdescrstats.ts +31 -0
  32. package/src/routes/termdb.getnumericcategories.ts +21 -0
  33. package/src/routes/termdb.getpercentile.ts +17 -0
  34. package/src/routes/termdb.getrootterm.ts +22 -0
  35. package/src/routes/termdb.gettermchildren.ts +21 -0
  36. package/src/routes/termdb.singleSampleMutation.ts +18 -0
  37. package/src/routes/termdb.singlecellDEgenes.ts +30 -0
  38. package/src/routes/termdb.singlecellData.ts +55 -0
  39. package/src/routes/termdb.singlecellSamples.ts +35 -0
  40. package/src/routes/termdb.termsbyids.ts +15 -0
  41. package/src/routes/termdb.topVariablyExpressedGenes.ts +45 -0
  42. package/src/routes/termdb.violin.ts +74 -0
  43. package/src/routes/wsimages.ts +12 -0
  44. package/src/terms/categorical.ts +106 -0
  45. package/src/terms/condition.ts +55 -0
  46. package/src/terms/geneExpression.ts +32 -0
  47. package/src/terms/geneVariant.ts +51 -0
  48. package/src/terms/metaboliteIntensity.ts +31 -0
  49. package/src/terms/numeric.ts +245 -0
  50. package/src/terms/q.ts +38 -0
  51. package/src/terms/samplelst.ts +41 -0
  52. package/src/terms/singleCellCellType.ts +22 -0
  53. package/src/terms/singleCellGeneExpression.ts +28 -0
  54. package/src/terms/snp.ts +28 -0
  55. package/src/terms/snps.ts +110 -0
  56. package/src/terms/term.ts +184 -0
  57. package/src/terms/tw.ts +38 -0
  58. package/src/terms/updated-types.ts +9 -0
  59. package/src/termsetting.ts +193 -0
  60. package/src/test/numeric.type.spec.ts +275 -0
  61. package/src/typedoc.js +30 -0
  62. package/src/vocab.ts +37 -0
@@ -0,0 +1,15 @@
1
+ type FileNotURL = {
2
+ /** File path from tp/ */
3
+ file: string
4
+ /** If file is provided, url should not be provided. Checked in validation type */
5
+ url?: never
6
+ }
7
+
8
+ type URLNotFile = {
9
+ /** If url is provided, file should not be provided. Checked in validation type */
10
+ file?: never
11
+ /** Remote file URL */
12
+ url: string
13
+ }
14
+
15
+ export type FileORURL = FileNotURL | URLNotFile
package/src/filter.ts ADDED
@@ -0,0 +1,125 @@
1
+ import { BaseValue } from './terms/term.ts'
2
+ import { NumericTerm, NumericBin } from './terms/numeric.ts'
3
+ import { CategoricalTerm } from './terms/categorical.ts'
4
+ import { GeneVariantTerm } from './terms/geneVariant.ts'
5
+ import { ConditionTerm } from './terms/condition.ts'
6
+
7
+ /*
8
+ --------EXPORTED--------
9
+ Tvs
10
+ LstEntry
11
+ Filter
12
+
13
+ */
14
+
15
+ /*** types supporting Tvs type ***/
16
+
17
+ export type BaseTvs = {
18
+ join?: string //and, or
19
+ isnot?: boolean
20
+ }
21
+
22
+ export type CategoricalTvs = BaseTvs & {
23
+ term: CategoricalTerm
24
+ groupset_label?: string
25
+ values: BaseValue[]
26
+ }
27
+
28
+ export type NumericTvs = BaseTvs & {
29
+ term: NumericTerm
30
+ ranges: NumericBin[]
31
+ // TODO: define uncomputable values object
32
+ values: {
33
+ key: string
34
+ value: number
35
+ uncomputable: true
36
+ label?: string
37
+ }[]
38
+ }
39
+
40
+ type GradeAndChildEntry = {
41
+ grade: number
42
+ grade_label: string
43
+ child_id: string | undefined
44
+ child_label: string
45
+ }
46
+
47
+ export type ConditionTvs = BaseTvs & {
48
+ term: ConditionTerm
49
+ value_by_max_grade?: boolean
50
+ value_by_most_recent?: boolean
51
+ value_by_computable_grade?: boolean
52
+ grade_and_child?: GradeAndChildEntry[]
53
+ }
54
+
55
+ type GeneVariantOrigin = 'somatic' | 'germline'
56
+
57
+ type SNVIndelClasses =
58
+ | 'M'
59
+ | 'E'
60
+ | 'F'
61
+ | 'N'
62
+ | 'S'
63
+ | 'D'
64
+ | 'I'
65
+ | 'P'
66
+ | 'L'
67
+ | 'Intron'
68
+ | 'Blank'
69
+ | 'WT'
70
+ | 'ITD'
71
+ | 'DEL'
72
+ | 'NLOSS'
73
+ | 'CLOSS'
74
+ | 'Utr3'
75
+ | 'Utr5'
76
+ | 'X'
77
+ | 'noncoding'
78
+ type SNVIndelTvsValue = {
79
+ dt: 1
80
+ mclassLst: SNVIndelClasses[]
81
+ mclassExcludeLst: SNVIndelClasses[]
82
+ origin?: GeneVariantOrigin
83
+ }
84
+
85
+ type CNVClasses = 'CNV_amp' | 'CNV_losss' | 'CNV_loh' | 'Blank' | 'WT'
86
+ type CNVTvsValue = {
87
+ dt: 4
88
+ mclassLst: CNVClasses[]
89
+ mclassExcludeLst: CNVClasses[]
90
+ origin?: GeneVariantOrigin
91
+ }
92
+
93
+ type SVClasses = 'SV' | 'Blank' | 'WT'
94
+ type SVTvsValue = {
95
+ dt: 5
96
+ mclassLst: SVClasses[]
97
+ mclassExcludeLst: SVClasses[]
98
+ origin?: GeneVariantOrigin
99
+ }
100
+
101
+ type FusionRNAClasses = 'Fuserna' | 'Blank' | 'WT'
102
+ type FusionTvsValue = {
103
+ dt: 2
104
+ mclassLst: FusionRNAClasses[]
105
+ mclassExcludeLst: FusionRNAClasses[]
106
+ origin?: GeneVariantOrigin
107
+ }
108
+
109
+ type GeneVariantTvsValue = SNVIndelTvsValue | CNVTvsValue | SVTvsValue | FusionTvsValue
110
+
111
+ type GeneVariantTvs = BaseTvs & {
112
+ term: GeneVariantTerm
113
+ values: GeneVariantTvsValue[]
114
+ }
115
+ /*** types supporting Filter type ***/
116
+
117
+ export type Tvs = CategoricalTvs | NumericTvs | ConditionTvs | GeneVariantTvs // | SampleLstTvs ...
118
+
119
+ export type Filter = {
120
+ type: 'lst'
121
+ in?: boolean
122
+ join: 'and' | 'or'
123
+ tag?: string // client-side only
124
+ lst: (Filter | Tvs)[]
125
+ }
package/src/genome.ts ADDED
@@ -0,0 +1,123 @@
1
+ import { Cohort } from './dataset.ts'
2
+
3
+ /********* server/genome ********
4
+
5
+ --------EXPORTED--------
6
+ MinGenome
7
+ Genome
8
+
9
+ */
10
+
11
+ type GeneDb = {
12
+ dbfile: string
13
+ }
14
+
15
+ type TermDbs = {
16
+ [key: string]: TermDbsEntry
17
+ }
18
+
19
+ type TermDbsEntry = {
20
+ label: string
21
+ cohort: Cohort
22
+ }
23
+
24
+ type DbStatement = {
25
+ dbfile: string
26
+ statement: string
27
+ }
28
+
29
+ type Snp = {
30
+ bigbedfile: string
31
+ }
32
+
33
+ type FimoMotif = {
34
+ db: string
35
+ annotationfile: string
36
+ }
37
+
38
+ type TrackCategoryEntry = {
39
+ color: string
40
+ label: string
41
+ }
42
+
43
+ type TrackCategories = {
44
+ [index: string]: TrackCategoryEntry | undefined
45
+ }
46
+
47
+ type Track = {
48
+ __isgene?: boolean
49
+ translatecoding?: boolean
50
+ file: string
51
+ type: string
52
+ name: string
53
+ categories?: TrackCategories
54
+ stackheight?: number
55
+ stackspace?: number
56
+ vpad?: number
57
+ color?: string
58
+ onerow?: boolean
59
+ }
60
+
61
+ type DefaultCoord = {
62
+ chr: string
63
+ start: number
64
+ stop: number
65
+ gene?: string
66
+ }
67
+
68
+ type GeneSet = {
69
+ name: string
70
+ lst: string[]
71
+ }
72
+
73
+ type HicEnzymeFragment = {
74
+ enzyme: string
75
+ file: string
76
+ }
77
+
78
+ type HicDomainSetEntry = {
79
+ name: string
80
+ longname: string
81
+ file: string
82
+ }
83
+
84
+ type HicDomainSet = {
85
+ [index: string]: HicDomainSetEntry
86
+ }
87
+
88
+ type HicDomainGrpEntry = {
89
+ name: string
90
+ reference: string
91
+ sets: HicDomainSet
92
+ }
93
+
94
+ type HicDomainGroups = {
95
+ [index: string]: HicDomainGrpEntry
96
+ }
97
+
98
+ type HicDomain = {
99
+ [index: string]: HicDomainGroups
100
+ }
101
+
102
+ //Separated to force g.tracks as required, see hgvirus.ts
103
+ export type MinGenome = {
104
+ isMinGenome?: boolean
105
+ species: string
106
+ genomefile: string
107
+ genedb: GeneDb
108
+ defaultcoord: DefaultCoord
109
+ hicenzymefragment?: HicEnzymeFragment[]
110
+ majorchr: string
111
+ }
112
+
113
+ export type Genome = MinGenome & {
114
+ termdbs?: TermDbs
115
+ proteindomain?: DbStatement
116
+ repeatmasker?: DbStatement
117
+ snp?: Snp
118
+ fimo_motif?: FimoMotif
119
+ tracks?: Track[]
120
+ geneset?: GeneSet[]
121
+ hicdomain?: HicDomain
122
+ minorchr?: string
123
+ }
package/src/index.ts ADDED
@@ -0,0 +1,56 @@
1
+ // please list in alphanumeric order
2
+ export * from './genome.ts'
3
+ export * from './dataset.ts'
4
+ export * from './termsetting.ts'
5
+ export * from './filter.ts'
6
+ export * from './routes/brainImaging.ts'
7
+ export * from './routes/burden.ts'
8
+ export * from './routes/dzimages.ts'
9
+ export * from './routes/errorResponse.ts'
10
+ export * from './routes/filter.gdc.ts'
11
+ export * from './routes/gdc.maf.ts'
12
+ export * from './routes/gdc.mafBuild.ts'
13
+ export * from './routes/gdc.topMutatedGenes.ts'
14
+ export * from './routes/genelookup.ts'
15
+ export * from './routes/genesetEnrichment.ts'
16
+ export * from './routes/genesetOverrepresentation.ts'
17
+ export * from './routes/healthcheck.ts'
18
+ export * from './routes/hicdata.ts'
19
+ export * from './routes/hicgenome.ts'
20
+ export * from './routes/hicstat.ts'
21
+ export * from './routes/sampledzimages.ts'
22
+ export * from './routes/samplewsimages.ts'
23
+ export * from './routes/termdb.categories.ts'
24
+ export * from './routes/termdb.cluster.ts'
25
+ export * from './routes/termdb.DE.ts'
26
+ export * from './routes/termdb.getdescrstats.ts'
27
+ export * from './routes/termdb.getnumericcategories.ts'
28
+ export * from './routes/termdb.getpercentile.ts'
29
+ export * from './routes/termdb.getrootterm.ts'
30
+ export * from './routes/termdb.getSampleImages.ts'
31
+ export * from './routes/termdb.gettermchildren.ts'
32
+ export * from './routes/termdb.getSampleImages.ts'
33
+ export * from './routes/termdb.getTopTermsByType.ts'
34
+ export * from './routes/termdb.singlecellData.ts'
35
+ export * from './routes/termdb.singlecellDEgenes.ts'
36
+ export * from './routes/termdb.singlecellSamples.ts'
37
+ export * from './routes/termdb.singleSampleMutation.ts'
38
+ export * from './routes/termdb.termsbyids.ts'
39
+ export * from './routes/termdb.topVariablyExpressedGenes.ts'
40
+ export * from './routes/termdb.violin.ts'
41
+ export * from './routes/wsimages.ts'
42
+ export * from './terms/categorical.ts'
43
+ export * from './terms/condition.ts'
44
+ export * from './terms/numeric.ts'
45
+ export * from './terms/geneVariant.ts'
46
+ export * from './terms/geneExpression.ts'
47
+ export * from './terms/metaboliteIntensity.ts'
48
+ export * from './terms/singleCellCellType.ts'
49
+ export * from './terms/singleCellGeneExpression.ts'
50
+ export * from './terms/snp.ts'
51
+ export * from './terms/snps.ts'
52
+ export * from './terms/samplelst.ts'
53
+ export * from './terms/q.ts'
54
+ export * from './terms/term.ts'
55
+ export * from './terms/tw.ts'
56
+ export * from './vocab.ts'
@@ -0,0 +1,21 @@
1
+ export type GetBrainImagingRequest = {
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
+ /** a user-defined brain template label in dataset file, such as Ref1, Ref2 */
7
+ refKey: string
8
+ /** when true will only return all the samples that have NIdata */
9
+ samplesOnly?: boolean
10
+ /** the slice index of sagittal, coronal and axial planes*/
11
+ l?: string
12
+ f?: string
13
+ t?: string
14
+ /** the sample names selected by the users to plot on brain template */
15
+ selectedSampleFileNames?: string[]
16
+ }
17
+
18
+ export type GetBrainImagingResponse = {
19
+ /** the brain imaging plot */
20
+ brainImage: string
21
+ }
@@ -0,0 +1,67 @@
1
+ import { createValidate } from 'typia'
2
+
3
+ export type BurdenRequest = {
4
+ /** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
5
+ genome: string
6
+ /** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
7
+ dslabel: string
8
+ /** the diagnosis group:
9
+ * 1= "Acute lymphoblastic leukemia (ALL)"
10
+ * 2= "Acute Myeloid Leukemia (AML)"
11
+ * 3= "Hodgkin lymphoma (HL)"
12
+ * 4= "Non-Hodgkin lymphoma (NHL)"
13
+ * 5= "Central nervous system (CNS)"
14
+ * 6= "Bone tumor (BT)"
15
+ * 7= "Soft Tissue Sarcoma (STS)"
16
+ * 8= "Wilms tumor (WT)"
17
+ * 9= "Neuroblastoma (NB)"
18
+ * 10= "Retinoblastoma (Rb)"
19
+ * 11= "Germ cell tumor (GCT)"
20
+ */
21
+ diaggrp: number
22
+ /** sex: 0=Female, 1=Male */
23
+ sex: number
24
+ /** race or ethnicity: 1=Yes, 0=No */
25
+ white: number
26
+ /** Age of diagnosis, in years */
27
+ agedx: number
28
+ /** bleomycin: a chemotherapy treatment drug, mg/m^2 */
29
+ bleo: number
30
+ /** Etoposide: a chemotherapy treatment drug, mg/m^2 */
31
+ etop: number
32
+ /** Cisplatin: a chemotherapy treatment drug, mg/m^2 */
33
+ cisp: number
34
+ /** Carboplatin: a class of chemotherapy treatment drugs, mg/m^2 */
35
+ carbo: number
36
+ /** Steriods: a class of chemotherapy treatment drugs, mg/m^2 */
37
+ steriod: number
38
+ /** Vincristine: a chemotherapy treatment drug, mg/m^2 */
39
+ vcr: number
40
+ /** High-dose methothrexate: a chemotherapy treatment drug, mg/m^2 */
41
+ hdmtx: number
42
+ /** Intrathecal methothrexate: a chemotherapy treatment drug, mg/m^2 */
43
+ itmt: number
44
+ /** Cyclophosphamide: a chemotherapy treatment drug, mg/m^2 */
45
+ ced: number
46
+ /** Anthracycline: a chemotherapy treatment drug, mg/m^2 */
47
+ dox: number
48
+ /** Heart radiation, Gy */
49
+ heart: number
50
+ /** Brain radiation, Gy */
51
+ brain: number
52
+ /** Abdominal radiation, Gy */
53
+ abd: number
54
+ /** Pelvic radiation, Gy */
55
+ pelvis: number
56
+ /** Chest radiation, Gy */
57
+ chest: number
58
+ }
59
+
60
+ export type BurdenResponse = {
61
+ status: string
62
+ keys: string[]
63
+ rows: number[][]
64
+ }
65
+
66
+ export const validBurdenRequest = createValidate<BurdenRequest>()
67
+ export const validBurdenResponse = createValidate<BurdenResponse>()
@@ -0,0 +1,9 @@
1
+ export type GetSampleDZImagesRequest = {
2
+ genome: string
3
+ dslabel: string
4
+ sample_id: string
5
+ }
6
+
7
+ export type GetSampleDZImagesResponse = {
8
+ sampleDZImages: string
9
+ }
@@ -0,0 +1,6 @@
1
+ export type ErrorResponse = {
2
+ /* Status code. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */
3
+ status: number
4
+ /* Msg */
5
+ error: string
6
+ }
@@ -0,0 +1,15 @@
1
+ /* the gdc cohort filter object
2
+ is invisible on pp ui
3
+ always used as "filter0" property in pp client code and in request to pp back
4
+ pp does not compute on it, on pp backend, it's passed to gdc api queries
5
+
6
+ FIXME type is not properly defined yet
7
+ */
8
+ export type GdcFilter0 = {
9
+ op: string
10
+ // TODO: this should allow an array of objects, and/or nesting ???
11
+ content: {
12
+ field: string
13
+ value: string
14
+ }
15
+ }
@@ -0,0 +1,41 @@
1
+ //import GdcFilter0 from './filter.gdc'
2
+
3
+ // an object representing gdc maf file, to be shown on client table
4
+
5
+ export type File = {
6
+ /** A string representing the file's UUID (Universally Unique Identifier) , can be accessed via https://api.gdc.cancer.gov/data/<uuid>*/
7
+ id: string
8
+ /** A string representing a submitter ID for the case associated with this file */
9
+ case_submitter_id: string
10
+ // case uuid
11
+ case_uuid: string
12
+ /** An integer as the byte size of this file, compressed */
13
+ file_size: number
14
+ /** Array of strings, each is a sample type, for all samples involved in generating the maf file */
15
+ sample_types: string[]
16
+ /** A string representing the type of workflow used to generate or process this file */
17
+ //workflow_type: string
18
+ /** A string as the project id of the case */
19
+ project_id: string
20
+ }
21
+
22
+ enum ExperimentalStrategy {
23
+ targeted = 'Targeted Sequencing',
24
+ wxs = 'WXS'
25
+ }
26
+
27
+ export type GdcMafRequest = {
28
+ /** Name of exp strategy to get maf files for */
29
+ experimentalStrategy: ExperimentalStrategy
30
+ /** JSON, optional GDC cohort filter to restrict cases; if supplied, will only get maf files for these cases. the filter is readonly and pass to GDC API query */
31
+ filter0?: any
32
+ }
33
+
34
+ export type GdcMafResponse = {
35
+ /** List of file objects passing filter and to be displayed on client */
36
+ files: File[]
37
+ /** Total number of files found by API (in case bigger than files.length) */
38
+ filesTotal: number
39
+ /** Maximum total size of maf files allowed, for indicating on ui while selecting files */
40
+ maxTotalSizeCompressed: number
41
+ }
@@ -0,0 +1,13 @@
1
+ /*
2
+
3
+ export type GdcMafBuildResponse = {
4
+ FIXME response is a binary stream. don't know a way to type it
5
+ }
6
+ */
7
+
8
+ export type GdcMafBuildRequest = {
9
+ /** List of input file uuids in gdc */
10
+ fileIdLst: string[]
11
+ /** List of columns in output MAF file */
12
+ columns: string[]
13
+ }
@@ -0,0 +1,25 @@
1
+ export type GdcTopMutatedGeneRequest = {
2
+ /** to restrict to CGC genes */
3
+ geneFilter?: 'CGC'
4
+ /** max number of genes to return */
5
+ maxGenes?: number
6
+ /** gdc cohort filter */
7
+ filter0?: object
8
+ }
9
+
10
+ export type GdcGene = {
11
+ /** gene symbol */
12
+ gene: string
13
+ /** optional attributes on number of mutated cases per dt */
14
+ mutationStat?: {
15
+ /** each stat object is identified by either dt or class */
16
+ dt?: number
17
+ class?: string
18
+ /** number of samples with alterations of this gene */
19
+ count: number
20
+ }[]
21
+ }
22
+
23
+ export type GdcTopMutatedGeneResponse = {
24
+ genes: GdcGene[]
25
+ }
@@ -0,0 +1,10 @@
1
+ export type GeneLookupRequest = {
2
+ input: string
3
+ genome: string
4
+ deep: boolean
5
+ }
6
+
7
+ export type GeneLookupResponse = {
8
+ error?: string
9
+ hits: string[]
10
+ }
@@ -0,0 +1,46 @@
1
+ export type genesetEnrichmentRequest = {
2
+ /** Sample genes to be queried */
3
+ genes: string[]
4
+ /** Background genes against which the sample genes will be queried */
5
+ fold_change: number[]
6
+ /** Genome build */
7
+ genome: string
8
+ /** Type of GO to be queried e.g MF, CC, BP */
9
+ geneSetGroup: string
10
+ /** Gene set name whose enrichment score is to be profiled */
11
+ geneset_name?: string
12
+ /** Pickle file to be queried for generating gsea image of a particular geneset */
13
+ pickle_file?: string
14
+ }
15
+
16
+ type pathway_attributes = {
17
+ /** Absolute enrichment score */
18
+ es: number
19
+ /** Normalized enrichment score */
20
+ nes: number
21
+ /** Size of gene set */
22
+ geneset_size: number
23
+ /** Leading edge genes */
24
+ leading_edge: string
25
+ /** pvalue */
26
+ pvalue: number
27
+ /** sidak (multiple testing correction) */
28
+ sidak: number
29
+ /** false discovery rate */
30
+ fdr: number
31
+ }
32
+
33
+ type gsea_result = {
34
+ /** array of pathway_attributes */
35
+ data: pathway_attributes[]
36
+ /** file name of pickle file containing the stored gsea result in cache directory */
37
+ pickle_file: string
38
+ }
39
+
40
+ /** Pass gsea image to client side */
41
+ type gsea_image = any
42
+
43
+ export type genesetEnrichmentResponse = {
44
+ /** gsea result or an image (for plotting) is sent to client side */
45
+ pathway: gsea_result | gsea_image
46
+ }
@@ -0,0 +1,32 @@
1
+ export type genesetOverrepresentationRequest = {
2
+ /** Sample genes to be queried */
3
+ sample_genes: string
4
+ /** Background genes against which the sample genes will be queried. if missing will use all protein-coding genes, available in gene db */
5
+ background_genes?: string
6
+ /** Genome build */
7
+ genome: string
8
+ /** msigdb branch term name. all genesets under this branch will be analyzed */
9
+ geneSetGroup: string
10
+ }
11
+
12
+ export type genesetOverrepresentationResponse = {
13
+ /** Name of pathway */
14
+ pathway_name: string
15
+ /** Original p-value */
16
+ p_value_original: number
17
+ /** Adjusted p-value */
18
+ p_value_adjusted: number
19
+ }
20
+
21
+ export type gene_overrepresentation_input = {
22
+ /** Input sample genes */
23
+ sample_genes: string
24
+ /** Input background genes */
25
+ background_genes?: string
26
+ /** Path to msigdb */
27
+ msigdb: string
28
+ /** Name of Gene Set Group */
29
+ gene_set_group: string
30
+ /** Path to gene db */
31
+ genedb: string
32
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * for documentation only, to signify integer: not type-checked statically
3
+ */
4
+ type int = number
5
+
6
+ /**
7
+ * Information aboute the server build version and dates,
8
+ * including the date when the server was last launched
9
+ */
10
+ export type VersionInfo = {
11
+ pkgver: string
12
+ codedate: string
13
+ launchdate: string
14
+ deps: {
15
+ [pkgName: string]: {
16
+ /** the version as found in node_modules/[package]/package.json */
17
+ installed?: string
18
+ /** the version as entered in the project's package.dependencies */
19
+ entry?: string
20
+ }
21
+ }
22
+ }
23
+
24
+ type BuildByGenome = {
25
+ [index: string]: GenomeBuildInfo
26
+ }
27
+
28
+ export type GenomeBuildInfo = {
29
+ genedb: DbInfo
30
+ termdbs?: {
31
+ [index: string]: DbInfo
32
+ }
33
+ }
34
+
35
+ type DbInfo = {
36
+ buildDate: string // "unknown" or a Date-convertible string
37
+ tables?: {
38
+ [index: string]: int
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Server status and data related to it's health
44
+ */
45
+ export type HealthCheckResponse = {
46
+ status: 'ok' | 'error'
47
+ genomes: BuildByGenome
48
+ versionInfo: VersionInfo
49
+ byDataset: {
50
+ [dslabel: string]: any
51
+ }
52
+ auth?: {
53
+ errors?: string[]
54
+ }[]
55
+ w?: number[]
56
+ rs?: number
57
+ }