@sjcrh/proteinpaint-types 2.146.2 → 2.147.1
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/aiProjectSelectedWSImages.js +1 -1
- package/dist/aiProjectTrainModel.js +11 -0
- package/dist/brainImaging.js +1 -1
- package/dist/{chunk-75OHIZMS.js → chunk-225Q2ZUA.js} +2 -6
- package/dist/{chunk-74B7B2CV.js → chunk-2ZJS3NUY.js} +258 -82
- package/dist/{chunk-NBV7HYBA.js → chunk-3SKFYOKV.js} +407 -515
- package/dist/{chunk-G5KSPYQG.js → chunk-4SJC57Y6.js} +403 -511
- package/dist/{chunk-4VEXL32Q.js → chunk-75GS5ZG5.js} +381 -489
- package/dist/{chunk-2BHWLFKE.js → chunk-ETMCI34A.js} +2 -6
- package/dist/{chunk-7ICZFAGK.js → chunk-KSVIBMFQ.js} +1049 -797
- package/dist/{chunk-C246BWQE.js → chunk-NQUMNEVO.js} +258 -82
- package/dist/{chunk-4DNCZQOB.js → chunk-OOQIRLS5.js} +258 -82
- package/dist/{chunk-5KADNZH2.js → chunk-RA7IEGS4.js} +408 -516
- package/dist/chunk-UYJA4UM7.js +97 -0
- package/dist/{chunk-GCAZSDCW.js → chunk-WL7ZVGZS.js} +403 -511
- package/dist/correlationVolcano.js +1 -1
- package/dist/index.js +48 -40
- package/dist/samplewsimages.js +1 -1
- 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.percentile.js +1 -1
- package/dist/termdb.termsbyids.js +1 -1
- package/dist/termdb.topTermsByType.js +1 -1
- package/package.json +1 -1
- package/src/dataset.ts +15 -12
- package/src/index.ts +2 -0
- package/src/routes/aiProjectSelectedWSImages.ts +0 -1
- package/src/routes/aiProjectTrainModel.ts +20 -0
- package/src/routes/brainImaging.ts +3 -3
- package/src/terms/categorical.ts +9 -90
- package/src/terms/q.ts +6 -1
- package/src/terms/qualitative.ts +73 -0
- package/src/terms/singleCellCellType.ts +6 -10
- package/src/terms/snp.ts +9 -13
- package/src/terms/term.ts +2 -2
- package/src/terms/tw.ts +3 -4
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
validViolinRequest,
|
|
3
|
+
validViolinResponse,
|
|
4
|
+
violinPayload
|
|
5
|
+
} from "./chunk-MMFL6N5M.js";
|
|
1
6
|
import {
|
|
2
7
|
tilePayload,
|
|
3
8
|
validTileRequest,
|
|
@@ -13,6 +18,11 @@ import {
|
|
|
13
18
|
validWSISamplesResponse,
|
|
14
19
|
wsiSamplesPayload
|
|
15
20
|
} from "./chunk-2744ACBX.js";
|
|
21
|
+
import {
|
|
22
|
+
termdbSingleCellDEgenesPayload,
|
|
23
|
+
validTermdbSingleCellDEgenesRequest,
|
|
24
|
+
validTermdbSingleCellDEgenesResponse
|
|
25
|
+
} from "./chunk-EYKGJDKU.js";
|
|
16
26
|
import {
|
|
17
27
|
termdbSingleCellDataPayload,
|
|
18
28
|
validTermdbSingleCellDataRequest,
|
|
@@ -32,7 +42,7 @@ import {
|
|
|
32
42
|
termsByIdsPayload,
|
|
33
43
|
validTermsByIdsRequest,
|
|
34
44
|
validTermsByIdsResponse
|
|
35
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-WL7ZVGZS.js";
|
|
36
46
|
import {
|
|
37
47
|
topMutatedGenePayload,
|
|
38
48
|
validtopMutatedGeneRequest,
|
|
@@ -42,17 +52,17 @@ import {
|
|
|
42
52
|
termdbTopTermsByTypePayload,
|
|
43
53
|
validTermdbTopTermsByTypeRequest,
|
|
44
54
|
validTermdbTopTermsByTypeResponse
|
|
45
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-2ZJS3NUY.js";
|
|
46
56
|
import {
|
|
47
57
|
termdbTopVariablyExpressedGenesPayload,
|
|
48
58
|
validTermdbTopVariablyExpressedGenesRequest,
|
|
49
59
|
validTermdbTopVariablyExpressedGenesResponse
|
|
50
60
|
} from "./chunk-OZ3CVAFP.js";
|
|
51
61
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
62
|
+
FilterTermValuesPayload,
|
|
63
|
+
validFilterTermValuesRequest,
|
|
64
|
+
validFilterTermValuesResponse
|
|
65
|
+
} from "./chunk-CQXBQY2H.js";
|
|
56
66
|
import {
|
|
57
67
|
numericCategoriesPayload,
|
|
58
68
|
validNumericCategoriesRequest,
|
|
@@ -62,7 +72,7 @@ import {
|
|
|
62
72
|
percentilePayload,
|
|
63
73
|
validPercentileRequest,
|
|
64
74
|
validPercentileResponse
|
|
65
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-OOQIRLS5.js";
|
|
66
76
|
import {
|
|
67
77
|
ProfileFormScoresPayload,
|
|
68
78
|
validProfileFormScoresRequest,
|
|
@@ -89,20 +99,20 @@ import {
|
|
|
89
99
|
validTermdbSingleSampleMutationResponse
|
|
90
100
|
} from "./chunk-UGYLBYUU.js";
|
|
91
101
|
import {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
} from "./chunk-
|
|
102
|
+
diffExpPayload,
|
|
103
|
+
validDERequest,
|
|
104
|
+
validDEResponse
|
|
105
|
+
} from "./chunk-CP26DR4V.js";
|
|
96
106
|
import {
|
|
97
107
|
boxplotPayload,
|
|
98
108
|
validBoxPlotRequest,
|
|
99
109
|
validBoxPlotResponse
|
|
100
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-3SKFYOKV.js";
|
|
101
111
|
import {
|
|
102
112
|
termdbCategoriesPayload,
|
|
103
113
|
validCategoriesRequest,
|
|
104
114
|
validCategoriesResponse
|
|
105
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-RA7IEGS4.js";
|
|
106
116
|
import {
|
|
107
117
|
ChatPayload,
|
|
108
118
|
validChatRequest,
|
|
@@ -112,7 +122,7 @@ import {
|
|
|
112
122
|
termdbClusterPayload,
|
|
113
123
|
validTermdbClusterRequest,
|
|
114
124
|
validTermdbClusterResponse
|
|
115
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-NQUMNEVO.js";
|
|
116
126
|
import {
|
|
117
127
|
termdbCohortSummaryPayload,
|
|
118
128
|
validTermdbCohortSummaryRequest,
|
|
@@ -127,12 +137,12 @@ import {
|
|
|
127
137
|
descrStatsPayload,
|
|
128
138
|
validDescrStatsRequest,
|
|
129
139
|
validDescrStatsResponse
|
|
130
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-4SJC57Y6.js";
|
|
131
141
|
import {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
} from "./chunk-
|
|
142
|
+
imgPayload,
|
|
143
|
+
validimgRequest,
|
|
144
|
+
validimgResponse
|
|
145
|
+
} from "./chunk-PTE2I7DF.js";
|
|
136
146
|
import {
|
|
137
147
|
isoformlstPayload,
|
|
138
148
|
validIsoformLstRequest,
|
|
@@ -152,7 +162,7 @@ import {
|
|
|
152
162
|
sampleWSImagesPayload,
|
|
153
163
|
validSampleWSImagesRequest,
|
|
154
164
|
validSampleWSImagesResponse
|
|
155
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-ETMCI34A.js";
|
|
156
166
|
import {
|
|
157
167
|
saveWSIAnnotationPayload,
|
|
158
168
|
validSaveWSIAnnotationRequest,
|
|
@@ -164,10 +174,10 @@ import {
|
|
|
164
174
|
validSnpResponse
|
|
165
175
|
} from "./chunk-7MUISZHS.js";
|
|
166
176
|
import {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
} from "./chunk-
|
|
177
|
+
geneLookupPayload,
|
|
178
|
+
validGeneLookupRequest,
|
|
179
|
+
validGeneLookupResponse
|
|
180
|
+
} from "./chunk-K4FSDTDW.js";
|
|
171
181
|
import {
|
|
172
182
|
genesetEnrichmentPayload,
|
|
173
183
|
validGenesetEnrichmentRequest,
|
|
@@ -204,10 +214,10 @@ import {
|
|
|
204
214
|
validHicstatResponse
|
|
205
215
|
} from "./chunk-6GKG55BT.js";
|
|
206
216
|
import {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
} from "./chunk-
|
|
217
|
+
CorrelationVolcanoPayload,
|
|
218
|
+
validCorrelationVolcanoRequest,
|
|
219
|
+
validCorrelationVolcanoResponse
|
|
220
|
+
} from "./chunk-75GS5ZG5.js";
|
|
211
221
|
import {
|
|
212
222
|
datasetPayload,
|
|
213
223
|
validDatasetRequest,
|
|
@@ -246,11 +256,6 @@ import {
|
|
|
246
256
|
validGdcMafBuildRequest,
|
|
247
257
|
validGdcMafBuildResponse
|
|
248
258
|
} from "./chunk-2BCLGYAG.js";
|
|
249
|
-
import {
|
|
250
|
-
geneLookupPayload,
|
|
251
|
-
validGeneLookupRequest,
|
|
252
|
-
validGeneLookupResponse
|
|
253
|
-
} from "./chunk-K4FSDTDW.js";
|
|
254
259
|
import {
|
|
255
260
|
aiProjectAdminPayload,
|
|
256
261
|
validAIProjectAdminRequest,
|
|
@@ -260,12 +265,17 @@ import {
|
|
|
260
265
|
aiProjectSelectedWSImagesResponsePayload,
|
|
261
266
|
validAiProjectSelectedWSImagesRequest,
|
|
262
267
|
validAiProjectSelectedWSImagesResponse
|
|
263
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-225Q2ZUA.js";
|
|
269
|
+
import {
|
|
270
|
+
aiProjectTrainModelPayload,
|
|
271
|
+
validAIProjectTrainModelRequest,
|
|
272
|
+
validAIProjectTrainModelResponse
|
|
273
|
+
} from "./chunk-UYJA4UM7.js";
|
|
264
274
|
import {
|
|
265
275
|
brainImagingPayload,
|
|
266
276
|
validBrainImagingRequest,
|
|
267
277
|
validBrainImagingResponse
|
|
268
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-KSVIBMFQ.js";
|
|
269
279
|
import {
|
|
270
280
|
brainImagingSamplesPayload,
|
|
271
281
|
validBrainImagingSamplesRequest,
|
|
@@ -283,11 +293,6 @@ import {
|
|
|
283
293
|
import {
|
|
284
294
|
clearWSImagesSessionsPayload
|
|
285
295
|
} from "./chunk-RPX4TVMD.js";
|
|
286
|
-
import {
|
|
287
|
-
CorrelationVolcanoPayload,
|
|
288
|
-
validCorrelationVolcanoRequest,
|
|
289
|
-
validCorrelationVolcanoResponse
|
|
290
|
-
} from "./chunk-4VEXL32Q.js";
|
|
291
296
|
import "./chunk-YNHC5SXO.js";
|
|
292
297
|
export {
|
|
293
298
|
ChatPayload,
|
|
@@ -299,6 +304,7 @@ export {
|
|
|
299
304
|
ProfileScoresPayload,
|
|
300
305
|
aiProjectAdminPayload,
|
|
301
306
|
aiProjectSelectedWSImagesResponsePayload,
|
|
307
|
+
aiProjectTrainModelPayload,
|
|
302
308
|
boxplotPayload,
|
|
303
309
|
brainImagingPayload,
|
|
304
310
|
brainImagingSamplesPayload,
|
|
@@ -347,6 +353,8 @@ export {
|
|
|
347
353
|
topMutatedGenePayload,
|
|
348
354
|
validAIProjectAdminRequest,
|
|
349
355
|
validAIProjectAdminResponse,
|
|
356
|
+
validAIProjectTrainModelRequest,
|
|
357
|
+
validAIProjectTrainModelResponse,
|
|
350
358
|
validAiProjectSelectedWSImagesRequest,
|
|
351
359
|
validAiProjectSelectedWSImagesResponse,
|
|
352
360
|
validBoxPlotRequest,
|
package/dist/samplewsimages.js
CHANGED
package/dist/termdb.boxplot.js
CHANGED
package/dist/termdb.cluster.js
CHANGED
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { WSImage } from './routes/samplewsimages.ts'
|
|
|
3
3
|
import type { WSISample } from './routes/wsisamples.ts'
|
|
4
4
|
import type { SaveWSIAnnotationRequest } from './routes/saveWSIAnnotation.ts'
|
|
5
5
|
import type { DeleteWSIAnnotationRequest } from './routes/deleteWSIAnnotation.ts'
|
|
6
|
+
import type { Prediction } from './routes/aiProjectSelectedWSImages.ts'
|
|
6
7
|
|
|
7
8
|
/*** General usage types ***/
|
|
8
9
|
type FileObj = {
|
|
@@ -1068,15 +1069,15 @@ export type WSImages = {
|
|
|
1068
1069
|
/** either ds supplied or dynamically added on launch with built in logic */
|
|
1069
1070
|
getWSImages?: (sampleName: string) => Promise<WSImage[]>
|
|
1070
1071
|
/** ds supplied */
|
|
1071
|
-
getWSIPredictionPatches?: (projectId: string, wsiImage: string) => Promise<
|
|
1072
|
+
getWSIPredictionPatches?: (projectId: string, wsiImage: string) => Promise<Prediction[]>
|
|
1072
1073
|
/** ds supplied */
|
|
1073
1074
|
getWSIAnnotations?: (projectId: string, wsiImage: string) => Promise<string[]>
|
|
1074
1075
|
/** ds supplied */
|
|
1075
|
-
|
|
1076
|
-
/** ds supplied */
|
|
1077
|
-
getWSIUncertaintyOverlay?: (wsiImage: string) => Promise<string | undefined>
|
|
1076
|
+
getPredictionLayers?: (projectId: string, wsiImage: string) => Promise<Map<string, string> | undefined>
|
|
1078
1077
|
/** ds supplied */
|
|
1079
1078
|
getAnnotationClasses?: (projectId: string) => Promise<WSIClass[] | undefined>
|
|
1079
|
+
/** ds supplied */
|
|
1080
|
+
retrainModel?: (projectId: string) => Promise<void>
|
|
1080
1081
|
}
|
|
1081
1082
|
|
|
1082
1083
|
export type WSIClass = { id: number; key_shortcut: string; label: string; color: string }
|
|
@@ -1420,17 +1421,19 @@ export type Termdb = {
|
|
|
1420
1421
|
* in order to minimize the ease of extracting identifiable information from aggregate data
|
|
1421
1422
|
* in server response
|
|
1422
1423
|
*
|
|
1423
|
-
* q : req.query as processed through app middleware (pre-parsed, may have req.body props, __protectec__, etc)
|
|
1424
|
-
*
|
|
1425
|
-
* data{
|
|
1426
|
-
* sampleCount: the number of samples with matching data from one or more queried terms
|
|
1427
|
-
* }
|
|
1428
|
-
*
|
|
1429
1424
|
* returns: {minSampleSize, canAccess}, see below
|
|
1430
1425
|
*/
|
|
1431
1426
|
checkAccessToSampleData?: (
|
|
1427
|
+
/** req.query as processed through app middleware (pre-parsed, may have req.body props, __protectec__, etc) */
|
|
1432
1428
|
q: any,
|
|
1433
|
-
data: {
|
|
1429
|
+
data: {
|
|
1430
|
+
/** the number of samples with matching data from one or more queried terms */
|
|
1431
|
+
sampleCount: number
|
|
1432
|
+
/** option to specify sample names that is accessible to the current user,
|
|
1433
|
+
* not using sample ID since portal embedder and token generator does not
|
|
1434
|
+
* know the internal sample ID-to-name mapping */
|
|
1435
|
+
sampleNames?: string[]
|
|
1436
|
+
}
|
|
1434
1437
|
) => {
|
|
1435
1438
|
/** the required minimum sample size for the current user,
|
|
1436
1439
|
* may be dependent on login status or other context
|
|
@@ -1597,7 +1600,7 @@ keep this setting here for reason of:
|
|
|
1597
1600
|
}
|
|
1598
1601
|
//terms are shown in the dictionary based on term and user role.
|
|
1599
1602
|
isTermVisible?: (clientAuthResult: any, ids: string) => boolean
|
|
1600
|
-
getAdditionalFilter?: (
|
|
1603
|
+
getAdditionalFilter?: (__protected__: any, term: any) => Filter | undefined
|
|
1601
1604
|
}
|
|
1602
1605
|
|
|
1603
1606
|
type SampleType = {
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './termdb.matrix.ts'
|
|
|
7
7
|
export * from './routes/routeApi.ts'
|
|
8
8
|
export * from './routes/aiProjectAdmin.ts'
|
|
9
9
|
export * from './routes/aiProjectSelectedWSImages.ts'
|
|
10
|
+
export * from './routes/aiProjectTrainModel.ts'
|
|
10
11
|
export * from './routes/brainImaging.ts'
|
|
11
12
|
export * from './routes/brainImagingSamples.ts'
|
|
12
13
|
export * from './routes/burden.ts'
|
|
@@ -69,6 +70,7 @@ export * from './terms/numeric.ts'
|
|
|
69
70
|
export * from './terms/geneVariant.ts'
|
|
70
71
|
export * from './terms/geneExpression.ts'
|
|
71
72
|
export * from './terms/metaboliteIntensity.ts'
|
|
73
|
+
export * from './terms/qualitative.ts'
|
|
72
74
|
export * from './terms/singleCellCellType.ts'
|
|
73
75
|
export * from './terms/singleCellGeneExpression.ts'
|
|
74
76
|
export * from './terms/snp.ts'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
|
|
3
|
+
export type AIProjectTrainModelRequest = {
|
|
4
|
+
genome: string
|
|
5
|
+
dslabel: string
|
|
6
|
+
projectId?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type AIProjectTrainModelResponse = {
|
|
10
|
+
status: 'ok' | 'error'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const aiProjectTrainModelPayload: RoutePayload = {
|
|
14
|
+
request: {
|
|
15
|
+
typeId: 'AIProjectTrainModelRequest'
|
|
16
|
+
},
|
|
17
|
+
response: {
|
|
18
|
+
typeId: 'AIProjectTrainModelResponse'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { QualTW } from '../terms/qualitative.ts'
|
|
2
2
|
import type { RoutePayload } from './routeApi.ts'
|
|
3
3
|
|
|
4
4
|
export type BrainImagingRequest = {
|
|
@@ -15,9 +15,9 @@ export type BrainImagingRequest = {
|
|
|
15
15
|
/** the sample names selected by the users to plot on brain template */
|
|
16
16
|
selectedSampleFileNames: string[]
|
|
17
17
|
/* the term to divide the samples into groups */
|
|
18
|
-
divideByTW?:
|
|
18
|
+
divideByTW?: QualTW
|
|
19
19
|
/* the term to color the samples based on their category */
|
|
20
|
-
overlayTW?:
|
|
20
|
+
overlayTW?: QualTW
|
|
21
21
|
/* the term categories that were filtered out */
|
|
22
22
|
legendFilter?: string[]
|
|
23
23
|
}
|
package/src/terms/categorical.ts
CHANGED
|
@@ -1,99 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BaseTerm,
|
|
3
|
-
TermValues,
|
|
4
|
-
GroupSettingQ,
|
|
5
|
-
ValuesQ,
|
|
6
|
-
TermGroupSetting,
|
|
7
|
-
BaseTW,
|
|
8
|
-
PredefinedGroupSettingQ,
|
|
9
|
-
CustomGroupSettingQ
|
|
10
|
-
} from '../index.ts'
|
|
11
|
-
import type { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
|
|
12
|
-
import type { TermSettingInstance } from '../termsetting.ts'
|
|
1
|
+
import type { TermGroupSetting, TermValues, BaseTerm } from '../index.ts'
|
|
13
2
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* test:CategoricalQ:
|
|
18
|
-
*
|
|
19
|
-
* @category TW
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
export type RawCatTWValues = BaseTW & {
|
|
23
|
-
type?: 'CatTWValues'
|
|
24
|
-
/** must already exist, for dictionary terms, TwRouter.fill() will use mayHydrateDictTwLst() */
|
|
25
|
-
term: CategoricalTerm
|
|
26
|
-
q: RawValuesQ
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type RawCatTWPredefinedGS = BaseTW & {
|
|
30
|
-
type?: 'CatTWPredefinedGS'
|
|
31
|
-
term: CategoricalTerm
|
|
32
|
-
q: RawPredefinedGroupsetQ
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type RawCatTWCustomGS = BaseTW & {
|
|
36
|
-
type?: 'CatTWCustomGS'
|
|
37
|
-
term: CategoricalTerm
|
|
38
|
-
q: RawCustomGroupsetQ
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type RawCatTW = RawCatTWValues | RawCatTWPredefinedGS | RawCatTWCustomGS
|
|
42
|
-
|
|
43
|
-
export type CategoricalBaseQ = MinBaseQ & {
|
|
44
|
-
mode?: 'discrete' | 'binary'
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type CategoricalQ = GroupSettingQ | ValuesQ
|
|
3
|
+
/*
|
|
4
|
+
For term type 'snp'
|
|
5
|
+
*/
|
|
48
6
|
|
|
49
7
|
export type CategoricalTerm = BaseTerm & {
|
|
8
|
+
id: string
|
|
9
|
+
name?: string
|
|
50
10
|
type: 'categorical'
|
|
51
11
|
values: TermValues
|
|
52
12
|
groupsetting: TermGroupSetting
|
|
53
13
|
}
|
|
54
14
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
* @group Termdb
|
|
59
|
-
* @category TW
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
export type CategoricalTW = BaseTW & {
|
|
63
|
-
//id: string
|
|
64
|
-
type: 'CatTWValues' | 'CatTWPredefinedGS' | 'CatTWCustomGS'
|
|
65
|
-
q: CategoricalQ
|
|
66
|
-
term: CategoricalTerm
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type CatTWValues = BaseTW & {
|
|
70
|
-
//id: string
|
|
71
|
-
term: CategoricalTerm
|
|
72
|
-
q: ValuesQ
|
|
73
|
-
type: 'CatTWValues'
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type CatTWPredefinedGS = BaseTW & {
|
|
77
|
-
//id: string
|
|
78
|
-
term: CategoricalTerm
|
|
79
|
-
q: PredefinedGroupSettingQ
|
|
80
|
-
type: 'CatTWPredefinedGS'
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export type CatTWCustomGS = BaseTW & {
|
|
84
|
-
//id: string
|
|
85
|
-
term: CategoricalTerm
|
|
86
|
-
q: CustomGroupSettingQ
|
|
87
|
-
type: 'CatTWCustomGS'
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export type CatTWTypes = CatTWValues | CatTWPredefinedGS | CatTWCustomGS
|
|
91
|
-
|
|
92
|
-
// TODO: should not need this once TermSettingInstance is replaced with simply using the class as the type
|
|
93
|
-
export type CategoricalTermSettingInstance = TermSettingInstance & {
|
|
94
|
-
q: CategoricalQ & { mode: 'binary' | 'discrete' }
|
|
95
|
-
term: CategoricalTerm
|
|
96
|
-
category2samplecount: any
|
|
97
|
-
validateGroupsetting: () => { text: string; bgcolor?: string }
|
|
98
|
-
error?: string
|
|
15
|
+
export type RawCategoricalTerm = CategoricalTerm & {
|
|
16
|
+
groupsetting?: TermGroupSetting
|
|
17
|
+
values?: TermValues
|
|
99
18
|
}
|
package/src/terms/q.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
//import type { CategoricalQ } from './q.ts'
|
|
2
2
|
import type { Filter } from '../filter.js'
|
|
3
3
|
|
|
4
4
|
// MinBaseQ is BaseQ without .mode and .type
|
|
@@ -18,6 +18,10 @@ export type MinBaseQ = {
|
|
|
18
18
|
reuseId?: string
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export type CategoricalBaseQ = MinBaseQ & {
|
|
22
|
+
mode?: 'discrete' | 'binary'
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
export type RawValuesQ = MinBaseQ & { type?: 'values'; mode?: 'binary' }
|
|
22
26
|
|
|
23
27
|
export type RawPredefinedGroupsetQ = MinBaseQ & {
|
|
@@ -36,6 +40,7 @@ export type RawCustomGroupsetQ = MinBaseQ & {
|
|
|
36
40
|
}
|
|
37
41
|
/** deprecated nested object, will be handled by reshapeLegacyTW() in TwRouter */
|
|
38
42
|
groupsetting?: { inuse?: boolean } & GroupSettingQ
|
|
43
|
+
sampleCounts?: { key: string; value?: number; label?: string }[]
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
export type HiddenValues = {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GroupSettingQ,
|
|
3
|
+
ValuesQ,
|
|
4
|
+
BaseTW,
|
|
5
|
+
PredefinedGroupSettingQ,
|
|
6
|
+
CustomGroupSettingQ,
|
|
7
|
+
RawCategoricalTerm,
|
|
8
|
+
CategoricalTerm,
|
|
9
|
+
RawSnpTerm,
|
|
10
|
+
SnpTerm,
|
|
11
|
+
RawSingleCellCellTypeTerm,
|
|
12
|
+
SingleCellCellTypeTerm
|
|
13
|
+
} from '../index.ts'
|
|
14
|
+
import type { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A raw qualitative termwrapper object, before filling-in
|
|
18
|
+
*
|
|
19
|
+
* test:QualitativeQ:
|
|
20
|
+
*
|
|
21
|
+
* @category TW
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export type RawQualTerm = RawCategoricalTerm | RawSnpTerm | RawSingleCellCellTypeTerm
|
|
25
|
+
export type QualTerm = CategoricalTerm | SnpTerm | SingleCellCellTypeTerm
|
|
26
|
+
|
|
27
|
+
export type RawQualTWValues = BaseTW & {
|
|
28
|
+
type?: 'QualTWValues'
|
|
29
|
+
/** must already exist, for dictionary terms, TwRouter.fill() will use mayHydrateDictTwLst() */
|
|
30
|
+
term: RawQualTerm
|
|
31
|
+
q: RawValuesQ
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type RawQualTWPredefinedGS = BaseTW & {
|
|
35
|
+
type?: 'QualTWPredefinedGS'
|
|
36
|
+
term: RawQualTerm
|
|
37
|
+
q: RawPredefinedGroupsetQ
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type RawQualTWCustomGS = BaseTW & {
|
|
41
|
+
type?: 'QualTWCustomGS'
|
|
42
|
+
term: RawQualTerm
|
|
43
|
+
q: RawCustomGroupsetQ
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type RawQualTW = RawQualTWValues | RawQualTWPredefinedGS | RawQualTWCustomGS
|
|
47
|
+
|
|
48
|
+
export type QualBaseQ = MinBaseQ & {
|
|
49
|
+
mode?: 'discrete' | 'binary'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type QualQ = GroupSettingQ | ValuesQ
|
|
53
|
+
|
|
54
|
+
export type QualTWValues = BaseTW & {
|
|
55
|
+
//id: string
|
|
56
|
+
term: QualTerm
|
|
57
|
+
q: ValuesQ
|
|
58
|
+
type: 'QualTWValues'
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type QualTWPredefinedGS = BaseTW & {
|
|
62
|
+
term: QualTerm
|
|
63
|
+
q: PredefinedGroupSettingQ
|
|
64
|
+
type: 'QualTWPredefinedGS'
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type QualTWCustomGS = BaseTW & {
|
|
68
|
+
term: QualTerm
|
|
69
|
+
q: CustomGroupSettingQ
|
|
70
|
+
type: 'QualTWCustomGS'
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type QualTW = QualTWValues | QualTWPredefinedGS | QualTWCustomGS
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import type { BaseTerm,
|
|
2
|
-
import type { MinBaseQ } from './q.ts'
|
|
3
|
-
|
|
4
|
-
type SingleCellCellTypeBaseQ = MinBaseQ & { mode: 'discrete' | 'binary' }
|
|
5
|
-
|
|
6
|
-
export type SingleCellCellTypeQ = SingleCellCellTypeBaseQ & GroupSettingQ
|
|
1
|
+
import type { BaseTerm, TermGroupSetting, TermValues } from '../index.ts'
|
|
7
2
|
|
|
8
3
|
export type SingleCellCellTypeTerm = BaseTerm & {
|
|
9
4
|
type: 'singleCellCellType'
|
|
10
5
|
/** the cell types may be also cell attributes like CNV, Fusion, etc */
|
|
11
|
-
values: TermValues
|
|
12
6
|
/** single cell terms require a sample to read the term values, they are associated with a sample */
|
|
13
7
|
sample: string
|
|
14
8
|
/** the plot defined in the dataset contains a column with the term values for the sample, it needs to be passed to read the sample values */
|
|
15
9
|
plot: string
|
|
16
10
|
groupsetting: TermGroupSetting
|
|
11
|
+
// may be used to hide
|
|
12
|
+
values: TermValues
|
|
17
13
|
}
|
|
18
14
|
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
export type RawSingleCellCellTypeTerm = SingleCellCellTypeTerm & {
|
|
16
|
+
groupsetting?: TermGroupSetting
|
|
17
|
+
values?: TermValues
|
|
22
18
|
}
|