@sjcrh/proteinpaint-types 2.81.5 → 2.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.81.5",
3
+ "version": "2.83.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
package/src/dataset.ts CHANGED
@@ -915,6 +915,11 @@ type MatrixSettings = {
915
915
  cnvUnit?: 'log2ratio' | 'segmedian'
916
916
  }
917
917
 
918
+ type NumericDictTermClusterSettings = {
919
+ /** default hiercluster group name */
920
+ termGroupName?: string
921
+ }
922
+
918
923
  type Matrix = {
919
924
  /** alternative name, e.g. the plot is called "oncomatrix" in gdc; by default it's called "matrix" */
920
925
  appName?: string
@@ -927,6 +932,15 @@ type Matrix = {
927
932
  legendValueFilter?: any
928
933
  }
929
934
 
935
+ type NumericDictTermCluster = {
936
+ /** alternative name, e.g. the plot is called "drug sensitivity" in ALL-pharmacotyping; by default it's called "Numeric Dictionary Term cluster" */
937
+ appName?: string
938
+ /** default settings for numericDictTermCluster plot */
939
+ settings?: NumericDictTermClusterSettings
940
+ /** list of numeric term ids that will be excluded from the numeric dictionary term cluster, add to usecase.detail to exclude terms*/
941
+ exclude?: string[]
942
+ }
943
+
930
944
  type Survival = {
931
945
  /** default settings for survival plot */
932
946
  settings?: SurvivalSettings
@@ -1031,6 +1045,7 @@ keep this setting here for reason of:
1031
1045
 
1032
1046
  scatterplots?: Scatterplots
1033
1047
  matrix?: Matrix
1048
+ numericDictTermCluster?: NumericDictTermCluster
1034
1049
  survival?: Survival
1035
1050
  logscaleBase2?: boolean
1036
1051
  plotConfigByCohort?: PlotConfigByCohort
@@ -1509,9 +1524,30 @@ export type Mds = BaseMds & {
1509
1524
  }
1510
1525
  }
1511
1526
 
1527
+ type PreInitStatus = {
1528
+ status: string
1529
+ message?: string
1530
+ [props: string]: any
1531
+ }
1532
+
1533
+ export type PreInit = {
1534
+ getStatus: () => Promise<PreInitStatus>
1535
+ retryDelay?: number
1536
+ retryMax?: number
1537
+ errorCallback?: (response: PreInitStatus) => void
1538
+ test?: {
1539
+ numCalls: number
1540
+ minor: number
1541
+ mayEditResponse: (response: any) => any
1542
+ }
1543
+ }
1544
+
1512
1545
  export type Mds3 = BaseMds & {
1513
1546
  label?: Title
1514
1547
  isMds3: boolean
1548
+ loadWithoutBlocking?: boolean
1549
+ preInit?: PreInit
1550
+ initErrorCallback?: (a: any) => void
1515
1551
  viewModes?: ViewMode[]
1516
1552
  dsinfo?: KeyVal[]
1517
1553
  queries?: Mds3Queries
@@ -1522,7 +1558,7 @@ export type Mds3 = BaseMds & {
1522
1558
  ssm2canonicalisoform?: GdcApi
1523
1559
  variant2samples?: Variant2Samples
1524
1560
  // !!! TODO: improve these type definitions below !!!
1525
- getHostHeaders?: (q: any) => any
1561
+ getHostHeaders?: (q?: any) => any
1526
1562
  serverconfigFeatures?: any
1527
1563
  customTwQByType?: {
1528
1564
  [termType: string]: {
@@ -3,6 +3,7 @@ import { Filter } from '../filter.ts'
3
3
  import { Term } from '../terms/term.ts'
4
4
  import { GeneExpressionTerm } from '../terms/geneExpression.ts'
5
5
  import { MetaboliteIntensityTerm } from '../terms/metaboliteIntensity.ts'
6
+ import { NumericDictTerm } from '../terms/numeric.ts'
6
7
 
7
8
  export type Gene = {
8
9
  /** gene symbol, required */
@@ -42,7 +43,17 @@ export type TermdbClusterRequestMetabolite = TermdbClusterRequestBase & {
42
43
  terms: MetaboliteIntensityTerm[]
43
44
  }
44
45
 
45
- export type TermdbClusterRequest = TermdbClusterRequestGeneExpression | TermdbClusterRequestMetabolite
46
+ export type TermdbClusterRequestNumericDictTerm = TermdbClusterRequestBase & {
47
+ /** Data type */
48
+ dataType: 'numericDictTerm'
49
+ /** List of terms */
50
+ terms: NumericDictTerm[]
51
+ }
52
+
53
+ export type TermdbClusterRequest =
54
+ | TermdbClusterRequestGeneExpression
55
+ | TermdbClusterRequestMetabolite
56
+ | TermdbClusterRequestNumericDictTerm
46
57
 
47
58
  export type Hclust = {
48
59
  merge: { n1: number; n2: number }[]
@@ -18,8 +18,10 @@ export type Cell = {
18
18
  export type Plot = {
19
19
  /** name of the plot */
20
20
  name: string
21
- /** List of cells */
22
- cells: Cell[]
21
+ /** List of cells with gene expression */
22
+ expCells?: Cell[]
23
+ /** List of cells with no gene expression, if no gene provided all cells will be here */
24
+ noExpCells?: Cell[]
23
25
  /** Column name to color by, e.g Cell type, CNV, Fusion */
24
26
  colorBy: string
25
27
  colorColumns: string[]
@@ -50,6 +50,14 @@ export type NumericTerm = BaseTerm & {
50
50
  valueConversion?: ValueConversion*/
51
51
  }
52
52
 
53
+ export type NumericDictTerm = BaseTerm & {
54
+ id?: string
55
+ type: 'integer' | 'float'
56
+ bins: PresetNumericBins
57
+ values?: TermValues
58
+ unit?: string
59
+ }
60
+
53
61
  export type StartUnboundedBin = {
54
62
  // where possible, assign a concrete value (true) when it is known in advance,
55
63
  // in which case, do not use an abstract type (boolean) to startunbounded