@sjcrh/proteinpaint-types 2.142.0 → 2.143.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/aiProjectAdmin.js +2 -2
- package/dist/aiProjectSelectedWSImages.js +11 -0
- package/dist/brainImaging.js +2 -2
- package/dist/brainImagingSamples.js +2 -2
- package/dist/burden.js +2 -2
- package/dist/{chunk-W6NLM363.js → chunk-2744ACBX.js} +1 -1
- package/dist/{chunk-F5XGJIUS.js → chunk-2BCLGYAG.js} +1 -1
- package/dist/{chunk-L5DFYFWX.js → chunk-2C4X5B6N.js} +1 -1
- package/dist/{chunk-SOM5WKDM.js → chunk-4DNCZQOB.js} +16 -4
- package/dist/{chunk-3BQ57P2P.js → chunk-4MLQS6N7.js} +16 -4
- package/dist/{chunk-MVMUZSLL.js → chunk-4VEXL32Q.js} +172 -118
- package/dist/{chunk-K5POIB3P.js → chunk-4ZMQ5CTL.js} +1 -1
- package/dist/{chunk-CEDL2QZT.js → chunk-5KADNZH2.js} +176 -122
- package/dist/{chunk-I2KWGMNM.js → chunk-62XTWOVJ.js} +1 -1
- package/dist/{chunk-FXCCZCTN.js → chunk-6GKG55BT.js} +1 -1
- package/dist/{chunk-3L3ASC3B.js → chunk-6SOULHNE.js} +290 -154
- package/dist/{chunk-2VDOPTRV.js → chunk-74B7B2CV.js} +31 -7
- package/dist/{chunk-FVBXC7SY.js → chunk-7ICZFAGK.js} +33 -17
- package/dist/{chunk-J4QAF4EU.js → chunk-7MUISZHS.js} +1 -1
- package/dist/{chunk-SMS3Y2XZ.js → chunk-BCBSHTHS.js} +1 -1
- package/dist/{chunk-SMVDKR2O.js → chunk-C246BWQE.js} +31 -7
- package/dist/{chunk-3C26VWPU.js → chunk-CP26DR4V.js} +1 -1
- package/dist/{chunk-ERSTC6X6.js → chunk-CQXBQY2H.js} +1 -1
- package/dist/{chunk-CQDDRHRY.js → chunk-CT6IBFVP.js} +9 -4
- package/dist/{chunk-ZVTZJRGS.js → chunk-D7AKQKDG.js} +1 -1
- package/dist/{chunk-YGX6BZZY.js → chunk-EIJT53QB.js} +1 -1
- package/dist/{chunk-VKBTOKI2.js → chunk-EOKM345J.js} +1 -1
- package/dist/{chunk-XEQWKMZN.js → chunk-EYKGJDKU.js} +1 -1
- package/dist/{chunk-EH7VAE5S.js → chunk-FMC4G5BP.js} +1 -1
- package/dist/{chunk-KRYTJ2SL.js → chunk-FTPYJPUB.js} +1 -1
- package/dist/{chunk-GDM7YUXH.js → chunk-FXXE4S7M.js} +172 -118
- package/dist/{chunk-IR4QSJI7.js → chunk-GCAZSDCW.js} +172 -118
- package/dist/{chunk-5S3UWYSK.js → chunk-GTS2G4R4.js} +1 -1
- package/dist/{chunk-KFVYRW7D.js → chunk-HQV2A7JV.js} +1 -1
- package/dist/{chunk-TMQI47YT.js → chunk-J2Y7RIN2.js} +29 -25
- package/dist/{chunk-HNETXFC7.js → chunk-K4FSDTDW.js} +1 -1
- package/dist/{chunk-HIPWQ6AW.js → chunk-KCMPDEH7.js} +1 -1
- package/dist/chunk-KVE2NBC6.js +132 -0
- package/dist/{chunk-QX3MRSSK.js → chunk-LRVF7U64.js} +1 -1
- package/dist/{chunk-5XCPOWFN.js → chunk-MHDQO7R5.js} +1 -1
- package/dist/{chunk-K4RV3N2T.js → chunk-MIOIOFBZ.js} +1 -1
- package/dist/{chunk-DMJFOII6.js → chunk-MMFL6N5M.js} +18 -6
- package/dist/{chunk-LDQNJLYQ.js → chunk-N7C4SRFX.js} +1 -1
- package/dist/chunk-NO2EZKW4.js +291 -0
- package/dist/{chunk-HKGWC7OO.js → chunk-P25WDNMD.js} +1 -1
- package/dist/{chunk-FYRWYZEE.js → chunk-PPPSDO6G.js} +36 -40
- package/dist/{chunk-KVUJPR42.js → chunk-PTE2I7DF.js} +1 -1
- package/dist/{chunk-AASWRJMS.js → chunk-Q3HGHP3J.js} +1 -1
- package/dist/{chunk-WMI4VKU3.js → chunk-TCEHHLIZ.js} +206 -51
- package/dist/{chunk-4R265LDJ.js → chunk-U3AOS5QJ.js} +16 -4
- package/dist/{chunk-X2CX5K24.js → chunk-U3BTVE5T.js} +1 -1
- package/dist/{chunk-HUMZDPUU.js → chunk-U4A647KI.js} +1 -1
- package/dist/{chunk-4GCROGGK.js → chunk-UBOVHONH.js} +1 -1
- package/dist/{chunk-GGZUN2GE.js → chunk-UGYLBYUU.js} +1 -1
- package/dist/{chunk-XJU4JALX.js → chunk-USAQULWA.js} +35 -31
- package/dist/{chunk-IVU6STSJ.js → chunk-X4JBWMXY.js} +1 -1
- package/dist/{chunk-LPBYQJG4.js → chunk-XIRCL7KT.js} +1 -1
- package/dist/{chunk-CNSSF43V.js → chunk-YNHC5SXO.js} +14 -14
- package/dist/{chunk-B43GFRT4.js → chunk-YPEFUAJW.js} +1 -1
- package/dist/{chunk-VMSVBNM6.js → chunk-YSTMGNYR.js} +1 -1
- package/dist/{chunk-XT2IWGYK.js → chunk-ZCV62ELK.js} +1 -1
- package/dist/{chunk-E5MPHTIA.js → chunk-ZIOJDN75.js} +1 -1
- package/dist/clearwsisession.js +1 -1
- package/dist/clearwsisessions.js +2 -2
- package/dist/correlationVolcano.js +2 -2
- package/dist/dataset.js +2 -2
- package/dist/deleteWSIAnnotation.js +11 -0
- package/dist/dsdata.js +2 -2
- package/dist/dzimages.js +2 -2
- package/dist/gdc.grin2.js +2 -2
- package/dist/gdc.maf.js +2 -2
- package/dist/gdc.mafBuild.js +2 -2
- package/dist/genelookup.js +2 -2
- package/dist/genesetEnrichment.js +2 -2
- package/dist/genesetOverrepresentation.js +2 -2
- package/dist/grin2.js +2 -2
- package/dist/healthcheck.js +2 -2
- package/dist/hicdata.js +2 -2
- package/dist/hicgenome.js +2 -2
- package/dist/hicstat.js +2 -2
- package/dist/img.js +2 -2
- package/dist/index.js +118 -102
- package/dist/isoformlst.js +2 -2
- package/dist/ntseq.js +2 -2
- package/dist/pdomain.js +2 -2
- package/dist/samplewsimages.js +2 -2
- package/dist/saveWSIAnnotation.js +11 -0
- package/dist/snp.js +2 -2
- package/dist/termdb.DE.js +2 -2
- package/dist/termdb.boxplot.js +2 -2
- package/dist/termdb.categories.js +2 -2
- package/dist/termdb.cluster.js +2 -2
- package/dist/termdb.cohort.summary.js +2 -2
- package/dist/termdb.cohorts.js +2 -2
- package/dist/termdb.descrstats.js +2 -2
- package/dist/termdb.filterTermValues.js +2 -2
- package/dist/termdb.numericcategories.js +2 -2
- package/dist/termdb.percentile.js +2 -2
- package/dist/termdb.profileFormScores.js +2 -2
- package/dist/termdb.profileScores.js +2 -2
- package/dist/termdb.rootterm.js +2 -2
- package/dist/termdb.sampleImages.js +2 -2
- package/dist/termdb.singleSampleMutation.js +2 -2
- package/dist/termdb.singlecellDEgenes.js +2 -2
- package/dist/termdb.singlecellData.js +2 -2
- package/dist/termdb.singlecellSamples.js +2 -2
- package/dist/termdb.termchildren.js +2 -2
- package/dist/termdb.termsbyids.js +2 -2
- package/dist/termdb.topMutatedGenes.js +2 -2
- package/dist/termdb.topTermsByType.js +2 -2
- package/dist/termdb.topVariablyExpressedGenes.js +2 -2
- package/dist/termdb.violin.js +2 -2
- package/dist/tileserver.js +2 -2
- package/dist/wsimages.js +2 -2
- package/dist/wsisamples.js +2 -2
- package/package.json +1 -1
- package/src/dataset.ts +19 -7
- package/src/index.ts +3 -1
- package/src/routes/aiProjectAdmin.ts +10 -8
- package/src/routes/aiProjectSelectedWSImages.ts +23 -0
- package/src/routes/deleteWSIAnnotation.ts +23 -0
- package/src/routes/grin2.ts +42 -0
- package/src/routes/samplewsimages.ts +5 -3
- package/src/routes/saveWSIAnnotation.ts +24 -0
- package/src/routes/termdb.boxplot.ts +23 -1
- package/src/routes/termdb.violin.ts +4 -2
- package/src/routes/wsimages.ts +2 -1
- package/src/termdb.matrix.ts +2 -0
- package/src/terms/categorical.ts +3 -2
- package/src/terms/condition.ts +25 -8
- package/src/terms/numeric.ts +5 -0
- package/src/terms/q.ts +60 -1
- package/src/terms/samplelst.ts +2 -2
- package/src/terms/singleCellCellType.ts +1 -1
- package/src/terms/snp.ts +2 -2
- package/src/terms/snps.ts +2 -2
- package/src/terms/term.ts +2 -134
- package/src/terms/tw.ts +15 -0
- package/dist/sampleWsiAiApi.js +0 -11
- package/src/routes/sampleWsiAiApi.ts +0 -21
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbSampleImagesPayload,
|
|
3
3
|
validTermdbSampleImagesRequest,
|
|
4
4
|
validTermdbSampleImagesResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-U3BTVE5T.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbSampleImagesPayload,
|
|
9
9
|
validTermdbSampleImagesRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbSingleSampleMutationPayload,
|
|
3
3
|
validTermdbSingleSampleMutationRequest,
|
|
4
4
|
validTermdbSingleSampleMutationResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-UGYLBYUU.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbSingleSampleMutationPayload,
|
|
9
9
|
validTermdbSingleSampleMutationRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbSingleCellDEgenesPayload,
|
|
3
3
|
validTermdbSingleCellDEgenesRequest,
|
|
4
4
|
validTermdbSingleCellDEgenesResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-EYKGJDKU.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbSingleCellDEgenesPayload,
|
|
9
9
|
validTermdbSingleCellDEgenesRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbSingleCellDataPayload,
|
|
3
3
|
validTermdbSingleCellDataRequest,
|
|
4
4
|
validTermdbSingleCellDataResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4ZMQ5CTL.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbSingleCellDataPayload,
|
|
9
9
|
validTermdbSingleCellDataRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbSingleCellSamplesPayload,
|
|
3
3
|
validTermdbSingleCellSamplesRequest,
|
|
4
4
|
validTermdbSingleCellSamplesResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XIRCL7KT.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbSingleCellSamplesPayload,
|
|
9
9
|
validTermdbSingleCellSamplesRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termChildrenPayload,
|
|
3
3
|
validTermChildrenRequest,
|
|
4
4
|
validTermChildrenResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-P25WDNMD.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termChildrenPayload,
|
|
9
9
|
validTermChildrenRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termsByIdsPayload,
|
|
3
3
|
validTermsByIdsRequest,
|
|
4
4
|
validTermsByIdsResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GCAZSDCW.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termsByIdsPayload,
|
|
9
9
|
validTermsByIdsRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
topMutatedGenePayload,
|
|
3
3
|
validtopMutatedGeneRequest,
|
|
4
4
|
validtopMutatedGeneResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-EIJT53QB.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
topMutatedGenePayload,
|
|
9
9
|
validtopMutatedGeneRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbTopTermsByTypePayload,
|
|
3
3
|
validTermdbTopTermsByTypeRequest,
|
|
4
4
|
validTermdbTopTermsByTypeResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-74B7B2CV.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbTopTermsByTypePayload,
|
|
9
9
|
validTermdbTopTermsByTypeRequest,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
termdbTopVariablyExpressedGenesPayload,
|
|
3
3
|
validTermdbTopVariablyExpressedGenesRequest,
|
|
4
4
|
validTermdbTopVariablyExpressedGenesResponse
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-U3AOS5QJ.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbTopVariablyExpressedGenesPayload,
|
|
9
9
|
validTermdbTopVariablyExpressedGenesRequest,
|
package/dist/termdb.violin.js
CHANGED
package/dist/tileserver.js
CHANGED
package/dist/wsimages.js
CHANGED
package/dist/wsisamples.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
validWSISamplesRequest,
|
|
3
3
|
validWSISamplesResponse,
|
|
4
4
|
wsiSamplesPayload
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2744ACBX.js";
|
|
6
|
+
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
validWSISamplesRequest,
|
|
9
9
|
validWSISamplesResponse,
|
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Mclass } from './Mclass.ts'
|
|
2
2
|
import type { WSImage } from './routes/samplewsimages.ts'
|
|
3
3
|
import type { WSISample } from './routes/wsisamples.ts'
|
|
4
|
+
import type { SaveWSIAnnotationRequest } from './routes/saveWSIAnnotation.ts'
|
|
5
|
+
import type { DeleteWSIAnnotationRequest } from './routes/deleteWSIAnnotation.ts'
|
|
4
6
|
|
|
5
7
|
/*** General usage types ***/
|
|
6
8
|
type FileObj = {
|
|
@@ -1039,31 +1041,41 @@ export type WSImages = {
|
|
|
1039
1041
|
/* path to the folder where sample images are stored
|
|
1040
1042
|
required; for both cases where image files are hosted locally, or loaded from remote via ds-supplied getter
|
|
1041
1043
|
*/
|
|
1042
|
-
imageBySampleFolder
|
|
1044
|
+
imageBySampleFolder?: string
|
|
1045
|
+
|
|
1046
|
+
aiToolImageFolder?: string
|
|
1047
|
+
|
|
1043
1048
|
activePatchColor?: string
|
|
1044
1049
|
predictionColor?: Array<number>
|
|
1045
1050
|
annotationsColor?: Array<number>
|
|
1046
1051
|
tileSize?: number
|
|
1047
|
-
classes?: WSIClass[]
|
|
1048
1052
|
uncertainty?: { color: string; label: string }[]
|
|
1049
1053
|
|
|
1054
|
+
/** dynamically added on launch with built in logic */
|
|
1055
|
+
saveWSIAnnotation?: (annotation: SaveWSIAnnotationRequest) => Promise<void>
|
|
1056
|
+
|
|
1057
|
+
/** dynamically added on launch with built in logic */
|
|
1058
|
+
deleteWSIAnnotation?: (annotation: DeleteWSIAnnotationRequest) => Promise<void>
|
|
1059
|
+
|
|
1050
1060
|
/** either ds supplied or dynamically added on launch with built in logic (retrieve the sample list from the wsimages table) */
|
|
1051
1061
|
getSamples?: () => Promise<Array<WSISample>>
|
|
1052
1062
|
/** either ds supplied or dynamically added on launch with built in logic */
|
|
1053
1063
|
getWSImages?: (sampleName: string) => Promise<WSImage[]>
|
|
1054
1064
|
/** ds supplied */
|
|
1055
|
-
getWSIPredictionPatches?: (
|
|
1065
|
+
getWSIPredictionPatches?: (projectId: string, wsiImage: string) => Promise<string[]>
|
|
1056
1066
|
/** ds supplied */
|
|
1057
|
-
getWSIAnnotations?: (
|
|
1067
|
+
getWSIAnnotations?: (projectId: string, wsiImage: string) => Promise<string[]>
|
|
1058
1068
|
/** ds supplied */
|
|
1059
1069
|
makeGeoJson?: (sampleId: string, wsiImage: string) => void
|
|
1060
1070
|
/** ds supplied */
|
|
1061
|
-
getWSIPredictionOverlay?: (
|
|
1071
|
+
getWSIPredictionOverlay?: (wsiImage: string) => Promise<string | undefined>
|
|
1072
|
+
/** ds supplied */
|
|
1073
|
+
getWSIUncertaintyOverlay?: (wsiImage: string) => Promise<string | undefined>
|
|
1062
1074
|
/** ds supplied */
|
|
1063
|
-
|
|
1075
|
+
getAnnotationClasses?: (projectId: string) => Promise<WSIClass[] | undefined>
|
|
1064
1076
|
}
|
|
1065
1077
|
|
|
1066
|
-
export type WSIClass = { id: number;
|
|
1078
|
+
export type WSIClass = { id: number; key_shortcut: string; label: string; color: string }
|
|
1067
1079
|
|
|
1068
1080
|
/*** types supporting Termdb ***/
|
|
1069
1081
|
|
package/src/index.ts
CHANGED
|
@@ -6,12 +6,14 @@ export * from './filter.ts'
|
|
|
6
6
|
export * from './termdb.matrix.ts'
|
|
7
7
|
export * from './routes/routeApi.ts'
|
|
8
8
|
export * from './routes/aiProjectAdmin.ts'
|
|
9
|
+
export * from './routes/aiProjectSelectedWSImages.ts'
|
|
9
10
|
export * from './routes/brainImaging.ts'
|
|
10
11
|
export * from './routes/brainImagingSamples.ts'
|
|
11
12
|
export * from './routes/burden.ts'
|
|
12
13
|
export * from './routes/clearwsisessions.ts'
|
|
13
14
|
export * from './routes/correlationVolcano.ts'
|
|
14
15
|
export * from './routes/dataset.ts'
|
|
16
|
+
export * from './routes/deleteWSIAnnotation.ts'
|
|
15
17
|
export * from './routes/dsdata.ts'
|
|
16
18
|
export * from './routes/dzimages.ts'
|
|
17
19
|
export * from './routes/errorResponse.ts'
|
|
@@ -32,7 +34,7 @@ export * from './routes/isoformlst.ts'
|
|
|
32
34
|
export * from './routes/ntseq.ts'
|
|
33
35
|
export * from './routes/pdomain.ts'
|
|
34
36
|
export * from './routes/samplewsimages.ts'
|
|
35
|
-
export * from './routes/
|
|
37
|
+
export * from './routes/saveWSIAnnotation.ts'
|
|
36
38
|
export * from './routes/snp.ts'
|
|
37
39
|
export * from './routes/termdb.boxplot.ts'
|
|
38
40
|
export * from './routes/termdb.categories.ts'
|
|
@@ -5,8 +5,10 @@ export type AIProjectAdminRequest = {
|
|
|
5
5
|
dslabel: string
|
|
6
6
|
/** list: get entire list of projects from db
|
|
7
7
|
* admin: edit, add, or delete projects from db
|
|
8
|
+
* filterImages: filter metadata for images
|
|
9
|
+
* images: get images for a project
|
|
8
10
|
*/
|
|
9
|
-
for: 'list' | 'admin' | 'images'
|
|
11
|
+
for: 'list' | 'admin' | 'filterImages' | 'images'
|
|
10
12
|
/** required for 'project' and 'selection' requests */
|
|
11
13
|
project?: {
|
|
12
14
|
name: string
|
|
@@ -17,13 +19,13 @@ export type AIProjectAdminRequest = {
|
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export type AIProjectAdminResponse =
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
export type AIProjectAdminResponse = {
|
|
23
|
+
status: 'ok' | 'error'
|
|
24
|
+
projectId?: number
|
|
25
|
+
images: string[]
|
|
26
|
+
error?: string
|
|
27
|
+
data?: { cols: any[]; rows: any[]; images: string[] }[]
|
|
28
|
+
}
|
|
27
29
|
|
|
28
30
|
export const aiProjectAdminPayload: RoutePayload = {
|
|
29
31
|
request: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
import type { WSImage } from './samplewsimages.ts'
|
|
3
|
+
|
|
4
|
+
export type AiProjectSelectedWSImagesRequest = {
|
|
5
|
+
genome: string
|
|
6
|
+
dslabel: string
|
|
7
|
+
projectId: number
|
|
8
|
+
wsimagesFilenames: Array<string>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type AiProjectSelectedWSImagesResponse = {
|
|
12
|
+
// TODO create a type for WSImage with AI project specific fields
|
|
13
|
+
wsimages: WSImage[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const aiProjectSelectedWSImagesResponsePayload: RoutePayload = {
|
|
17
|
+
request: {
|
|
18
|
+
typeId: 'AiProjectSelectedWSImagesRequest'
|
|
19
|
+
},
|
|
20
|
+
response: {
|
|
21
|
+
typeId: 'AiProjectSelectedWSImagesResponse'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
|
|
3
|
+
export type DeleteWSIAnnotationRequest = {
|
|
4
|
+
genome: string
|
|
5
|
+
dslabel: string
|
|
6
|
+
projectId: number
|
|
7
|
+
annotation: any
|
|
8
|
+
wsimage: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type DeleteWSIAnnotationResponse = {
|
|
12
|
+
status: string
|
|
13
|
+
error?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const deleteWSIAnnotationPayload: RoutePayload = {
|
|
17
|
+
request: {
|
|
18
|
+
typeId: 'DeleteWSIAnnotationRequest'
|
|
19
|
+
},
|
|
20
|
+
response: {
|
|
21
|
+
typeId: 'DeleteWSIAnnotationResponse'
|
|
22
|
+
}
|
|
23
|
+
}
|
package/src/routes/grin2.ts
CHANGED
|
@@ -17,6 +17,15 @@ export type GRIN2Request = {
|
|
|
17
17
|
/** Dataset label within the genome */
|
|
18
18
|
dslabel: string
|
|
19
19
|
|
|
20
|
+
/** Device pixel ratio for rendering */
|
|
21
|
+
devicePixelRatio?: number
|
|
22
|
+
|
|
23
|
+
/** Desired plot width in pixels (default: 1000) */
|
|
24
|
+
plot_width?: number
|
|
25
|
+
|
|
26
|
+
/** Desired plot height in pixels (default: 400) */
|
|
27
|
+
plot_height?: number
|
|
28
|
+
|
|
20
29
|
/** Filter from existing PP infrastructure */
|
|
21
30
|
filter?: any // Filter object passed to get_samples(filter, ds)
|
|
22
31
|
|
|
@@ -51,6 +60,37 @@ export type GRIN2Request = {
|
|
|
51
60
|
}
|
|
52
61
|
}
|
|
53
62
|
|
|
63
|
+
/** Simple Interface to store the complex plot data from the python Manhattan plot */
|
|
64
|
+
interface grin2PlotData {
|
|
65
|
+
points: Array<{
|
|
66
|
+
x: number
|
|
67
|
+
y: number
|
|
68
|
+
svg_x: number
|
|
69
|
+
svg_y: number
|
|
70
|
+
color: string
|
|
71
|
+
type: string
|
|
72
|
+
gene: string
|
|
73
|
+
chrom: string
|
|
74
|
+
pos: number
|
|
75
|
+
q_value: number
|
|
76
|
+
}>
|
|
77
|
+
chrom_data: Record<
|
|
78
|
+
string,
|
|
79
|
+
{
|
|
80
|
+
start: number
|
|
81
|
+
size: number
|
|
82
|
+
center: number
|
|
83
|
+
}
|
|
84
|
+
>
|
|
85
|
+
y_axis_scaled: boolean
|
|
86
|
+
scale_factor: number
|
|
87
|
+
total_genome_length: number
|
|
88
|
+
plot_width: number
|
|
89
|
+
plot_height: number
|
|
90
|
+
device_pixel_ratio: number
|
|
91
|
+
dpi: number
|
|
92
|
+
}
|
|
93
|
+
|
|
54
94
|
/**
|
|
55
95
|
* Response for GRIN2 analysis run
|
|
56
96
|
*/
|
|
@@ -61,6 +101,8 @@ export type GRIN2Response = {
|
|
|
61
101
|
error?: string
|
|
62
102
|
/** Base64-encoded PNG Manhattan plot image */
|
|
63
103
|
pngImg?: string
|
|
104
|
+
/** Plot data for the Manhattan plot */
|
|
105
|
+
plotData?: grin2PlotData
|
|
64
106
|
/** Download status/info */
|
|
65
107
|
download?: any
|
|
66
108
|
/** Sortable table of top genes identified by GRIN2 */
|
|
@@ -13,11 +13,13 @@ export type SampleWSImagesResponse = {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type WSImage = {
|
|
16
|
+
id?: number
|
|
16
17
|
filename: string
|
|
17
|
-
|
|
18
|
+
// TODO remove when it's verified
|
|
19
|
+
annotationsAndPredictionsOverlay?: string
|
|
18
20
|
predictionLayers?: Array<string>
|
|
19
|
-
metadata
|
|
20
|
-
|
|
21
|
+
metadata?: string
|
|
22
|
+
annotations?: Array<Annotation>
|
|
21
23
|
predictions?: Array<Prediction>
|
|
22
24
|
classes?: Array<WSIClass>
|
|
23
25
|
/** ds defined uncertainity labels and colors */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
|
|
3
|
+
export type SaveWSIAnnotationRequest = {
|
|
4
|
+
genome: string
|
|
5
|
+
dslabel: string
|
|
6
|
+
coordinates: [number, number]
|
|
7
|
+
classId: number
|
|
8
|
+
projectId: number
|
|
9
|
+
wsimage: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type SaveWSIAnnotationResponse = {
|
|
13
|
+
status: 'ok' | 'error'
|
|
14
|
+
error?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const saveWSIAnnotationPayload: RoutePayload = {
|
|
18
|
+
request: {
|
|
19
|
+
typeId: 'SaveWSIAnnotationRequest'
|
|
20
|
+
},
|
|
21
|
+
response: {
|
|
22
|
+
typeId: 'SaveWSIAnnotationResponse'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -15,6 +15,8 @@ export type BoxPlotRequest = {
|
|
|
15
15
|
orderByMedian: boolean
|
|
16
16
|
/** term2 */
|
|
17
17
|
overlayTw?: TermWrapper
|
|
18
|
+
/** term0 */
|
|
19
|
+
divideTw?: TermWrapper
|
|
18
20
|
filter?: Filter
|
|
19
21
|
filter0?: any
|
|
20
22
|
__protected__: any
|
|
@@ -25,11 +27,31 @@ export type BoxPlotResponse = {
|
|
|
25
27
|
absMin?: number
|
|
26
28
|
/** Absolute max value for all plots */
|
|
27
29
|
absMax?: number
|
|
28
|
-
|
|
30
|
+
/** Charts data */
|
|
31
|
+
charts: {
|
|
32
|
+
[chartId: string]: BoxPlotChartEntry
|
|
33
|
+
}
|
|
29
34
|
/** Categories not shown in the final plot */
|
|
30
35
|
uncomputableValues: { label: string; value: number }[] | null
|
|
36
|
+
error?: any
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// chart containing a set of boxplots
|
|
40
|
+
export type BoxPlotChartEntry = {
|
|
41
|
+
/** Chart ID */
|
|
42
|
+
chartId: string
|
|
43
|
+
/** Boxplot data within the chart */
|
|
44
|
+
plots: BoxPlotEntry[]
|
|
45
|
+
/** svg of chart, necessary for svg download */
|
|
46
|
+
svg?: any
|
|
47
|
+
/** Copied from BoxPlotResponse, necessary for
|
|
48
|
+
ViewModel to process chart data */
|
|
49
|
+
absMin?: number
|
|
50
|
+
absMax?: number
|
|
51
|
+
uncomputableValues?: { label: string; value: number }[] | null
|
|
31
52
|
}
|
|
32
53
|
|
|
54
|
+
// individual boxplot
|
|
33
55
|
export type BoxPlotEntry = {
|
|
34
56
|
boxplot: BoxPlotData & { label: string }
|
|
35
57
|
/** color matching the value/category color */
|
|
@@ -14,7 +14,9 @@ export type ViolinRequest = {
|
|
|
14
14
|
/** A number representing the device's pixel ratio, which may be used for
|
|
15
15
|
* rendering quality adjustments */
|
|
16
16
|
devicePixelRatio: number
|
|
17
|
-
/** optional
|
|
17
|
+
/** optional overlay tw, will generate multiple violin plots */
|
|
18
|
+
overlayTw?: any
|
|
19
|
+
/** optional divide tw, will generate multiple charts, each of which will contain violin plots */
|
|
18
20
|
divideTw?: any
|
|
19
21
|
/** Reference label (i.e. short label) for the ds */
|
|
20
22
|
dslabel: string
|
|
@@ -81,7 +83,7 @@ export type ViolinPlotEntry = {
|
|
|
81
83
|
/** Color to render */
|
|
82
84
|
color: string
|
|
83
85
|
density: ViolinDensity
|
|
84
|
-
|
|
86
|
+
overlayTwBins: any
|
|
85
87
|
/** Text for label */
|
|
86
88
|
label: string
|
|
87
89
|
/** Number of samples/cases/patients/etc. */
|
package/src/routes/wsimages.ts
CHANGED
package/src/termdb.matrix.ts
CHANGED
|
@@ -23,6 +23,8 @@ type CategoryEntry = {
|
|
|
23
23
|
samplecount: number
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// TODO: need to add a discriminant property (e.g. ".kind") to
|
|
27
|
+
// distinguish between ValidGetDataResponse and { error: string }
|
|
26
28
|
export type ValidGetDataResponse = {
|
|
27
29
|
samples: {
|
|
28
30
|
[index: string | number]: SampleEntry
|
package/src/terms/categorical.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
BaseTW,
|
|
8
8
|
PredefinedGroupSettingQ,
|
|
9
9
|
CustomGroupSettingQ
|
|
10
|
-
} from '
|
|
10
|
+
} from '../index.ts'
|
|
11
11
|
import type { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
|
|
12
12
|
import type { TermSettingInstance } from '../termsetting.ts'
|
|
13
13
|
|
|
@@ -89,8 +89,9 @@ export type CatTWCustomGS = BaseTW & {
|
|
|
89
89
|
|
|
90
90
|
export type CatTWTypes = CatTWValues | CatTWPredefinedGS | CatTWCustomGS
|
|
91
91
|
|
|
92
|
+
// TODO: should not need this once TermSettingInstance is replaced with simply using the class as the type
|
|
92
93
|
export type CategoricalTermSettingInstance = TermSettingInstance & {
|
|
93
|
-
q: CategoricalQ
|
|
94
|
+
q: CategoricalQ & { mode: 'binary' | 'discrete' }
|
|
94
95
|
term: CategoricalTerm
|
|
95
96
|
category2samplecount: any
|
|
96
97
|
validateGroupsetting: () => { text: string; bgcolor?: string }
|
package/src/terms/condition.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import type { BaseTerm,
|
|
1
|
+
import type { BaseTerm, MinBaseQ, TermValues, BaseTW } from '../index.ts'
|
|
2
2
|
//import type { TermWrapper } from './tw.ts'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @category TW
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type ConditionGradeQ = MinBaseQ & {
|
|
9
9
|
mode: 'discrete' | 'binary' | 'cuminc' | 'cox'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
breaks?: number[] /*
|
|
15
|
-
Breaks grades into groups
|
|
10
|
+
valueFor: 'grade'
|
|
11
|
+
bar_by_grade: true
|
|
12
|
+
/**
|
|
13
|
+
Breaks grades into groups
|
|
16
14
|
Array length=1, will break grades to 2 groups.
|
|
17
15
|
E.g. [3] divides to [-1,0,1,2,], [3,4,5]
|
|
18
16
|
Allowed for both conditionModes "discrete/binary"
|
|
@@ -22,12 +20,23 @@ export type ConditionQ = BaseQ & {
|
|
|
22
20
|
Only allowed for conditionMode="discrete" but not "binary"
|
|
23
21
|
*/
|
|
24
22
|
timeScale: 'age' | 'time'
|
|
23
|
+
breaks?: number[]
|
|
25
24
|
value_by_max_grade?: boolean //'false' if bar_by_children is 'true'
|
|
26
25
|
value_by_most_recent?: boolean //'false' if bar_by_children is 'true'
|
|
27
26
|
value_by_computable_grade?: boolean //'true' if bar_by_children is 'true'
|
|
28
27
|
groups?: any // TODO: should use a defined type
|
|
29
28
|
}
|
|
30
29
|
|
|
30
|
+
export type ConditionChildrenQ = MinBaseQ & {
|
|
31
|
+
mode: 'discrete'
|
|
32
|
+
valueFor: 'children'
|
|
33
|
+
bar_by_children: true
|
|
34
|
+
groups?: any // TODO: should use a defined type
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// TODO: should implement the expected property combinations as distinct types
|
|
38
|
+
export type ConditionQ = ConditionGradeQ | ConditionChildrenQ
|
|
39
|
+
|
|
31
40
|
export type ConditionTerm = BaseTerm & {
|
|
32
41
|
type: 'condition'
|
|
33
42
|
values: TermValues
|
|
@@ -54,3 +63,11 @@ export type ConditionTermSettingInstance = TermSettingInstance & {
|
|
|
54
63
|
refGrp: any
|
|
55
64
|
}
|
|
56
65
|
*/
|
|
66
|
+
|
|
67
|
+
export type RawConditionTW = ConditionTW & {
|
|
68
|
+
q: {
|
|
69
|
+
valueFor?: 'grade' | 'children'
|
|
70
|
+
bar_by_children?: true
|
|
71
|
+
bar_by_grade?: true
|
|
72
|
+
}
|
|
73
|
+
}
|
package/src/terms/numeric.ts
CHANGED
|
@@ -63,6 +63,7 @@ export type StartUnboundedBin = {
|
|
|
63
63
|
stopinclusive?: boolean
|
|
64
64
|
stopunbounded?: false
|
|
65
65
|
label?: string
|
|
66
|
+
range?: string // alternative bin label
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
export type StopUnboundedBin = {
|
|
@@ -72,6 +73,7 @@ export type StopUnboundedBin = {
|
|
|
72
73
|
startunbounded?: false
|
|
73
74
|
stopinclusive?: false // cannot include an infinite bound
|
|
74
75
|
label?: string
|
|
76
|
+
range?: string // alternative bin label
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
// TODO??? should separate a fully bounded bin by startinclusive, stopinclusive
|
|
@@ -84,10 +86,13 @@ export type FullyBoundedBin = {
|
|
|
84
86
|
stopinclusive?: boolean
|
|
85
87
|
stopunbounded?: false
|
|
86
88
|
label?: string
|
|
89
|
+
range?: string // alternative bin label
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
export type NumericBin = StartUnboundedBin | FullyBoundedBin | StopUnboundedBin
|
|
90
93
|
|
|
94
|
+
export type RangeEntry = NumericBin | { value: number; label: string }
|
|
95
|
+
|
|
91
96
|
export type RegularNumericBinConfig = MinBaseQ & {
|
|
92
97
|
type: 'regular-bin' // another concrete value being assigned, instead of `string`
|
|
93
98
|
//regular-sized bins
|