@sjcrh/proteinpaint-types 2.140.1-2 → 2.140.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.
Files changed (31) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-KDHGWAOS.js → chunk-2WLN6PMW.js} +575 -367
  3. package/dist/{chunk-G5BYLEJC.js → chunk-AADDTYUL.js} +266 -154
  4. package/dist/{chunk-2QKCLUH3.js → chunk-BWLSDIHM.js} +575 -367
  5. package/dist/{chunk-P3Z422N2.js → chunk-ECF6WSOD.js} +266 -154
  6. package/dist/{chunk-NHELOLDH.js → chunk-EWON4FG5.js} +2401 -644
  7. package/dist/{chunk-ZHCVV36H.js → chunk-FZJ3E7JA.js} +579 -371
  8. package/dist/{chunk-34LXTZYA.js → chunk-IDP5KXE6.js} +632 -424
  9. package/dist/{chunk-HJ7XFSJK.js → chunk-KS74VVON.js} +262 -150
  10. package/dist/{chunk-Y6Z6XAFN.js → chunk-PPFFVFUI.js} +266 -154
  11. package/dist/{chunk-5BKOSJEU.js → chunk-WKT3H4P4.js} +731 -409
  12. package/dist/{chunk-F2ZZ5J3F.js → chunk-XXHHUIEV.js} +575 -367
  13. package/dist/{chunk-4S36DRJ4.js → chunk-ZA3FDGAD.js} +465 -255
  14. package/dist/correlationVolcano.js +1 -1
  15. package/dist/index.js +12 -12
  16. package/dist/termdb.boxplot.js +1 -1
  17. package/dist/termdb.categories.js +1 -1
  18. package/dist/termdb.cluster.js +1 -1
  19. package/dist/termdb.descrstats.js +1 -1
  20. package/dist/termdb.numericcategories.js +1 -1
  21. package/dist/termdb.percentile.js +1 -1
  22. package/dist/termdb.termsbyids.js +1 -1
  23. package/dist/termdb.topTermsByType.js +1 -1
  24. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  25. package/dist/termdb.violin.js +1 -1
  26. package/package.json +1 -1
  27. package/src/dataset.ts +10 -2
  28. package/src/routes/termdb.cluster.ts +6 -6
  29. package/src/terms/geneExpression.ts +13 -17
  30. package/src/terms/numeric.ts +7 -18
  31. package/src/terms/singleCellGeneExpression.ts +3 -4
@@ -2,7 +2,7 @@ import {
2
2
  CorrelationVolcanoPayload,
3
3
  validCorrelationVolcanoRequest,
4
4
  validCorrelationVolcanoResponse
5
- } from "./chunk-34LXTZYA.js";
5
+ } from "./chunk-IDP5KXE6.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  CorrelationVolcanoPayload,
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-2QKCLUH3.js";
5
+ } from "./chunk-BWLSDIHM.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-5BKOSJEU.js";
15
+ } from "./chunk-WKT3H4P4.js";
16
16
  import {
17
17
  termdbTopVariablyExpressedGenesPayload,
18
18
  validTermdbTopVariablyExpressedGenesRequest,
19
19
  validTermdbTopVariablyExpressedGenesResponse
20
- } from "./chunk-P3Z422N2.js";
20
+ } from "./chunk-ECF6WSOD.js";
21
21
  import {
22
22
  validViolinRequest,
23
23
  validViolinResponse,
24
24
  violinPayload
25
- } from "./chunk-Y6Z6XAFN.js";
25
+ } from "./chunk-PPFFVFUI.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-NHELOLDH.js";
85
+ } from "./chunk-EWON4FG5.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-KDHGWAOS.js";
100
+ } from "./chunk-2WLN6PMW.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-G5BYLEJC.js";
110
+ } from "./chunk-AADDTYUL.js";
111
111
  import {
112
112
  percentilePayload,
113
113
  validPercentileRequest,
114
114
  validPercentileResponse
115
- } from "./chunk-4S36DRJ4.js";
115
+ } from "./chunk-ZA3FDGAD.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-F2ZZ5J3F.js";
155
+ } from "./chunk-XXHHUIEV.js";
156
156
  import {
157
157
  termdbCategoriesPayload,
158
158
  validCategoriesRequest,
159
159
  validCategoriesResponse
160
- } from "./chunk-ZHCVV36H.js";
160
+ } from "./chunk-FZJ3E7JA.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-HJ7XFSJK.js";
248
+ } from "./chunk-KS74VVON.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-34LXTZYA.js";
270
+ } from "./chunk-IDP5KXE6.js";
271
271
  import {
272
272
  datasetPayload,
273
273
  validDatasetRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-F2ZZ5J3F.js";
5
+ } from "./chunk-XXHHUIEV.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  boxplotPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbCategoriesPayload,
3
3
  validCategoriesRequest,
