@sjcrh/proteinpaint-types 2.83.0 → 2.84.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 +4 -2
- package/src/dataset.ts +1 -1
- package/src/routes/brainImaging.ts +24 -3
- package/src/routes/termdb.boxplot.ts +12 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.84.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared type definitions between ProteinPaint server and client code",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -21,9 +21,11 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"ts-node": "^10.9.2",
|
|
23
23
|
"ts-patch": "^3.2.1",
|
|
24
|
-
"typescript": "^5.6.2",
|
|
25
24
|
"typia": "^4.1.14"
|
|
26
25
|
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"typescript": "^5.6.3"
|
|
28
|
+
},
|
|
27
29
|
"files": [
|
|
28
30
|
"src"
|
|
29
31
|
]
|
package/src/dataset.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CategoricalTW } from '../terms/categorical.ts'
|
|
2
|
+
|
|
1
3
|
export type GetBrainImagingRequest = {
|
|
2
4
|
/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
|
|
3
5
|
genome: string
|
|
@@ -5,17 +7,36 @@ export type GetBrainImagingRequest = {
|
|
|
5
7
|
dslabel: string
|
|
6
8
|
/** a user-defined brain template label in dataset file, such as Ref1, Ref2 */
|
|
7
9
|
refKey: string
|
|
8
|
-
/** when true will only return all the samples that have NIdata */
|
|
9
|
-
samplesOnly?: boolean
|
|
10
10
|
/** the slice index of sagittal, coronal and axial planes*/
|
|
11
11
|
l?: string
|
|
12
12
|
f?: string
|
|
13
13
|
t?: string
|
|
14
14
|
/** the sample names selected by the users to plot on brain template */
|
|
15
|
-
selectedSampleFileNames
|
|
15
|
+
selectedSampleFileNames: string[]
|
|
16
|
+
/* the term to divide the samples into groups */
|
|
17
|
+
divideByTW?: CategoricalTW
|
|
18
|
+
/* the term to color the samples based on their category */
|
|
19
|
+
overlayTW?: CategoricalTW
|
|
16
20
|
}
|
|
17
21
|
|
|
22
|
+
export type GetBrainImagingSamplesRequest = {
|
|
23
|
+
/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
|
|
24
|
+
genome: string
|
|
25
|
+
/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */
|
|
26
|
+
dslabel: string
|
|
27
|
+
/** a user-defined brain template label in dataset file, such as Ref1, Ref2 */
|
|
28
|
+
refKey: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type GetBrainImagingSamplesResponse = {
|
|
32
|
+
samples: BrainSample[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type BrainSample = { [key: string]: string }
|
|
36
|
+
|
|
18
37
|
export type GetBrainImagingResponse = {
|
|
19
38
|
/** the brain imaging plot */
|
|
20
39
|
brainImage: string
|
|
21
40
|
}
|
|
41
|
+
|
|
42
|
+
export type FilesByCategory = { [category: string]: { samples: string[]; color: string } }
|
|
@@ -4,16 +4,16 @@ export type BoxPlotRequest = {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
export type BoxPlotResponse = {
|
|
7
|
-
plots: BoxPlotEntry[]
|
|
8
7
|
/** Absolute min value for all plots */
|
|
9
8
|
absMin: number
|
|
10
9
|
/** Absolute max value for all plots */
|
|
11
10
|
absMax: number
|
|
12
11
|
/** Longest label length for all plots */
|
|
13
12
|
maxLabelLgth: number
|
|
13
|
+
plots: BoxPlotEntry[]
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
type BoxPlotEntry = {
|
|
17
17
|
boxplot: BoxPlotData
|
|
18
18
|
/** Label to show */
|
|
19
19
|
label: string
|
|
@@ -27,14 +27,23 @@ export type BoxPlotEntry = {
|
|
|
27
27
|
max: number
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
type BoxPlotData = {
|
|
31
|
+
/** Min/1st whisker value */
|
|
31
32
|
w1: number
|
|
33
|
+
/** Max/2nd whisker value */
|
|
32
34
|
w2: number
|
|
35
|
+
/** 5% */
|
|
33
36
|
p05: number
|
|
37
|
+
/** 25% */
|
|
34
38
|
p25: number
|
|
39
|
+
/** 50% */
|
|
35
40
|
p50: number
|
|
41
|
+
/** 75% */
|
|
36
42
|
p75: number
|
|
43
|
+
/** 95% */
|
|
37
44
|
p95: number
|
|
45
|
+
/** Interquartile region */
|
|
38
46
|
iqr: number
|
|
47
|
+
/** Outliers */
|
|
39
48
|
out: { value: number }[]
|
|
40
49
|
}
|