@sjcrh/proteinpaint-types 2.177.0 → 2.178.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-LHJGTOZJ.js → chunk-26UKKPK2.js} +1301 -594
- package/dist/{chunk-4SOVPEYQ.js → chunk-2XQJCZEO.js} +842 -243
- package/dist/{chunk-UQEAM7BH.js → chunk-2Y7WE3JU.js} +1301 -594
- package/dist/chunk-4DCPDZW4.js +143 -0
- package/dist/{chunk-5KF6Z3GL.js → chunk-CX2Y673E.js} +923 -329
- package/dist/chunk-CYQDO4FX.js +3191 -0
- package/dist/{chunk-W7UCAYSF.js → chunk-FQYNRDHB.js} +923 -329
- package/dist/chunk-FRXRNCDV.js +14 -0
- package/dist/{chunk-F4YCPOQV.js → chunk-GAYJUXNZ.js} +947 -353
- package/dist/{chunk-7WEVNKAM.js → chunk-HZEV7D5E.js} +1301 -594
- package/dist/{chunk-4ZMQ5CTL.js → chunk-NIEACU6R.js} +7 -31
- package/dist/{chunk-Q6MWNJ2V.js → chunk-NRV6MPRM.js} +3421 -1378
- package/dist/{chunk-44LN7YTE.js → chunk-PHRILOVX.js} +923 -329
- package/dist/{chunk-URHI6FFP.js → chunk-UFYKXOY2.js} +2233 -690
- package/dist/{chunk-63OD34W2.js → chunk-UWAVSKMD.js} +1301 -594
- package/dist/chunk-VBNF7BRI.js +3492 -0
- package/dist/{chunk-2DJFVQUQ.js → chunk-WXCXZRKP.js} +1305 -598
- package/dist/{chunk-7NKZVHIZ.js → chunk-YHKFJCXG.js} +1445 -496
- package/dist/correlationVolcano.js +1 -1
- package/dist/grin2.js +1 -1
- package/dist/index.js +79 -61
- package/dist/termdb.boxplot.js +1 -1
- package/dist/termdb.categories.js +1 -1
- package/dist/termdb.chat.js +3122 -5
- package/dist/termdb.chat2.js +13 -0
- package/dist/termdb.cluster.js +1 -1
- package/dist/termdb.descrstats.js +1 -1
- package/dist/termdb.diffMeth.js +11 -0
- package/dist/termdb.dmr.js +11 -0
- package/dist/termdb.numericcategories.js +1 -1
- package/dist/termdb.percentile.js +1 -1
- package/dist/termdb.singlecellData.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 -1
- package/src/dataset.ts +55 -8
- package/src/index.ts +5 -1
- package/src/routes/grin2.ts +5 -11
- package/src/routes/{termdb.chat.ts → termdb.chat2.ts} +42 -15
- package/src/routes/termdb.cluster.ts +11 -0
- package/src/routes/termdb.diffMeth.ts +49 -0
- package/src/routes/termdb.dmr.ts +47 -0
- package/src/routes/termdb.singlecellData.ts +3 -1
- package/src/terms/dnaMethylation.ts +19 -0
- package/src/terms/numeric.ts +13 -2
- package/src/terms/singleCellCellType.ts +1 -1
- package/src/terms/singleCellGeneExpression.ts +25 -19
- package/src/terms/term.ts +1 -1
- package/src/terms/termCollection.ts +93 -21
- package/src/terms/wholeProteomeAbundance.ts +30 -0
- package/dist/chunk-WWE2SDCU.js +0 -494
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-FQYNRDHB.js";
|
|
6
6
|
import "./chunk-YNHC5SXO.js";
|
|
7
7
|
export {
|
|
8
8
|
termdbTopVariablyExpressedGenesPayload,
|
package/dist/termdb.violin.js
CHANGED
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Mclass } from './Mclass.ts'
|
|
2
|
+
import type { BaseTerm } from './terms/term.ts'
|
|
3
|
+
import type { CategoryKey } from './terms/termCollection.ts'
|
|
2
4
|
import type { WSImage } from './routes/samplewsimages.ts'
|
|
3
5
|
import type { WSISample } from './routes/wsisamples.ts'
|
|
4
6
|
import type { SaveWSIAnnotationRequest } from './routes/saveWSIAnnotation.ts'
|
|
@@ -694,6 +696,17 @@ export type MetaboliteIntensityQueryNative = {
|
|
|
694
696
|
|
|
695
697
|
export type MetaboliteIntensityQuery = MetaboliteIntensityQueryNative
|
|
696
698
|
|
|
699
|
+
export type WholeProteomeAbundanceQuery = {
|
|
700
|
+
/** document structure */
|
|
701
|
+
file: string
|
|
702
|
+
samples?: number[]
|
|
703
|
+
/** _proteins,used to dynamically built cache of protein names to speed up search */
|
|
704
|
+
_proteins?: string[]
|
|
705
|
+
get?: (param: any) => void
|
|
706
|
+
find?: (param: string[]) => void
|
|
707
|
+
bins?: { [index: string]: any }
|
|
708
|
+
}
|
|
709
|
+
|
|
697
710
|
/** the geneExpression query
|
|
698
711
|
three possibilities
|
|
699
712
|
{ src: 'native', file }
|
|
@@ -853,6 +866,8 @@ export type SingleCellQuery = {
|
|
|
853
866
|
DEgenes?: SingleCellDEgeneGdc
|
|
854
867
|
/** supplies per-sample images. will create a new tab on the ui. one image per sample */
|
|
855
868
|
images?: SCImages
|
|
869
|
+
/** Created on mds.init() from colorMap and alias within each plot. */
|
|
870
|
+
terms?: object[]
|
|
856
871
|
}
|
|
857
872
|
|
|
858
873
|
type SCImages = {
|
|
@@ -967,6 +982,21 @@ type Mds3Queries = {
|
|
|
967
982
|
file: string
|
|
968
983
|
// in case a genome may have more than 1 geneset dbs, here may specify name of db that this result is based on */
|
|
969
984
|
}
|
|
985
|
+
/** dna methylation beta value matrix
|
|
986
|
+
*/
|
|
987
|
+
dnaMethylation?: {
|
|
988
|
+
/** path to h5 file */
|
|
989
|
+
file: string
|
|
990
|
+
/** dna methylation unit (e.g. 'Average Beta Value') */
|
|
991
|
+
unit: string
|
|
992
|
+
/** promoter-by-sample matrix, values are average M-value */
|
|
993
|
+
promoter?: {
|
|
994
|
+
/** path to h5 file */
|
|
995
|
+
file: string
|
|
996
|
+
/** unit label for promoter values (e.g. 'Average M-value') */
|
|
997
|
+
unit: string
|
|
998
|
+
}
|
|
999
|
+
}
|
|
970
1000
|
rnaseqGeneCount?: RnaseqGeneCount
|
|
971
1001
|
/** Used to create the top mutated genes UI in the gene
|
|
972
1002
|
* set edit ui and data requests. */
|
|
@@ -978,6 +1008,10 @@ type Mds3Queries = {
|
|
|
978
1008
|
src: 'native'
|
|
979
1009
|
file: string
|
|
980
1010
|
}
|
|
1011
|
+
proteome?: {
|
|
1012
|
+
/** whole proteome abundance */
|
|
1013
|
+
whole?: WholeProteomeAbundanceQuery
|
|
1014
|
+
}
|
|
981
1015
|
singleCell?: SingleCellQuery
|
|
982
1016
|
singleSampleGenomeQuantification?: SingleSampleGenomeQuantification
|
|
983
1017
|
singleSampleGbtk?: SingleSampleGbtk
|
|
@@ -1607,18 +1641,18 @@ keep this setting here for reason of:
|
|
|
1607
1641
|
isTermVisible?: (clientAuthResult: any, ids: string) => boolean
|
|
1608
1642
|
hiddenIds?: string[]
|
|
1609
1643
|
getAdditionalFilter?: (__protected__: any, term: any) => Filter | undefined
|
|
1610
|
-
/** collections of
|
|
1611
|
-
|
|
1612
|
-
numericTermCollections?: NumericTermCollection[]
|
|
1644
|
+
/** collections of dictionary terms (numeric or categorical) that are related and can be used together in some plots */
|
|
1645
|
+
termCollections?: TermCollection[]
|
|
1613
1646
|
}
|
|
1614
1647
|
|
|
1615
|
-
type
|
|
1616
|
-
/** collection
|
|
1617
|
-
id?: string
|
|
1618
|
-
/** human readable name for this collection, may be as collection id if missing */
|
|
1648
|
+
type TermCollectionBase = {
|
|
1649
|
+
/** human readable name as well as unique identifier for this collection */
|
|
1619
1650
|
name: string
|
|
1620
|
-
/** array of dictionary
|
|
1651
|
+
/** array of dictionary term ids belonging to this collection */
|
|
1621
1652
|
termIds: string[]
|
|
1653
|
+
/** full term objects corresponding to termIds[]; populated by server on dataset init,
|
|
1654
|
+
* sent to client so fill() can resolve member term names without extra requests */
|
|
1655
|
+
termlst?: BaseTerm[]
|
|
1622
1656
|
/** array of branch term ids belonging to this collection,
|
|
1623
1657
|
* may be used as state.tree.expandedTermIds[] option to termdb appInit() */
|
|
1624
1658
|
branchIds: string[]
|
|
@@ -1634,6 +1668,18 @@ type NumericTermCollection = {
|
|
|
1634
1668
|
}[]
|
|
1635
1669
|
}
|
|
1636
1670
|
|
|
1671
|
+
type NumericTermCollection = TermCollectionBase & {
|
|
1672
|
+
type: 'numeric'
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
type CategoricalTermCollection = TermCollectionBase & {
|
|
1676
|
+
type: 'categorical'
|
|
1677
|
+
/** category values to filter on; hydrated form uses CategoryKey[] */
|
|
1678
|
+
categoryKeys: CategoryKey[]
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
type TermCollection = NumericTermCollection | CategoricalTermCollection
|
|
1682
|
+
|
|
1637
1683
|
type SampleType = {
|
|
1638
1684
|
name: string
|
|
1639
1685
|
plural_name: string
|
|
@@ -1960,6 +2006,7 @@ export type Mds3 = BaseMds & {
|
|
|
1960
2006
|
validate_filter0?: (f: any) => void
|
|
1961
2007
|
ssm2canonicalisoform?: GdcApi
|
|
1962
2008
|
variant2samples?: Variant2Samples
|
|
2009
|
+
scatterplots?: Scatterplots
|
|
1963
2010
|
/** disables switching to genomic mode for the protein view mds3 tk of this ds
|
|
1964
2011
|
works by preventing block gmmode menu from showing "genomic" option
|
|
1965
2012
|
is only passed via mds3 adhoc ds copy, but not termdbConfig
|
package/src/index.ts
CHANGED
|
@@ -40,12 +40,14 @@ export * from './routes/saveWSIAnnotation.ts'
|
|
|
40
40
|
export * from './routes/snp.ts'
|
|
41
41
|
export * from './routes/termdb.boxplot.ts'
|
|
42
42
|
export * from './routes/termdb.categories.ts'
|
|
43
|
-
export * from './routes/termdb.
|
|
43
|
+
export * from './routes/termdb.chat2.ts'
|
|
44
44
|
export * from './routes/termdb.cluster.ts'
|
|
45
45
|
export * from './routes/termdb.cohort.summary.ts'
|
|
46
46
|
export * from './routes/termdb.cohorts.ts'
|
|
47
47
|
export * from './routes/termdb.DE.ts'
|
|
48
|
+
export * from './routes/termdb.diffMeth.ts'
|
|
48
49
|
export * from './routes/termdb.descrstats.ts'
|
|
50
|
+
export * from './routes/termdb.dmr.ts'
|
|
49
51
|
export * from './routes/termdb.numericcategories.ts'
|
|
50
52
|
export * from './routes/termdb.percentile.ts'
|
|
51
53
|
export * from './routes/termdb.runChart.ts'
|
|
@@ -73,6 +75,7 @@ export * from './terms/numeric.ts'
|
|
|
73
75
|
export * from './terms/geneVariant.ts'
|
|
74
76
|
export * from './terms/geneExpression.ts'
|
|
75
77
|
export * from './terms/metaboliteIntensity.ts'
|
|
78
|
+
export * from './terms/wholeProteomeAbundance.ts'
|
|
76
79
|
export * from './terms/qualitative.ts'
|
|
77
80
|
export * from './terms/singleCellCellType.ts'
|
|
78
81
|
export * from './terms/singleCellGeneExpression.ts'
|
|
@@ -80,6 +83,7 @@ export * from './terms/snp.ts'
|
|
|
80
83
|
export * from './terms/snps.ts'
|
|
81
84
|
export * from './terms/samplelst.ts'
|
|
82
85
|
export * from './terms/ssGSEA.ts'
|
|
86
|
+
export * from './terms/dnaMethylation.ts'
|
|
83
87
|
export * from './terms/q.ts'
|
|
84
88
|
export * from './terms/term.ts'
|
|
85
89
|
export * from './terms/termCollection.ts'
|
package/src/routes/grin2.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
/** General GRIN2 route
|
|
2
|
-
* This route handles the GRIN2 analysis for any non-GDC data.
|
|
3
|
-
* It processes the incoming data structure via PP's existing filter infrastructure
|
|
4
|
-
* and returns the same structured results as GDC-GRIN2.
|
|
5
|
-
* Specifically it will return a sortable table of top mutated genes and
|
|
6
|
-
* a static PNG manhattan-like plot of the -log10(q-value).
|
|
7
|
-
* We allow the user to customize the snvindel, CNV, and fusion filtering options.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
import type { Filter } from '../filter.ts'
|
|
11
3
|
|
|
12
4
|
/** GRIN2 request */
|
|
13
5
|
export type GRIN2Request = {
|
|
@@ -49,8 +41,8 @@ export type GRIN2Request = {
|
|
|
49
41
|
/** Bin size for Manhattan plot histogram bin size. Used in the calculation of dynamic y-axis capping process (default: 10) */
|
|
50
42
|
binSize: number
|
|
51
43
|
|
|
52
|
-
/**
|
|
53
|
-
filter?:
|
|
44
|
+
/** pp filter */
|
|
45
|
+
filter?: Filter
|
|
54
46
|
|
|
55
47
|
/** Options for filtering SNV/indel file content */
|
|
56
48
|
snvindelOptions?: {
|
|
@@ -66,6 +58,8 @@ export type GRIN2Request = {
|
|
|
66
58
|
fivePrimeFlankSize?: number
|
|
67
59
|
/** Number of bases to include as 3' flank around the mutation position */
|
|
68
60
|
threePrimeFlankSize?: number
|
|
61
|
+
/** MAF filter object (tvslst) to filter mutations by allele frequency */
|
|
62
|
+
mafFilter?: Filter
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
/** Options for filtering CNV file content */
|
|
@@ -11,9 +11,14 @@ export type ChatRequest = {
|
|
|
11
11
|
__protected__?: any
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
type
|
|
14
|
+
export type TextResponse = {
|
|
15
|
+
type: 'text'
|
|
16
|
+
/** Plain text message to display in the chat */
|
|
17
|
+
text: string
|
|
18
|
+
}
|
|
19
|
+
export type HtmlResponse = {
|
|
15
20
|
type: 'html'
|
|
16
|
-
/**
|
|
21
|
+
/** Pre-approved HTML from the dataset JSON resources array */
|
|
17
22
|
html: string
|
|
18
23
|
}
|
|
19
24
|
export type PlotResponse = {
|
|
@@ -22,9 +27,20 @@ export type PlotResponse = {
|
|
|
22
27
|
/** Specifies what action to take e.g. Summary plot or no action. Will add more chart types later */
|
|
23
28
|
}
|
|
24
29
|
|
|
25
|
-
export type LlmConfig = {
|
|
30
|
+
export type LlmConfig = {
|
|
31
|
+
provider: 'SJ' | 'ollama'
|
|
32
|
+
api: string
|
|
33
|
+
modelName: string
|
|
34
|
+
embeddingModelName: string
|
|
35
|
+
/** Whether to load the embedding model locally (via transformers.js) or call a remote API. Defaults to 'local'. */
|
|
36
|
+
embeddingModelAccess?: 'local' | 'api'
|
|
37
|
+
/** Smaller model to use for LLM classification fallback. Defaults to modelName if not set. */
|
|
38
|
+
classifierModelName?: string
|
|
39
|
+
/** Log verbose debug output (e.g. raw embedding arrays) to the terminal. Defaults to false. */
|
|
40
|
+
verbose?: boolean
|
|
41
|
+
}
|
|
26
42
|
|
|
27
|
-
export type ChatResponse = HtmlResponse | PlotResponse
|
|
43
|
+
export type ChatResponse = TextResponse | HtmlResponse | PlotResponse
|
|
28
44
|
|
|
29
45
|
export const ChatPayload: RoutePayload = {
|
|
30
46
|
request: {
|
|
@@ -90,23 +106,34 @@ export type DbValue = {
|
|
|
90
106
|
}
|
|
91
107
|
|
|
92
108
|
export type ClassificationType =
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
96
|
-
export type html_type = {
|
|
97
|
-
/** When type == html, display the string in the html field */
|
|
98
|
-
type: 'html'
|
|
99
|
-
/** The message to be dislayed on the chatbot UI */
|
|
100
|
-
html: string
|
|
101
|
-
}
|
|
109
|
+
| plot_type
|
|
110
|
+
| resource_type
|
|
111
|
+
| none_type /** Variable containing the type of action the UI needs to take */
|
|
102
112
|
|
|
103
113
|
export type plot_type = {
|
|
104
114
|
/** When type == plot, show the corresponding plot in the plot field */
|
|
105
115
|
type: 'plot'
|
|
106
|
-
/** The type of plot to be displayed on the UI.
|
|
107
|
-
|
|
116
|
+
/** The type of plot to be displayed on the UI.
|
|
117
|
+
* Standard categories are listed; datasets may define additional custom categories. */
|
|
118
|
+
plot: 'summary' | 'dge' | 'survival' | 'matrix' | 'sampleScatter'
|
|
108
119
|
}
|
|
109
120
|
|
|
121
|
+
export type resource_type = {
|
|
122
|
+
/** When type == resource, invoke the resource agent to return a matching resource link */
|
|
123
|
+
type: 'resource'
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type none_type = {
|
|
127
|
+
/** When type == none, the query did not match any known category */
|
|
128
|
+
type: 'none'
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Top-level classification returned by classifyQuery: plot or notplot (subtype determined separately by plot.ts) */
|
|
132
|
+
export type QueryClassification = { type: 'plot' } | { type: 'notplot' }
|
|
133
|
+
|
|
134
|
+
/** Specific plot type returned by classifyPlotType in plot.ts */
|
|
135
|
+
export type PlotType = 'summary' | 'dge' | 'survival' | 'matrix' | 'samplescatter'
|
|
136
|
+
|
|
110
137
|
export type DEType = {
|
|
111
138
|
/** Name of group1 which is an array of filter terms */
|
|
112
139
|
group1: FilterTerm[]
|
|
@@ -4,6 +4,7 @@ import type { Filter } from '../filter.ts'
|
|
|
4
4
|
import type { Term } from '../terms/term.ts'
|
|
5
5
|
import type { GeneExpressionTW } from '../terms/geneExpression.ts'
|
|
6
6
|
import type { MetaboliteIntensityTW } from '../terms/metaboliteIntensity.ts'
|
|
7
|
+
import type { WholeProteomeAbundanceTW } from '../terms/wholeProteomeAbundance.ts'
|
|
7
8
|
import type { NumericTW } from '../terms/numeric.ts'
|
|
8
9
|
|
|
9
10
|
export type Gene = {
|
|
@@ -48,6 +49,15 @@ export type TermdbClusterRequestMetabolite = TermdbClusterRequestBase & {
|
|
|
48
49
|
zScoreTransformation?: string
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
export type TermdbClusterRequestWholeProteomeAbundance = TermdbClusterRequestBase & {
|
|
53
|
+
/** Data type */
|
|
54
|
+
dataType: 'wholeProteomeAbundance'
|
|
55
|
+
/** List of terms */
|
|
56
|
+
terms: WholeProteomeAbundanceTW[]
|
|
57
|
+
/** perform z-score transformation on values */
|
|
58
|
+
zScoreTransformation?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
export type TermdbClusterRequestNumericDictTerm = TermdbClusterRequestBase & {
|
|
52
62
|
/** Data type */
|
|
53
63
|
dataType: 'numericDictTerm'
|
|
@@ -61,6 +71,7 @@ export type TermdbClusterRequest =
|
|
|
61
71
|
| TermdbClusterRequestGeneExpression
|
|
62
72
|
| TermdbClusterRequestMetabolite
|
|
63
73
|
| TermdbClusterRequestNumericDictTerm
|
|
74
|
+
| TermdbClusterRequestWholeProteomeAbundance
|
|
64
75
|
|
|
65
76
|
export type Hclust = {
|
|
66
77
|
merge: { n1: number; n2: number }[]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.js'
|
|
2
|
+
|
|
3
|
+
export type DiffMethRequest = {
|
|
4
|
+
/** Genome build name */
|
|
5
|
+
genome: string
|
|
6
|
+
/** Dataset label */
|
|
7
|
+
dslabel: string
|
|
8
|
+
/** Object containing two arrays of samples for differential methylation analysis */
|
|
9
|
+
samplelst: any
|
|
10
|
+
/** Minimum non-NA samples required per group (default 3) */
|
|
11
|
+
min_samples_per_group?: number
|
|
12
|
+
/** Term for confounding variable 1 (if present) */
|
|
13
|
+
tw?: any
|
|
14
|
+
/** Term for confounding variable 2 (if present) */
|
|
15
|
+
tw2?: any
|
|
16
|
+
/** Option to return early with actual number of samples with methylation values */
|
|
17
|
+
preAnalysis?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type DiffMethResponse = {
|
|
21
|
+
/** Array of promoter-level differential methylation results */
|
|
22
|
+
data: DiffMethDataEntry[]
|
|
23
|
+
/** Effective sample size for group 1 */
|
|
24
|
+
sample_size1: number
|
|
25
|
+
/** Effective sample size for group 2 */
|
|
26
|
+
sample_size2: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type DiffMethDataEntry = {
|
|
30
|
+
/** ENCODE CRE promoter ID (e.g. EH38E3756858) */
|
|
31
|
+
promoter_id: string
|
|
32
|
+
/** Gene symbol(s) associated with the promoter (comma-separated if multiple) */
|
|
33
|
+
gene_name: string
|
|
34
|
+
/** M-value difference (positive = hypermethylated in cases) */
|
|
35
|
+
fold_change: number
|
|
36
|
+
/** Raw p-value from moderated t-test */
|
|
37
|
+
original_p_value: number
|
|
38
|
+
/** FDR-adjusted p-value (Benjamini-Hochberg) */
|
|
39
|
+
adjusted_p_value: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const diffMethPayload: RoutePayload = {
|
|
43
|
+
request: {
|
|
44
|
+
typeId: 'DiffMethRequest'
|
|
45
|
+
},
|
|
46
|
+
response: {
|
|
47
|
+
typeId: 'DiffMethResponse'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Filter } from '../filter.ts'
|
|
2
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
3
|
+
|
|
4
|
+
export type TermdbDmrRequest = {
|
|
5
|
+
genome: string
|
|
6
|
+
dslabel: string
|
|
7
|
+
/** list of samples from each group */
|
|
8
|
+
group1: Sample[]
|
|
9
|
+
group2: Sample[]
|
|
10
|
+
/** query region */
|
|
11
|
+
chr: string
|
|
12
|
+
start: number
|
|
13
|
+
stop: number
|
|
14
|
+
// todo more params
|
|
15
|
+
filter?: Filter
|
|
16
|
+
__protected__?: any
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type Sample = {
|
|
20
|
+
sampleId: number | string
|
|
21
|
+
sample: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type TermdbDmrSuccessResponse = {
|
|
25
|
+
status: 'ok'
|
|
26
|
+
dmrs: {
|
|
27
|
+
chr: string
|
|
28
|
+
start: number
|
|
29
|
+
stop: number
|
|
30
|
+
// todo more stats
|
|
31
|
+
}[]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type TermdbDmrErrorResponse = {
|
|
35
|
+
error: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type TermdbDmrResponse = TermdbDmrSuccessResponse | TermdbDmrErrorResponse
|
|
39
|
+
|
|
40
|
+
export const TermdbDmrPayload: RoutePayload = {
|
|
41
|
+
request: {
|
|
42
|
+
typeId: 'TermdbDmrRequest'
|
|
43
|
+
},
|
|
44
|
+
response: {
|
|
45
|
+
typeId: 'TermdbDmrResponse'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -44,8 +44,10 @@ export type TermdbSingleCellDataRequest = {
|
|
|
44
44
|
key: plot.name, value: column name
|
|
45
45
|
if missing, use default setting of the plot
|
|
46
46
|
*/
|
|
47
|
-
colorBy?: { [key: string]: string }
|
|
47
|
+
// colorBy?: { [key: string]: string }
|
|
48
|
+
colorBy?: string
|
|
48
49
|
colorMap?: { [key: string]: string }
|
|
50
|
+
singleCellPlot?: any
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
export type HasdataResponse = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NumericBaseTerm, NumericQ, PresetNumericBins, NumTW, RawNumTW } from './numeric.ts'
|
|
2
|
+
|
|
3
|
+
export type DnaMethylationQ = NumericQ & { dt?: number }
|
|
4
|
+
|
|
5
|
+
export type DnaMethylationTerm = NumericBaseTerm & {
|
|
6
|
+
/** term.id: plan to be concatenated string value "chr:start-stop" */
|
|
7
|
+
/** term.name: can be user-assigned */
|
|
8
|
+
type: 'dnaMethylation'
|
|
9
|
+
chr: string
|
|
10
|
+
start: number
|
|
11
|
+
stop: number
|
|
12
|
+
bins?: PresetNumericBins
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type RawDnaMethylationTerm = DnaMethylationTerm & { name?: string }
|
|
16
|
+
|
|
17
|
+
export type DnaMethylationTW = NumTW & { term: DnaMethylationTerm }
|
|
18
|
+
|
|
19
|
+
export type RawDnaMethylationTW = RawNumTW & { term: RawDnaMethylationTerm }
|
package/src/terms/numeric.ts
CHANGED
|
@@ -5,8 +5,11 @@ import type {
|
|
|
5
5
|
BaseTerm,
|
|
6
6
|
GeneExpressionTerm,
|
|
7
7
|
MetaboliteIntensityTerm,
|
|
8
|
+
WholeProteomeAbundanceTerm,
|
|
8
9
|
DateTerm,
|
|
9
|
-
SsGSEATerm
|
|
10
|
+
SsGSEATerm,
|
|
11
|
+
DnaMethylationTerm,
|
|
12
|
+
SingleCellGeneExpressionTerm
|
|
10
13
|
} from '../index.ts'
|
|
11
14
|
|
|
12
15
|
export type RawRegularBin = Partial<RegularNumericBinConfig> & { preferredBins?: string }
|
|
@@ -56,7 +59,15 @@ export type RawNumericDictTerm = NumericDictTerm & {
|
|
|
56
59
|
id?: string
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
export type NumericTerm =
|
|
62
|
+
export type NumericTerm =
|
|
63
|
+
| NumericDictTerm
|
|
64
|
+
| GeneExpressionTerm
|
|
65
|
+
| MetaboliteIntensityTerm
|
|
66
|
+
| WholeProteomeAbundanceTerm
|
|
67
|
+
| DateTerm
|
|
68
|
+
| SsGSEATerm
|
|
69
|
+
| DnaMethylationTerm
|
|
70
|
+
| SingleCellGeneExpressionTerm
|
|
60
71
|
|
|
61
72
|
export type StartUnboundedBin = {
|
|
62
73
|
// where possible, assign a concrete value (true) when it is known in advance,
|
|
@@ -4,7 +4,7 @@ export type SingleCellCellTypeTerm = BaseTerm & {
|
|
|
4
4
|
type: 'singleCellCellType'
|
|
5
5
|
/** the cell types may be also cell attributes like CNV, Fusion, etc */
|
|
6
6
|
/** single cell terms require a sample to read the term values, they are associated with a sample */
|
|
7
|
-
sample:
|
|
7
|
+
sample: object
|
|
8
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 */
|
|
9
9
|
plot: string
|
|
10
10
|
groupsetting: TermGroupSetting
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { NumericTerm, NumericQ } from './numeric.ts'
|
|
1
|
+
// import type { BaseTerm } from '../index.ts'
|
|
2
|
+
import type { PresetNumericBins, NumericBaseTerm, NumTW, RawNumTW } from '../index.ts'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
type Gene = {
|
|
5
|
+
kind?: 'gene'
|
|
6
|
+
gene: string
|
|
7
|
+
chr?: string
|
|
8
|
+
start?: number
|
|
9
|
+
stop?: number
|
|
10
|
+
}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
type Coord = {
|
|
13
|
+
kind?: 'coord'
|
|
14
|
+
gene?: string
|
|
15
|
+
chr: string
|
|
16
|
+
start: number
|
|
17
|
+
stop: number
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
export type SingleCellGeneExpressionTerm =
|
|
20
|
+
export type SingleCellGeneExpressionTerm = NumericBaseTerm & {
|
|
21
|
+
type: 'singleCellGeneExpression'
|
|
19
22
|
gene: string
|
|
20
23
|
sample: string
|
|
21
|
-
|
|
24
|
+
unit: string
|
|
25
|
+
bins?: PresetNumericBins
|
|
26
|
+
} & (Gene | Coord)
|
|
22
27
|
|
|
23
|
-
export type
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
export type SingleCellGeneExpressionTermTW = NumTW & { term: SingleCellGeneExpressionTerm }
|
|
29
|
+
|
|
30
|
+
export type RawSingleCellGeneExpTerm = SingleCellGeneExpressionTerm & { name?: string }
|
|
31
|
+
|
|
32
|
+
export type RawSingleCellGeneExpTW = RawNumTW & { term: RawSingleCellGeneExpTerm }
|