4
4
  validCategoriesResponse
5
- } from "./chunk-ZHCVV36H.js";
5
+ } from "./chunk-FZJ3E7JA.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbClusterPayload,
3
3
  validTermdbClusterRequest,
4
4
  validTermdbClusterResponse
5
- } from "./chunk-NHELOLDH.js";
5
+ } from "./chunk-EWON4FG5.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbClusterPayload,
@@ -2,7 +2,7 @@ import {
2
2
  descrStatsPayload,
3
3
  validDescrStatsRequest,
4
4
  validDescrStatsResponse
5
- } from "./chunk-KDHGWAOS.js";
5
+ } from "./chunk-2WLN6PMW.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  descrStatsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  numericCategoriesPayload,
3
3
  validNumericCategoriesRequest,
4
4
  validNumericCategoriesResponse
5
- } from "./chunk-G5BYLEJC.js";
5
+ } from "./chunk-AADDTYUL.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  numericCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  percentilePayload,
3
3
  validPercentileRequest,
4
4
  validPercentileResponse
5
- } from "./chunk-4S36DRJ4.js";
5
+ } from "./chunk-ZA3FDGAD.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  percentilePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-2QKCLUH3.js";
5
+ } from "./chunk-BWLSDIHM.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termsByIdsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopTermsByTypePayload,
3
3
  validTermdbTopTermsByTypeRequest,
4
4
  validTermdbTopTermsByTypeResponse
5
- } from "./chunk-5BKOSJEU.js";
5
+ } from "./chunk-WKT3H4P4.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopTermsByTypePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopVariablyExpressedGenesPayload,
3
3
  validTermdbTopVariablyExpressedGenesRequest,
4
4
  validTermdbTopVariablyExpressedGenesResponse
5
- } from "./chunk-P3Z422N2.js";
5
+ } from "./chunk-ECF6WSOD.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopVariablyExpressedGenesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  validViolinRequest,
3
3
  validViolinResponse,
4
4
  violinPayload
5
- } from "./chunk-Y6Z6XAFN.js";
5
+ } from "./chunk-PPFFVFUI.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  validViolinRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.140.1-2",
3
+ "version": "2.140.1",
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
@@ -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,8 @@ 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
739
743
  }
740
744
 
741
745
  export type GeneExpressionQuery = GeneExpressionQueryGdc | GeneExpressionQueryNative
@@ -749,10 +753,14 @@ export type SingleCellGeneExpressionNative = {
749
753
  get?: (q: any) => any
750
754
  /** cached gene exp bins */
751
755
  sample2gene2expressionBins?: { [sample: string]: { [gene: string]: any } }
756
+ /** gene expression unit (e.g. 'FPKM') */
757
+ unit?: string
752
758
  }
753
759
 
754
760
  export type SingleCellGeneExpressionGdc = {
755
761
  src: 'gdcapi'
762
+ /** gene expression unit (e.g. 'FPKM') */
763
+ unit?: string
756
764
  }
757
765
 
758
766
  export type SingleCellSamples = {
@@ -1498,17 +1506,17 @@ keep this setting here for reason of:
1498
1506
  }
1499
1507
  */
1500
1508
  q?: any
1501
- termMatch2geneSet?: any
1502
1509
  mclass?: Mclass
1503
1510
  lollipop?: any
1504
1511
  hasAncestry?: boolean
1512
+ /** set to true for genome-level geneset db */
1513
+ isGeneSetTermdb?: boolean
1505
1514
 
1506
1515
  //GDC
1507
1516
  termid2totalsize2?: GdcApi
1508
1517
  /** Do not use a union here. */
1509
1518
  dictionary?: GdcApi & AiApi
1510
1519
  allowCaseDetails?: AllowCaseDetails
1511
- isGeneSetTermdb?: boolean
1512
1520
  /** Searches the genedb alias list to return the genecode ID */
1513
1521
  getGeneAlias?: (q: any, tw: any) => { gencodeId: any }
1514
1522
  convertSampleId?: GdcApi
