@sjcrh/proteinpaint-types 2.102.0 → 2.105.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",
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,
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,
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.102.0",
3
+ "version": "2.105.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
@@ -338,8 +338,19 @@ so that it can work for a termdb-less ds, e.g. clinvar, where termdbConfig canno
338
338
  }
339
339
 
340
340
  type SvFusion = {
341
- byrange: {
342
- /** file paths for sv fusion data */
341
+ byrange?: {
342
+ /** gz BED file path for sv fusion data: chr \t start \t stop \t {}
343
+ will only contain events with coordinates in both breakpoints
344
+ TODO use string sample name
345
+ */
346
+ file?: string
347
+ }
348
+ byname?: {
349
+ /** file paths for sv fusion TXT data. will contain events lacking breakpoint coordinates and can only be matched by gene names
350
+ should be tab seperated values with the following fields: (should leave as blank for values unknown)
351
+ gene_a refseq_a chr_a position_a strand_a gene_b refseq_b chr_b position_b strand_b origin sample_name fusion_gene event_type(fusion or sv)
352
+ TODO use string sample name
353
+ */
343
354
  file?: string
344
355
  }
345
356
  }
@@ -583,11 +594,10 @@ export type SingleCellSamples = {
583
594
  /** if missing refer to the samples as 'sample', this provides override e.g. 'case' */
584
595
  /** logic to decide sample table columns (the one shown on singlecell app ui, displaying a table of samples with sc data)
585
596
  a sample table will always have a sample column, to show sample.sample value
586
- firstColumnName allow to change name of 1st column from "Sample" to different, e.g. "Case" for gdc
587
- 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
588
599
  when sample.experiments[] are used, a last column of experiment id will be auto added
589
600
  */
590
- firstColumnName?: string
591
601
  /** any columns to be added to sample table. each is a term id */
592
602
  sampleColumns?: { termid: string }[]
593
603
  /** used on client but not on ds */
@@ -597,6 +607,8 @@ export type SingleCellSamples = {
597
607
  or is missing, to be added at launch with built-in logic (samples are found by looking through singleCell.data.plots[].folder)
598
608
  */
599
609
  get?: (q: any) => any
610
+ /** extra label to show along with sample, must be a term id as in sampleColumns[] and allow to retrieve value from sample object */
611
+ extraSampleTabLabel?: string
600
612
  }
601
613
 
602
614
  export type SingleCellDataGdc = {
@@ -924,7 +936,7 @@ type CorrelationVolcano = {
924
936
  }
925
937
  }
926
938
 
927
- type MatrixSettingsControlLabels = {
939
+ type UiLabels = {
928
940
  samples?: string
929
941
  sample?: string
930
942
  Samples?: string
@@ -993,7 +1005,7 @@ type MatrixSettings = {
993
1005
  svgCanvasSwitch?: number
994
1006
  cellEncoding?: string
995
1007
  cellbg?: string
996
- controlLabels?: MatrixSettingsControlLabels
1008
+ controlLabels?: UiLabels
997
1009
  sortSamplesBy?: string
998
1010
  sortPriority?: SortPriorityEntry[]
999
1011
  ignoreCnvValues?: boolean
@@ -1171,7 +1183,6 @@ keep this setting here for reason of:
1171
1183
  - mds3.variant2samples consider this setting, allows to handle other datasets of same issue
1172
1184
  */
1173
1185
  useLower?: boolean
1174
-
1175
1186
  matrix?: Matrix
1176
1187
  numericDictTermCluster?: NumericDictTermCluster
1177
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 */
@@ -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 = {