@sjcrh/proteinpaint-types 2.140.1-2 → 2.141.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/dist/brainImaging.js +1 -1
- package/dist/{chunk-Y6Z6XAFN.js → chunk-424IUJWR.js} +532 -154
- package/dist/{chunk-NHELOLDH.js → chunk-56JQGGZJ.js} +4103 -2234
- package/dist/{chunk-5BKOSJEU.js → chunk-77RH7U6G.js} +2101 -981
- package/dist/{chunk-F2ZZ5J3F.js → chunk-EOBFYFLQ.js} +2483 -1911
- package/dist/{chunk-34LXTZYA.js → chunk-I7FTK55B.js} +2162 -1590
- package/dist/{chunk-4S36DRJ4.js → chunk-KEJROUTM.js} +1314 -572
- package/dist/{chunk-ZHCVV36H.js → chunk-QWAPDNYB.js} +2486 -1914
- package/dist/{chunk-HJ7XFSJK.js → chunk-S6OBK4RE.js} +528 -150
- package/dist/{chunk-P3Z422N2.js → chunk-T3GTEGQN.js} +532 -154
- package/dist/{chunk-2QKCLUH3.js → chunk-UYBVE3DL.js} +2478 -1906
- package/dist/{chunk-KDHGWAOS.js → chunk-VMQUAU5V.js} +2481 -1909
- package/dist/{chunk-G5BYLEJC.js → chunk-WCWYMCZD.js} +532 -154
- package/dist/correlationVolcano.js +1 -1
- package/dist/index.js +12 -12
- package/dist/termdb.boxplot.js +1 -1
- package/dist/termdb.categories.js +1 -1
- package/dist/termdb.cluster.js +1 -1
- package/dist/termdb.descrstats.js +1 -1
- package/dist/termdb.numericcategories.js +1 -1
- package/dist/termdb.percentile.js +1 -1
- package/dist/termdb.termsbyids.js +1 -1
- package/dist/termdb.topTermsByType.js +1 -1
- package/dist/termdb.topVariablyExpressedGenes.js +1 -1
- package/dist/termdb.violin.js +1 -1
- package/package.json +1 -2
- package/src/dataset.ts +14 -4
- package/src/genome.ts +2 -2
- package/src/index.ts +1 -0
- package/src/routes/termdb.cluster.ts +6 -6
- package/src/terms/categorical.ts +0 -8
- package/src/terms/condition.ts +4 -3
- package/src/terms/date.ts +18 -0
- package/src/terms/geneExpression.ts +7 -21
- package/src/terms/geneVariant.ts +3 -0
- package/src/terms/metaboliteIntensity.ts +7 -20
- package/src/terms/numeric.ts +17 -38
- package/src/terms/singleCellGeneExpression.ts +3 -4
- package/src/terms/snp.ts +7 -7
- package/src/terms/snps.ts +1 -0
- package/src/terms/ssGSEA.ts +7 -13
- package/src/terms/tw.ts +11 -6
- package/src/terms/updated-types.ts +0 -10
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
termsByIdsPayload,
|
|
3
3
|
validTermsByIdsRequest,
|
|
4
4
|
validTermsByIdsResponse
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UYBVE3DL.js";
|
|
6
6
|
import {
|
|
7
7
|
topMutatedGenePayload,
|
|
8
8
|
validtopMutatedGeneRequest,
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
termdbTopTermsByTypePayload,
|
|
13
13
|
validTermdbTopTermsByTypeRequest,
|
|
14
14
|
validTermdbTopTermsByTypeResponse
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-77RH7U6G.js";
|
|
16
16
|
import {
|
|
17
17
|
termdbTopVariablyExpressedGenesPayload,
|
|
18
18
|
validTermdbTopVariablyExpressedGenesRequest,
|
|
19
19
|
validTermdbTopVariablyExpressedGenesResponse
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-T3GTEGQN.js";
|
|
21
21
|
import {
|
|
22
22
|
validViolinRequest,
|
|
23
23
|
validViolinResponse,
|
|
24
24
|
violinPayload
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-424IUJWR.js";
|
|
26
26
|
import {
|
|
27
27
|
tilePayload,
|
|
28
28
|
validTileRequest,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
termdbClusterPayload,
|
|
83
83
|
validTermdbClusterRequest,
|
|
84
84
|
validTermdbClusterResponse
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-56JQGGZJ.js";
|
|
86
86
|
import {
|
|
87
87
|
termdbCohortSummaryPayload,
|
|
88
88
|
validTermdbCohortSummaryRequest,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
descrStatsPayload,
|
|
98
98
|
validDescrStatsRequest,
|
|
99
99
|
validDescrStatsResponse
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-VMQUAU5V.js";
|
|
101
101
|
import {
|
|
102
102
|
FilterTermValuesPayload,
|
|
103
103
|
validFilterTermValuesRequest,
|
|
@@ -107,12 +107,12 @@ import {
|
|
|
107
107
|
numericCategoriesPayload,
|
|
108
108
|
validNumericCategoriesRequest,
|
|
109
109
|
validNumericCategoriesResponse
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-WCWYMCZD.js";
|
|
111
111
|
import {
|
|
112
112
|
percentilePayload,
|
|
113
113
|
validPercentileRequest,
|
|
114
114
|
validPercentileResponse
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-KEJROUTM.js";
|
|
116
116
|
import {
|
|
117
117
|
ProfileFormScoresPayload,
|
|
118
118
|
validProfileFormScoresRequest,
|
|
@@ -152,12 +152,12 @@ import {
|
|
|
152
152
|
boxplotPayload,
|
|
153
153
|
validBoxPlotRequest,
|
|
154
154
|
validBoxPlotResponse
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-EOBFYFLQ.js";
|
|
156
156
|
import {
|
|
157
157
|
termdbCategoriesPayload,
|
|
158
158
|
validCategoriesRequest,
|
|
159
159
|
validCategoriesResponse
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-QWAPDNYB.js";
|
|
161
161
|
import {
|
|
162
162
|
GRIN2Payload,
|
|
163
163
|
validGRIN2Request,
|
|
@@ -245,7 +245,7 @@ import {
|
|
|
245
245
|
brainImagingPayload,
|
|
246
246
|
validBrainImagingRequest,
|
|
247
247
|
validBrainImagingResponse
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-S6OBK4RE.js";
|
|
249
249
|
import {
|
|
250
250
|
brainImagingSamplesPayload,
|
|
251
251
|
validBrainImagingSamplesRequest,
|
|
@@ -267,7 +267,7 @@ import {
|
|
|
267
267
|
CorrelationVolcanoPayload,
|
|
268
268
|
validCorrelationVolcanoRequest,
|
|
269
269
|
validCorrelationVolcanoResponse
|
|
270
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-I7FTK55B.js";
|
|
271
271
|
import {
|
|
272
272
|
datasetPayload,
|
|
273
273
|
validDatasetRequest,
|
package/dist/termdb.boxplot.js
CHANGED
package/dist/termdb.cluster.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
termdbTopVariablyExpressedGenesPayload,
|
|
3
3
|
validTermdbTopVariablyExpressedGenesRequest,
|
|
4
4
|
validTermdbTopVariablyExpressedGenesResponse
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-T3GTEGQN.js";
|
|
6
6
|
import "./chunk-CNSSF43V.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbTopVariablyExpressedGenesPayload,
|
package/dist/termdb.violin.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.141.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared type definitions between ProteinPaint server and client code",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"module": "src/index.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./src/index.ts",
|
|
10
|
-
"./updated": "./src/terms/updated-types.ts",
|
|
11
10
|
"./routes/*": "./src/routes/*",
|
|
12
11
|
"./checkers": "./dist/index.js"
|
|
13
12
|
},
|
package/src/dataset.ts
CHANGED
|
@@ -721,6 +721,8 @@ export type MetaboliteIntensityQuery = MetaboliteIntensityQueryNative
|
|
|
721
721
|
export type GeneExpressionQueryGdc = {
|
|
722
722
|
src: 'gdcapi'
|
|
723
723
|
geneExpression2bins?: { [index: string]: any }
|
|
724
|
+
/** gene expression unit (e.g. 'FPKM') */
|
|
725
|
+
unit?: string
|
|
724
726
|
}
|
|
725
727
|
|
|
726
728
|
export type GeneExpressionQueryNative = {
|
|
@@ -736,6 +738,10 @@ export type GeneExpressionQueryNative = {
|
|
|
736
738
|
get?: (param: any) => void
|
|
737
739
|
/** This dictionary is used to store/cache the default bins calculated for a geneExpression term when initialized in the fillTermWrapper */
|
|
738
740
|
geneExpression2bins?: { [index: string]: any }
|
|
741
|
+
/** gene expression unit (e.g. 'FPKM') */
|
|
742
|
+
unit?: string
|
|
743
|
+
/** temporary h5 file format flag */
|
|
744
|
+
newformat?: boolean
|
|
739
745
|
}
|
|
740
746
|
|
|
741
747
|
export type GeneExpressionQuery = GeneExpressionQueryGdc | GeneExpressionQueryNative
|
|
@@ -749,10 +755,14 @@ export type SingleCellGeneExpressionNative = {
|
|
|
749
755
|
get?: (q: any) => any
|
|
750
756
|
/** cached gene exp bins */
|
|
751
757
|
sample2gene2expressionBins?: { [sample: string]: { [gene: string]: any } }
|
|
758
|
+
/** gene expression unit (e.g. 'FPKM') */
|
|
759
|
+
unit?: string
|
|
752
760
|
}
|
|
753
761
|
|
|
754
762
|
export type SingleCellGeneExpressionGdc = {
|
|
755
763
|
src: 'gdcapi'
|
|
764
|
+
/** gene expression unit (e.g. 'FPKM') */
|
|
765
|
+
unit?: string
|
|
756
766
|
}
|
|
757
767
|
|
|
758
768
|
export type SingleCellSamples = {
|
|
@@ -1144,8 +1154,8 @@ type Scatterplots = {
|
|
|
1144
1154
|
type CorrelationVolcano = {
|
|
1145
1155
|
/** fixed feature, is one numeric term */
|
|
1146
1156
|
feature: {
|
|
1147
|
-
/**
|
|
1148
|
-
|
|
1157
|
+
/** array of allowed term types for feature tw */
|
|
1158
|
+
termTypes: string[]
|
|
1149
1159
|
}
|
|
1150
1160
|
/** list of numeric variables to be compared against fixed feature*/
|
|
1151
1161
|
variables: {
|
|
@@ -1498,17 +1508,17 @@ keep this setting here for reason of:
|
|
|
1498
1508
|
}
|
|
1499
1509
|
*/
|
|
1500
1510
|
q?: any
|
|
1501
|
-
termMatch2geneSet?: any
|
|
1502
1511
|
mclass?: Mclass
|
|
1503
1512
|
lollipop?: any
|
|
1504
1513
|
hasAncestry?: boolean
|
|
1514
|
+
/** set to true for genome-level geneset db */
|
|
1515
|
+
isGeneSetTermdb?: boolean
|
|
1505
1516
|
|
|
1506
1517
|
//GDC
|
|
1507
1518
|
termid2totalsize2?: GdcApi
|
|
1508
1519
|
/** Do not use a union here. */
|
|
1509
1520
|
dictionary?: GdcApi & AiApi
|
|
1510
1521
|
allowCaseDetails?: AllowCaseDetails
|
|
1511
|
-
isGeneSetTermdb?: boolean
|
|
1512
1522
|
/** Searches the genedb alias list to return the genecode ID */
|
|
1513
1523
|
getGeneAlias?: (q: any, tw: any) => { gencodeId: any }
|
|
1514
1524
|
convertSampleId?: GdcApi
|
package/src/genome.ts
CHANGED
|
@@ -50,7 +50,7 @@ type TrackCategories = {
|
|
|
50
50
|
[index: string]: TrackCategoryEntry | undefined
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
type Track = {
|
|
53
|
+
export type Track = {
|
|
54
54
|
__isgene?: boolean
|
|
55
55
|
translatecoding?: boolean
|
|
56
56
|
file: string
|
|
@@ -64,7 +64,7 @@ type Track = {
|
|
|
64
64
|
onerow?: boolean
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
type DefaultCoord = {
|
|
67
|
+
export type DefaultCoord = {
|
|
68
68
|
chr: string
|
|
69
69
|
start: number
|
|
70
70
|
stop: number
|
package/src/index.ts
CHANGED
|
@@ -61,6 +61,7 @@ export * from './routes/wsimages.ts'
|
|
|
61
61
|
export * from './routes/wsisamples.ts'
|
|
62
62
|
export * from './terms/categorical.ts'
|
|
63
63
|
export * from './terms/condition.ts'
|
|
64
|
+
export * from './terms/date.ts'
|
|
64
65
|
export * from './terms/numeric.ts'
|
|
65
66
|
export * from './terms/geneVariant.ts'
|
|
66
67
|
export * from './terms/geneExpression.ts'
|
|
@@ -2,9 +2,9 @@ import type { RoutePayload } from './routeApi.js'
|
|
|
2
2
|
import type { ErrorResponse } from './errorResponse.ts'
|
|
3
3
|
import type { Filter } from '../filter.ts'
|
|
4
4
|
import type { Term } from '../terms/term.ts'
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
5
|
+
import type { GeneExpressionTW } from '../terms/geneExpression.ts'
|
|
6
|
+
import type { MetaboliteIntensityTW } from '../terms/metaboliteIntensity.ts'
|
|
7
|
+
import type { NumericTW } from '../terms/numeric.ts'
|
|
8
8
|
|
|
9
9
|
export type Gene = {
|
|
10
10
|
/** gene symbol, required */
|
|
@@ -34,7 +34,7 @@ export type TermdbClusterRequestGeneExpression = TermdbClusterRequestBase & {
|
|
|
34
34
|
/** Data type */
|
|
35
35
|
dataType: 'geneExpression'
|
|
36
36
|
/** List of terms */
|
|
37
|
-
terms:
|
|
37
|
+
terms: GeneExpressionTW[]
|
|
38
38
|
/** perform z-score transformation on values */
|
|
39
39
|
zScoreTransformation?: string
|
|
40
40
|
}
|
|
@@ -43,7 +43,7 @@ export type TermdbClusterRequestMetabolite = TermdbClusterRequestBase & {
|
|
|
43
43
|
/** Data type */
|
|
44
44
|
dataType: 'metaboliteIntensity'
|
|
45
45
|
/** List of terms */
|
|
46
|
-
terms:
|
|
46
|
+
terms: MetaboliteIntensityTW[]
|
|
47
47
|
/** perform z-score transformation on values */
|
|
48
48
|
zScoreTransformation?: string
|
|
49
49
|
}
|
|
@@ -52,7 +52,7 @@ export type TermdbClusterRequestNumericDictTerm = TermdbClusterRequestBase & {
|
|
|
52
52
|
/** Data type */
|
|
53
53
|
dataType: 'numericDictTerm'
|
|
54
54
|
/** List of terms */
|
|
55
|
-
terms:
|
|
55
|
+
terms: NumericTW[]
|
|
56
56
|
/** perform z-score transformation on values */
|
|
57
57
|
zScoreTransformation?: string
|
|
58
58
|
}
|
package/src/terms/categorical.ts
CHANGED
|
@@ -71,10 +71,6 @@ export type CatTWValues = BaseTW & {
|
|
|
71
71
|
term: CategoricalTerm
|
|
72
72
|
q: ValuesQ
|
|
73
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
74
|
}
|
|
79
75
|
|
|
80
76
|
export type CatTWPredefinedGS = BaseTW & {
|
|
@@ -82,10 +78,6 @@ export type CatTWPredefinedGS = BaseTW & {
|
|
|
82
78
|
term: CategoricalTerm
|
|
83
79
|
q: PredefinedGroupSettingQ
|
|
84
80
|
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
81
|
}
|
|
90
82
|
|
|
91
83
|
export type CatTWCustomGS = BaseTW & {
|
package/src/terms/condition.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BaseTerm, BaseQ, TermValues } from './term.ts'
|
|
2
|
-
import type { TermWrapper } from './tw.ts'
|
|
1
|
+
import type { BaseTerm, BaseQ, TermValues, BaseTW } from './term.ts'
|
|
2
|
+
//import type { TermWrapper } from './tw.ts'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @category TW
|
|
@@ -37,7 +37,8 @@ export type ConditionTerm = BaseTerm & {
|
|
|
37
37
|
* @group Termdb
|
|
38
38
|
* @category TW
|
|
39
39
|
*/
|
|
40
|
-
export type ConditionTW =
|
|
40
|
+
export type ConditionTW = BaseTW & {
|
|
41
|
+
type: 'ConditionTW'
|
|
41
42
|
term: ConditionTerm
|
|
42
43
|
q: ConditionQ //replace the generic Q with specific condition Q
|
|
43
44
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NumericBaseTerm, PresetNumericBins, NumTWTypes } from '../index.ts'
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
--------EXPORTED--------
|
|
5
|
+
DateTerm
|
|
6
|
+
DateTW
|
|
7
|
+
DateTermSettingInstance
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export type DateTerm = NumericBaseTerm & {
|
|
11
|
+
name?: string
|
|
12
|
+
type: 'date'
|
|
13
|
+
metabolite: string
|
|
14
|
+
bins?: PresetNumericBins
|
|
15
|
+
unit?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type DateTW = NumTWTypes & { term: DateTerm }
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { NumericTerm, NumericQ } from './numeric.ts'
|
|
3
|
-
import type { TermSettingInstance } from '../termsetting.ts'
|
|
1
|
+
import type { PresetNumericBins, NumericBaseTerm, NumTWTypes } from '../index.ts'
|
|
4
2
|
|
|
5
3
|
/*
|
|
6
4
|
--------EXPORTED--------
|
|
7
|
-
|
|
5
|
+
GeneExpressionTerm
|
|
8
6
|
GeneExpressionTermWrapper
|
|
9
7
|
GeneExpressionTermSettingInstance
|
|
10
|
-
|
|
11
8
|
*/
|
|
12
9
|
|
|
13
|
-
export type
|
|
14
|
-
dt?: number
|
|
15
|
-
preferredBins?: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type GeneExpressionTW = TermWrapper & {
|
|
19
|
-
q: GeneExpressionQ
|
|
20
|
-
term: GeneExpressionTerm
|
|
21
|
-
type: 'NumTWRegularBin' | 'NumTWCustomBin' | 'NumTWCont' | 'NumTWSpline'
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type GeneExpressionTerm = NumericTerm & {
|
|
10
|
+
export type GeneExpressionTerm = NumericBaseTerm & {
|
|
25
11
|
gene: string
|
|
12
|
+
name: string
|
|
13
|
+
type: 'geneExpression'
|
|
14
|
+
bins?: PresetNumericBins
|
|
26
15
|
// temporarily allowing chr/start/stop to support
|
|
27
16
|
// legacy fpkm files
|
|
28
17
|
chr?: string
|
|
@@ -30,7 +19,4 @@ export type GeneExpressionTerm = NumericTerm & {
|
|
|
30
19
|
stop?: number
|
|
31
20
|
}
|
|
32
21
|
|
|
33
|
-
export type
|
|
34
|
-
q: GeneExpressionQ
|
|
35
|
-
term: GeneExpressionTerm
|
|
36
|
-
}
|
|
22
|
+
export type GeneExpressionTW = NumTWTypes & { term: GeneExpressionTerm }
|
package/src/terms/geneVariant.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { TermSettingInstance } from '../termsetting.ts'
|
|
|
3
3
|
|
|
4
4
|
// q types
|
|
5
5
|
export type GvBaseQ = MinBaseQ & {
|
|
6
|
+
// TODO: may uncomment below if q.mode is required in downstream code
|
|
7
|
+
// mode?: 'discrete' // may support 'continuous' for CNV?
|
|
6
8
|
cnvGainCutoff?: number
|
|
7
9
|
cnvMaxLength?: number
|
|
8
10
|
cnvMinAbsValue?: number
|
|
@@ -12,6 +14,7 @@ export type GvBaseQ = MinBaseQ & {
|
|
|
12
14
|
type RawGvValuesQ = GvBaseQ & { type?: 'values' }
|
|
13
15
|
type RawGvPredefinedGsQ = GvBaseQ & { type: 'predefined-groupset'; predefined_groupset_idx?: number }
|
|
14
16
|
type RawGvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset?: BaseGroupSet }
|
|
17
|
+
export type RawGvQ = RawGvValuesQ | RawGvPredefinedGsQ | RawGvCustomGsQ
|
|
15
18
|
|
|
16
19
|
export type GvValuesQ = GvBaseQ & { type: 'values' }
|
|
17
20
|
export type GvPredefinedGsQ = GvBaseQ & { type: 'predefined-groupset'; predefined_groupset_idx: number }
|
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BaseQ } from './term.ts'
|
|
3
|
-
import type { NumericTerm } from './numeric.ts'
|
|
4
|
-
import type { TermSettingInstance } from '../termsetting.ts'
|
|
1
|
+
import type { NumericBaseTerm, PresetNumericBins, NumTWTypes } from '../index.ts'
|
|
5
2
|
|
|
6
3
|
/*
|
|
7
4
|
--------EXPORTED--------
|
|
8
|
-
MetaboliteIntensityQ
|
|
9
5
|
MetaboliteIntensityTermWrapper
|
|
10
6
|
MetaboliteIntensityTermSettingInstance
|
|
11
7
|
|
|
12
8
|
*/
|
|
13
9
|
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export type MetaboliteIntensityTW = TermWrapper & {
|
|
19
|
-
q: MetaboliteIntensityQ
|
|
20
|
-
term: MetaboliteIntensityTerm
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type MetaboliteIntensityTerm = NumericTerm & {
|
|
10
|
+
export type MetaboliteIntensityTerm = NumericBaseTerm & {
|
|
11
|
+
name?: string
|
|
12
|
+
type: 'metaboliteIntensity'
|
|
24
13
|
metabolite: string
|
|
25
|
-
bins
|
|
14
|
+
bins?: PresetNumericBins
|
|
15
|
+
unit?: string
|
|
26
16
|
}
|
|
27
17
|
|
|
28
|
-
export type
|
|
29
|
-
q: MetaboliteIntensityQ
|
|
30
|
-
term: MetaboliteIntensityTerm
|
|
31
|
-
}
|
|
18
|
+
export type MetaboliteIntensityTW = NumTWTypes & { term: MetaboliteIntensityTerm }
|
package/src/terms/numeric.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
MinBaseQ,
|
|
3
|
+
BaseTW,
|
|
4
|
+
TermValues,
|
|
5
|
+
BaseTerm,
|
|
6
|
+
GeneExpressionTerm,
|
|
7
|
+
MetaboliteIntensityTerm,
|
|
8
|
+
DateTerm,
|
|
9
|
+
SsGSEATerm
|
|
10
|
+
} from '../index.ts'
|
|
2
11
|
|
|
3
12
|
export type RawRegularBin = Partial<RegularNumericBinConfig> & { preferredBins?: string }
|
|
4
13
|
|
|
@@ -30,32 +39,21 @@ export type RawNumTWSpline = BaseTW & {
|
|
|
30
39
|
|
|
31
40
|
export type RawNumTW = RawNumTWCustomBin | RawNumTWRegularBin | RawNumTWCont | RawNumTWSpline
|
|
32
41
|
|
|
33
|
-
export type
|
|
34
|
-
id?: string
|
|
35
|
-
// these concrete term.type values make it clear that only these are numeric,
|
|
36
|
-
// "categorical", "condition", and other term.types are not included in this union
|
|
37
|
-
type: 'integer' | 'float' | 'geneExpression' | 'metaboliteIntensity' | 'date' | 'ssGSEA'
|
|
38
|
-
bins: PresetNumericBins
|
|
39
|
-
values?: TermValues
|
|
40
|
-
unit?: string
|
|
42
|
+
export type NumericBaseTerm = BaseTerm & {
|
|
41
43
|
/** tailored color scale for this term, so that when the term is used for color gradient in scatter, this set of colors will be used by default */
|
|
42
44
|
continuousColorScale?: { minColor: string; maxColor: string }
|
|
43
|
-
|
|
44
|
-
logScale?: string | number
|
|
45
|
-
max?: number
|
|
46
|
-
min?: number
|
|
47
|
-
skip0forPercentile?: boolean
|
|
48
|
-
valueConversion?: ValueConversion*/
|
|
45
|
+
unit?: string
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
export type NumericDictTerm =
|
|
48
|
+
export type NumericDictTerm = NumericBaseTerm & {
|
|
52
49
|
id?: string
|
|
53
|
-
type: 'integer' | 'float'
|
|
50
|
+
type: 'integer' | 'float'
|
|
54
51
|
bins: PresetNumericBins
|
|
55
52
|
values?: TermValues
|
|
56
|
-
unit?: string
|
|
57
53
|
}
|
|
58
54
|
|
|
55
|
+
export type NumericTerm = NumericDictTerm | GeneExpressionTerm | MetaboliteIntensityTerm | DateTerm | SsGSEATerm
|
|
56
|
+
|
|
59
57
|
export type StartUnboundedBin = {
|
|
60
58
|
// where possible, assign a concrete value (true) when it is known in advance,
|
|
61
59
|
// in which case, do not use an abstract type (boolean) to startunbounded
|
|
@@ -112,25 +110,6 @@ export type CustomNumericBinConfig = MinBaseQ & {
|
|
|
112
110
|
preferredBins?: 'median'
|
|
113
111
|
}
|
|
114
112
|
|
|
115
|
-
// |
|
|
116
|
-
// {
|
|
117
|
-
// type?: 'custom-bin'
|
|
118
|
-
// mode?: 'discrete' | 'binary'
|
|
119
|
-
// // since ts will allow NumericBin[] to be empty,
|
|
120
|
-
// // use this workaround to define a non-empty array
|
|
121
|
-
// lst?: [NumericBin, ...NumericBin[]]
|
|
122
|
-
// }
|
|
123
|
-
|
|
124
|
-
/*export type NumericQ = BaseQ & {
|
|
125
|
-
// termType: 'float' | 'integer' -- converts to 'numeric'
|
|
126
|
-
preferredBins?: 'median' | 'less' | 'default'
|
|
127
|
-
modeBinaryCutoffType: 'normal' | 'percentile'
|
|
128
|
-
modeBinaryCutoffPercentile?: number
|
|
129
|
-
knots?: any //[]?
|
|
130
|
-
scale?: number //0.1 | 0.01 | 0.001
|
|
131
|
-
rounding: string
|
|
132
|
-
}*/
|
|
133
|
-
|
|
134
113
|
export type PresetNumericBins = {
|
|
135
114
|
default: RegularNumericBinConfig | CustomNumericBinConfig
|
|
136
115
|
less: RegularNumericBinConfig | CustomNumericBinConfig
|
|
@@ -157,7 +136,7 @@ export type BinaryNumericQ = MinBaseQ & {
|
|
|
157
136
|
}
|
|
158
137
|
|
|
159
138
|
export type ContinuousNumericQ = MinBaseQ & {
|
|
160
|
-
mode
|
|
139
|
+
mode?: 'continuous'
|
|
161
140
|
// TODO: do not use a boolean, convert to a `transform: 'zscore' | ...` option
|
|
162
141
|
convert2ZScore?: boolean
|
|
163
142
|
//scale?: string
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TermWrapper } from './tw.ts'
|
|
2
|
-
import type { GeneExpressionQ } from './geneExpression.ts'
|
|
3
2
|
import type { TermSettingInstance } from '../termsetting.ts'
|
|
4
|
-
import type { NumericTerm } from './numeric.ts'
|
|
3
|
+
import type { NumericTerm, NumericQ } from './numeric.ts'
|
|
5
4
|
|
|
6
5
|
/*
|
|
7
6
|
--------EXPORTED--------
|
|
@@ -12,7 +11,7 @@ GeneExpressionTermSettingInstance
|
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
export type SingleCellGeneExpressionTW = TermWrapper & {
|
|
15
|
-
q:
|
|
14
|
+
q: NumericQ
|
|
16
15
|
term: SingleCellGeneExpressionTerm
|
|
17
16
|
}
|
|
18
17
|
|
|
@@ -22,6 +21,6 @@ export type SingleCellGeneExpressionTerm = NumericTerm & {
|
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export type SingleCellGeneExpressionTermSettingInstance = TermSettingInstance & {
|
|
25
|
-
q:
|
|
24
|
+
q: NumericQ
|
|
26
25
|
term: SingleCellGeneExpressionTerm
|
|
27
26
|
}
|
package/src/terms/snp.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
|
|
1
|
+
import type { BaseTW, BaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from './term.ts'
|
|
3
2
|
import type { TermSettingInstance } from '../termsetting.ts'
|
|
4
3
|
|
|
5
4
|
/*
|
|
@@ -8,11 +7,6 @@ For term type 'snp'
|
|
|
8
7
|
|
|
9
8
|
export type SnpQ = BaseQ & GroupSettingQ
|
|
10
9
|
|
|
11
|
-
export type SnpTW = TermWrapper & {
|
|
12
|
-
q: SnpQ
|
|
13
|
-
term: SnpTerm
|
|
14
|
-
}
|
|
15
|
-
|
|
16
10
|
export type SnpTerm = BaseTerm & {
|
|
17
11
|
chr: string
|
|
18
12
|
start: number
|
|
@@ -22,6 +16,12 @@ export type SnpTerm = BaseTerm & {
|
|
|
22
16
|
groupsetting: TermGroupSetting
|
|
23
17
|
}
|
|
24
18
|
|
|
19
|
+
export type SnpTW = BaseTW & {
|
|
20
|
+
type: 'SnpTW'
|
|
21
|
+
q: SnpQ
|
|
22
|
+
term: SnpTerm
|
|
23
|
+
}
|
|
24
|
+
|
|
25
25
|
export type SnpTermSettingInstance = TermSettingInstance & {
|
|
26
26
|
q: SnpQ
|
|
27
27
|
term: SnpTerm
|