@@ -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 { GeneExpressionTerm } from '../terms/geneExpression.ts'
6
- import type { MetaboliteIntensityTerm } from '../terms/metaboliteIntensity.ts'
7
- import type { NumericDictTerm } from '../terms/numeric.ts'
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: GeneExpressionTerm[]
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: MetaboliteIntensityTerm[]
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: NumericDictTerm[]
55
+ terms: NumericTW[]
56
56
  /** perform z-score transformation on values */
57
57
  zScoreTransformation?: string
58
58
  }
@@ -1,28 +1,18 @@
1
- import type { TermWrapper } from './updated-types.ts'
2
- import type { NumericTerm, NumericQ } from './numeric.ts'
1
+ import type { BaseTW, PresetNumericBins, NumericBaseTerm, NumericQ } from '../index.ts'
3
2
  import type { TermSettingInstance } from '../termsetting.ts'
4
3
 
5
4
  /*
6
5
  --------EXPORTED--------
7
- GeneExpressionQ
6
+ GeneExpressionTerm
8
7
  GeneExpressionTermWrapper
9
8
  GeneExpressionTermSettingInstance
10
-
11
9
  */
12
10
 
13
- export type GeneExpressionQ = NumericQ & {
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 & {
11
+ export type GeneExpressionTerm = NumericBaseTerm & {
25
12
  gene: string
13
+ name: string
14
+ type: 'geneExpression'
15
+ bins?: PresetNumericBins
26
16
  // temporarily allowing chr/start/stop to support
27
17
  // legacy fpkm files
28
18
  chr?: string
@@ -30,7 +20,13 @@ export type GeneExpressionTerm = NumericTerm & {
30
20
  stop?: number
31
21
  }
32
22
 
23
+ export type GeneExpressionTW = BaseTW & {
24
+ q: NumericQ
25
+ term: GeneExpressionTerm
26
+ type: string
27
+ }
28
+
33
29
  export type GeneExpressionTermSettingInstance = TermSettingInstance & {
34
- q: GeneExpressionQ
30
+ q: NumericQ
35
31
  term: GeneExpressionTerm
36
32
  }
@@ -1,4 +1,4 @@
1
- import type { MinBaseQ, BaseTW, TermValues, BaseTerm } from '../index.ts'
1
+ import type { MinBaseQ, BaseTW, TermValues, BaseTerm, GeneExpressionTerm } from '../index.ts'
2
2
 
3
3
  export type RawRegularBin = Partial<RegularNumericBinConfig> & { preferredBins?: string }
4
4
 
@@ -30,32 +30,21 @@ export type RawNumTWSpline = BaseTW & {
30
30
 
31
31
  export type RawNumTW = RawNumTWCustomBin | RawNumTWRegularBin | RawNumTWCont | RawNumTWSpline
32
32
 
33
- export type NumericTerm = BaseTerm & {
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
33
+ export type NumericBaseTerm = BaseTerm & {
41
34
  /** 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
35
  continuousColorScale?: { minColor: string; maxColor: string }
43
- /*densityNotAvailable?: boolean //Not used?
44
- logScale?: string | number
45
- max?: number
46
- min?: number
47
- skip0forPercentile?: boolean
48
- valueConversion?: ValueConversion*/
36
+ unit?: string
49
37
  }
50
38
 
51
- export type NumericDictTerm = BaseTerm & {
39
+ export type NumericDictTerm = NumericBaseTerm & {
52
40
  id?: string
53
41
  type: 'integer' | 'float' | 'date'
54
42
  bins: PresetNumericBins
55
43
  values?: TermValues
56
- unit?: string
57
44
  }
58
45
 
46
+ export type NumericTerm = NumericDictTerm | GeneExpressionTerm
47
+
59
48
  export type StartUnboundedBin = {
60
49
  // where possible, assign a concrete value (true) when it is known in advance,
61
50
  // in which case, do not use an abstract type (boolean) to startunbounded
@@ -157,7 +146,7 @@ export type BinaryNumericQ = MinBaseQ & {
157
146
  }
158
147
 
159
148
  export type ContinuousNumericQ = MinBaseQ & {
160
- mode: 'continuous'
149
+ mode?: 'continuous'
161
150
  // TODO: do not use a boolean, convert to a `transform: 'zscore' | ...` option
162
151
  convert2ZScore?: boolean
163
152
  //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: GeneExpressionQ
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: GeneExpressionQ
24
+ q: NumericQ
26
25
  term: SingleCellGeneExpressionTerm
27
26
  }