@sjcrh/proteinpaint-types 2.104.0 → 2.106.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.
@@ -22,7 +22,7 @@ var diffExpPayload = {
22
22
  var validDERequest = (input) => {
23
23
  const errors = [];
24
24
  const __is = (input2) => {
25
- const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && true && "number" === typeof input3.min_count && "number" === typeof input3.min_total_count && ("text" === input3.storage_type || "HDF5" === input3.storage_type) && (void 0 === input3.method || "string" === typeof input3.method) && true;
25
+ const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && true && "number" === typeof input3.min_count && "number" === typeof input3.min_total_count && ("text" === input3.storage_type || "HDF5" === input3.storage_type) && (void 0 === input3.method || "string" === typeof input3.method) && true && (void 0 === input3.VarGenes || "number" === typeof input3.VarGenes);
26
26
  return "object" === typeof input2 && null !== input2 && $io0(input2);
27
27
  };
28
28
  if (false === __is(input)) {
@@ -52,7 +52,11 @@ var validDERequest = (input) => {
52
52
  path: _path2 + ".method",
53
53
  expected: "(string | undefined)",
54
54
  value: input3.method
55
- }), true].every((flag) => flag);
55
+ }), true, void 0 === input3.VarGenes || "number" === typeof input3.VarGenes || $report(_exceptionable2, {
56
+ path: _path2 + ".VarGenes",
57
+ expected: "(number | undefined)",
58
+ value: input3.VarGenes
59
+ })].every((flag) => flag);
56
60
  return ("object" === typeof input2 && null !== input2 || $report(true, {
57
61
  path: _path + "",
58
62
  expected: "DERequest",
@@ -54,7 +54,7 @@ var validGdcMafResponse = (input) => {
54
54
  const errors = [];
55
55
  const __is = (input2) => {
56
56
  const $io0 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem)) && "number" === typeof input3.filesTotal && "number" === typeof input3.maxTotalSizeCompressed;
57
- const $io1 = (input3) => "string" === typeof input3.id && "string" === typeof input3.case_submitter_id && "string" === typeof input3.case_uuid && "number" === typeof input3.file_size && (void 0 === input3.sample_types || Array.isArray(input3.sample_types) && input3.sample_types.every((elem) => "string" === typeof elem)) && "string" === typeof input3.project_id;
57
+ const $io1 = (input3) => "string" === typeof input3.id && "string" === typeof input3.case_submitter_id && "string" === typeof input3.case_uuid && "number" === typeof input3.file_size && (Array.isArray(input3.sample_types) && input3.sample_types.every((elem) => "string" === typeof elem)) && "string" === typeof input3.project_id;
58
58
  return "object" === typeof input2 && null !== input2 && $io0(input2);
59
59
  };
60
60
  if (false === __is(input)) {
@@ -62,19 +62,19 @@ var validGdcMafResponse = (input) => {
62
62
  ((input2, _path, _exceptionable = true) => {
63
63
  const $vo0 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.files) || $report(_exceptionable2, {
64
64
  path: _path2 + ".files",
65
- expected: "Array<File>",
65
+ expected: "Array<GdcMafFile>",
66
66
  value: input3.files
67
67
  })) && input3.files.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
68
68
  path: _path2 + ".files[" + _index1 + "]",
69
- expected: "File",
69
+ expected: "GdcMafFile",
70
70
  value: elem
71
71
  })) && $vo1(elem, _path2 + ".files[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
72
72
  path: _path2 + ".files[" + _index1 + "]",
73
- expected: "File",
73
+ expected: "GdcMafFile",
74
74
  value: elem
75
75
  })).every((flag) => flag) || $report(_exceptionable2, {
76
76
  path: _path2 + ".files",
77
- expected: "Array<File>",
77
+ expected: "Array<GdcMafFile>",
78
78
  value: input3.files
79
79
  }), "number" === typeof input3.filesTotal || $report(_exceptionable2, {
80
80
  path: _path2 + ".filesTotal",
@@ -101,9 +101,9 @@ var validGdcMafResponse = (input) => {
101
101
  path: _path2 + ".file_size",
102
102
  expected: "number",
103
103
  value: input3.file_size
104
- }), void 0 === input3.sample_types || (Array.isArray(input3.sample_types) || $report(_exceptionable2, {
104
+ }), (Array.isArray(input3.sample_types) || $report(_exceptionable2, {
105
105
  path: _path2 + ".sample_types",
106
- expected: "(Array<string> | undefined)",
106
+ expected: "Array<string>",
107
107
  value: input3.sample_types
108
108
  })) && input3.sample_types.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable2, {
109
109
  path: _path2 + ".sample_types[" + _index2 + "]",
@@ -111,7 +111,7 @@ var validGdcMafResponse = (input) => {
111
111
  value: elem
112
112
  })).every((flag) => flag) || $report(_exceptionable2, {
113
113
  path: _path2 + ".sample_types",
114
- expected: "(Array<string> | undefined)",
114
+ expected: "Array<string>",
115
115
  value: input3.sample_types
116
116
  }), "string" === typeof input3.project_id || $report(_exceptionable2, {
117
117
  path: _path2 + ".project_id",
@@ -21,7 +21,7 @@ var genesetEnrichmentPayload = {
21
21
  var validGenesetEnrichmentRequest = (input) => {
22
22
  const errors = [];
23
23
  const __is = (input2) => {
24
- const $io0 = (input3) => Array.isArray(input3.genes) && input3.genes.every((elem) => "string" === typeof elem) && (Array.isArray(input3.fold_change) && input3.fold_change.every((elem) => "number" === typeof elem)) && "boolean" === typeof input3.filter_non_coding_genes && "string" === typeof input3.genome && "string" === typeof input3.geneSetGroup && (void 0 === input3.geneset_name || "string" === typeof input3.geneset_name) && (void 0 === input3.pickle_file || "string" === typeof input3.pickle_file);
24
+ const $io0 = (input3) => Array.isArray(input3.genes) && input3.genes.every((elem) => "string" === typeof elem) && (Array.isArray(input3.fold_change) && input3.fold_change.every((elem) => "number" === typeof elem)) && "boolean" === typeof input3.filter_non_coding_genes && "string" === typeof input3.genome && "string" === typeof input3.geneSetGroup && (void 0 === input3.geneset_name || "string" === typeof input3.geneset_name) && (void 0 === input3.pickle_file || "string" === typeof input3.pickle_file) && (void 0 === input3.num_permutations || "number" === typeof input3.num_permutations);
25
25
  return "object" === typeof input2 && null !== input2 && $io0(input2);
26
26
  };
27
27
  if (false === __is(input)) {
@@ -71,6 +71,10 @@ var validGenesetEnrichmentRequest = (input) => {
71
71
  path: _path2 + ".pickle_file",
72
72
  expected: "(string | undefined)",
73
73
  value: input3.pickle_file
74
+ }), void 0 === input3.num_permutations || "number" === typeof input3.num_permutations || $report(_exceptionable2, {
75
+ path: _path2 + ".num_permutations",
76
+ expected: "(number | undefined)",
77
+ value: input3.num_permutations
74
78
  })].every((flag) => flag);
75
79
  return ("object" === typeof input2 && null !== input2 || $report(true, {
76
80
  path: _path + "",
package/dist/gdc.maf.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  gdcMafPayload,
3
3
  validGdcMafRequest,
4
4
  validGdcMafResponse
5
- } from "./chunk-CETMA2FU.js";
5
+ } from "./chunk-OTFT3JZB.js";
6
6
  import "./chunk-Z6B6IQIY.js";
7
7
  export {
8
8
  gdcMafPayload,
@@ -2,7 +2,7 @@ import {
2
2
  genesetEnrichmentPayload,
3
3
  validGenesetEnrichmentRequest,
4
4
  validGenesetEnrichmentResponse
5
- } from "./chunk-IL33L6MY.js";
5
+ } from "./chunk-XILU2DZ4.js";
6
6
  import "./chunk-Z6B6IQIY.js";
7
7
  export {
8
8
  genesetEnrichmentPayload,
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ import {
82
82
  diffExpPayload,
83
83
  validDERequest,
84
84
  validDEResponse
85
- } from "./chunk-Z2WFGV6V.js";
85
+ } from "./chunk-IYDRVZXE.js";
86
86
  import {
87
87
  boxplotPayload,
88
88
  validBoxPlotRequest,
@@ -152,7 +152,7 @@ import {
152
152
  gdcMafPayload,
153
153
  validGdcMafRequest,
154
154
  validGdcMafResponse
155
- } from "./chunk-CETMA2FU.js";
155
+ } from "./chunk-OTFT3JZB.js";
156
156
  import {
157
157
  GdcMafPayload,
158
158
  validGdcMafBuildRequest,
@@ -172,7 +172,7 @@ import {
172
172
  genesetEnrichmentPayload,
173
173
  validGenesetEnrichmentRequest,
174
174
  validGenesetEnrichmentResponse
175
- } from "./chunk-IL33L6MY.js";
175
+ } from "./chunk-XILU2DZ4.js";
176
176
  import {
177
177
  genesetOverrepresentationPayload,
178
178
  validGenesetOverrepresentationRequest,
package/dist/termdb.DE.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  diffExpPayload,
3
3
  validDERequest,
4
4
  validDEResponse
5
- } from "./chunk-Z2WFGV6V.js";
5
+ } from "./chunk-IYDRVZXE.js";
6
6
  import "./chunk-Z6B6IQIY.js";
7
7
  export {
8
8
  diffExpPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.104.0",
3
+ "version": "2.106.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
@@ -594,11 +594,10 @@ export type SingleCellSamples = {
594
594
  /** if missing refer to the samples as 'sample', this provides override e.g. 'case' */
595
595
  /** logic to decide sample table columns (the one shown on singlecell app ui, displaying a table of samples with sc data)
596
596
  a sample table will always have a sample column, to show sample.sample value
597
- firstColumnName allow to change name of 1st column from "Sample" to different, e.g. "Case" for gdc
598
- the other two properties allow to declare additional columns to be shown in table, that are for display only
597
+ - use uiLabels.Sample to customize the name of the first column
598
+ - the other two properties allow to declare additional columns to be shown in table, that are for display only
599
599
  when sample.experiments[] are used, a last column of experiment id will be auto added
600
600
  */
601
- firstColumnName?: string
602
601
  /** any columns to be added to sample table. each is a term id */
603
602
  sampleColumns?: { termid: string }[]
604
603
  /** used on client but not on ds */
@@ -608,7 +607,7 @@ export type SingleCellSamples = {
608
607
  or is missing, to be added at launch with built-in logic (samples are found by looking through singleCell.data.plots[].folder)
609
608
  */
610
609
  get?: (q: any) => any
611
- /** extra label to show along with sample, it becomes `sample.sample+' '+sample[newProp]` */
610
+ /** extra label to show along with sample, must be a term id as in sampleColumns[] and allow to retrieve value from sample object */
612
611
  extraSampleTabLabel?: string
613
612
  }
614
613
 
@@ -937,7 +936,7 @@ type CorrelationVolcano = {
937
936
  }
938
937
  }
939
938
 
940
- type MatrixSettingsControlLabels = {
939
+ type UiLabels = {
941
940
  samples?: string
942
941
  sample?: string
943
942
  Samples?: string
@@ -1006,7 +1005,7 @@ type MatrixSettings = {
1006
1005
  svgCanvasSwitch?: number
1007
1006
  cellEncoding?: string
1008
1007
  cellbg?: string
1009
- controlLabels?: MatrixSettingsControlLabels
1008
+ controlLabels?: UiLabels
1010
1009
  sortSamplesBy?: string
1011
1010
  sortPriority?: SortPriorityEntry[]
1012
1011
  ignoreCnvValues?: boolean
@@ -1184,7 +1183,6 @@ keep this setting here for reason of:
1184
1183
  - mds3.variant2samples consider this setting, allows to handle other datasets of same issue
1185
1184
  */
1186
1185
  useLower?: boolean
1187
-
1188
1186
  matrix?: Matrix
1189
1187
  numericDictTermCluster?: NumericDictTermCluster
1190
1188
  survival?: Survival
@@ -3,7 +3,7 @@ import type { RoutePayload } from './routeApi.js'
3
3
 
4
4
  // an object representing gdc maf file, to be shown on client table
5
5
 
6
- export type File = {
6
+ export type GdcMafFile = {
7
7
  /** A string representing the file's UUID (Universally Unique Identifier) , can be accessed via https://api.gdc.cancer.gov/data/<uuid>*/
8
8
  id: string
9
9
  /** A string representing a submitter ID for the case associated with this file */
@@ -12,8 +12,8 @@ export type File = {
12
12
  case_uuid: string
13
13
  /** An integer as the byte size of this file, compressed */
14
14
  file_size: number
15
- /** Array of strings, each is a sample type, for all samples involved in generating the maf file */
16
- sample_types?: string[]
15
+ /** Array of strings, each is 'tumor descriptor+tissue type', for all samples involved in generating the maf file */
16
+ sample_types: string[]
17
17
  /** A string representing the type of workflow used to generate or process this file */
18
18
  //workflow_type: string
19
19
  /** A string as the project id of the case */
@@ -34,7 +34,7 @@ export type GdcMafRequest = {
34
34
 
35
35
  export type GdcMafResponse = {
36
36
  /** List of file objects passing filter and to be displayed on client */
37
- files: File[]
37
+ files: GdcMafFile[]
38
38
  /** Total number of files found by API (in case bigger than files.length) */
39
39
  filesTotal: number
40
40
  /** Maximum total size of maf files allowed, for indicating on ui while selecting files */
@@ -15,6 +15,8 @@ export type GenesetEnrichmentRequest = {
15
15
  geneset_name?: string
16
16
  /** Pickle file to be queried for generating gsea image of a particular geneset */
17
17
  pickle_file?: string
18
+ /** Number of permutations to be carried out for GSEA analysis, this variable will become compulsory once GSEA becomes stateless */
19
+ num_permutations?: number
18
20
  }
19
21
 
20
22
  type pathway_attributes = {
@@ -17,6 +17,8 @@ export type DERequest = {
17
17
  method?: string
18
18
  /** Term for confounding variable (if present) */
19
19
  tw?: any
20
+ /** Number of variable genes (defined only for parametric DE methods) */
21
+ VarGenes?: number
20
22
  }
21
23
 
22
24
  export type ExpressionInput = {
@@ -38,6 +40,8 @@ export type ExpressionInput = {
38
40
  conf1?: any[]
39
41
  /** Type of the confounding variable (categorical/float) */
40
42
  conf1_type?: 'categorical' | 'float'
43
+ /** Number of variable genes to be included for DE analysis (optional) */
44
+ VarGenes?: number
41
45
  }
42
46
 
43
47
  export type DEResponse = {