@sjcrh/proteinpaint-types 2.129.6-2b2fdc7ee.0 → 2.130.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.
@@ -70,13 +70,15 @@ var validGdcGRIN2listRequest = (input) => {
70
70
  var validGdcGRIN2listResponse = (input) => {
71
71
  const errors = [];
72
72
  const __is = (input2) => {
73
- 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 && (void 0 === input3.fileCounts || "object" === typeof input3.fileCounts && null !== input3.fileCounts && $io2(input3.fileCounts)) && (void 0 === input3.appliedFilters || "object" === typeof input3.appliedFilters && null !== input3.appliedFilters && false === Array.isArray(input3.appliedFilters) && $io3(input3.appliedFilters)) && (void 0 === input3.deduplicationStats || "object" === typeof input3.deduplicationStats && null !== input3.deduplicationStats && $io4(input3.deduplicationStats));
73
+ 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 && (void 0 === input3.fileCounts || "object" === typeof input3.fileCounts && null !== input3.fileCounts && $io2(input3.fileCounts)) && (void 0 === input3.appliedFilters || "object" === typeof input3.appliedFilters && null !== input3.appliedFilters && false === Array.isArray(input3.appliedFilters) && $io3(input3.appliedFilters)) && (void 0 === input3.deduplicationStats || "object" === typeof input3.deduplicationStats && null !== input3.deduplicationStats && $io4(input3.deduplicationStats)) && (void 0 === input3.mafFiles || "object" === typeof input3.mafFiles && null !== input3.mafFiles && $io7(input3.mafFiles)) && (void 0 === input3.cnvFiles || "object" === typeof input3.cnvFiles && null !== input3.cnvFiles && $io8(input3.cnvFiles));
74
74
  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 && (void 0 === input3.file_format || "MAF" === input3.file_format);
75
75
  const $io2 = (input3) => "number" === typeof input3.maf;
76
76
  const $io3 = (input3) => void 0 === input3.experimentalStrategy || "WXS" === input3.experimentalStrategy;
77
77
  const $io4 = (input3) => "number" === typeof input3.originalFileCount && "number" === typeof input3.deduplicatedFileCount && "number" === typeof input3.duplicatesRemoved && (void 0 === input3.caseDetails || Array.isArray(input3.caseDetails) && input3.caseDetails.every((elem) => "object" === typeof elem && null !== elem && $io5(elem))) && (Array.isArray(input3.filteredFiles) && input3.filteredFiles.every((elem) => "object" === typeof elem && null !== elem && $io6(elem)));
78
78
  const $io5 = (input3) => "string" === typeof input3.caseName && "number" === typeof input3.fileCount && "number" === typeof input3.keptFileSize;
79
79
  const $io6 = (input3) => "string" === typeof input3.fileId && "number" === typeof input3.fileSize && "string" === typeof input3.reason;
80
+ const $io7 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
81
+ const $io8 = (input3) => Array.isArray(input3.files) && input3.files.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
80
82
  return "object" === typeof input2 && null !== input2 && $io0(input2);
81
83
  };
82
84
  if (false === __is(input)) {
@@ -130,6 +132,22 @@ var validGdcGRIN2listResponse = (input) => {
130
132
  path: _path2 + ".deduplicationStats",
131
133
  expected: "(__type.o2 | undefined)",
132
134
  value: input3.deduplicationStats
135
+ }), void 0 === input3.mafFiles || ("object" === typeof input3.mafFiles && null !== input3.mafFiles || $report(_exceptionable2, {
136
+ path: _path2 + ".mafFiles",
137
+ expected: "(__type.o5 | undefined)",
138
+ value: input3.mafFiles
139
+ })) && $vo7(input3.mafFiles, _path2 + ".mafFiles", _exceptionable2) || $report(_exceptionable2, {
140
+ path: _path2 + ".mafFiles",
141
+ expected: "(__type.o5 | undefined)",
142
+ value: input3.mafFiles
143
+ }), void 0 === input3.cnvFiles || ("object" === typeof input3.cnvFiles && null !== input3.cnvFiles || $report(_exceptionable2, {
144
+ path: _path2 + ".cnvFiles",
145
+ expected: "(__type.o6 | undefined)",
146
+ value: input3.cnvFiles
147
+ })) && $vo8(input3.cnvFiles, _path2 + ".cnvFiles", _exceptionable2) || $report(_exceptionable2, {
148
+ path: _path2 + ".cnvFiles",
149
+ expected: "(__type.o6 | undefined)",
150
+ value: input3.cnvFiles
133
151
  })].every((flag) => flag);
134
152
  const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.id || $report(_exceptionable2, {
135
153
  path: _path2 + ".id",
@@ -249,6 +267,40 @@ var validGdcGRIN2listResponse = (input) => {
249
267
  expected: "string",
250
268
  value: input3.reason
251
269
  })].every((flag) => flag);
270
+ const $vo7 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.files) || $report(_exceptionable2, {
271
+ path: _path2 + ".files",
272
+ expected: "Array<GdcGRIN2File>",
273
+ value: input3.files
274
+ })) && input3.files.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
275
+ path: _path2 + ".files[" + _index5 + "]",
276
+ expected: "GdcGRIN2File",
277
+ value: elem
278
+ })) && $vo1(elem, _path2 + ".files[" + _index5 + "]", _exceptionable2) || $report(_exceptionable2, {
279
+ path: _path2 + ".files[" + _index5 + "]",
280
+ expected: "GdcGRIN2File",
281
+ value: elem
282
+ })).every((flag) => flag) || $report(_exceptionable2, {
283
+ path: _path2 + ".files",
284
+ expected: "Array<GdcGRIN2File>",
285
+ value: input3.files
286
+ })].every((flag) => flag);
287
+ const $vo8 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.files) || $report(_exceptionable2, {
288
+ path: _path2 + ".files",
289
+ expected: "Array<GdcGRIN2File>",
290
+ value: input3.files
291
+ })) && input3.files.map((elem, _index6) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
292
+ path: _path2 + ".files[" + _index6 + "]",
293
+ expected: "GdcGRIN2File",
294
+ value: elem
295
+ })) && $vo1(elem, _path2 + ".files[" + _index6 + "]", _exceptionable2) || $report(_exceptionable2, {
296
+ path: _path2 + ".files[" + _index6 + "]",
297
+ expected: "GdcGRIN2File",
298
+ value: elem
299
+ })).every((flag) => flag) || $report(_exceptionable2, {
300
+ path: _path2 + ".files",
301
+ expected: "Array<GdcGRIN2File>",
302
+ value: input3.files
303
+ })].every((flag) => flag);
252
304
  return ("object" === typeof input2 && null !== input2 || $report(true, {
253
305
  path: _path + "",
254
306
  expected: "GdcGRIN2listResponse",
package/dist/gdc.grin2.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  validGdcGRIN2listResponse,
6
6
  validRunGRIN2Request,
7
7
  validRunGRIN2Response
8
- } from "./chunk-UWNYHMCA.js";
8
+ } from "./chunk-5VCMJ7QL.js";
9
9
  import "./chunk-CNSSF43V.js";
10
10
  export {
11
11
  gdcGRIN2listPayload,
package/dist/index.js CHANGED
@@ -175,7 +175,7 @@ import {
175
175
  validGdcGRIN2listResponse,
176
176
  validRunGRIN2Request,
177
177
  validRunGRIN2Response
178
- } from "./chunk-UWNYHMCA.js";
178
+ } from "./chunk-5VCMJ7QL.js";
179
179
  import {
180
180
  gdcMafPayload,
181
181
  validGdcMafRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.129.6-2b2fdc7ee.0",
3
+ "version": "2.130.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
@@ -78,12 +78,6 @@ type GenomicPositionEntry = {
78
78
  }
79
79
  */
80
80
 
81
- type Chr2bcffile = {
82
- /** index is the chr (e.g. 'chr1', 'chr2', etc.)
83
- * value is the bcf file path */
84
- [index: string]: string
85
- }
86
-
87
81
  type bcfMafFile = {
88
82
  /** bcf file for only variants, no samples and FORMAT */
89
83
  bcffile: string
@@ -113,8 +107,14 @@ type SnvindelByRange = {
113
107
  //local ds can have following different setup
114
108
  /** one single bcf file */
115
109
  bcffile?: string
116
- /** one bcf file per chr */
117
- chr2bcffile?: Chr2bcffile
110
+ /** one bcf file per chr
111
+ after loading, this is transformed into byrange._tk.chr2files{}, and deleted!
112
+ */
113
+ chr2bcffile?: {
114
+ /** index is the chr (e.g. 'chr1', 'chr2', etc.)
115
+ * value is the bcf file path */
116
+ [index: string]: string
117
+ }
118
118
  /** bcf+maf combined */
119
119
  bcfMafFile?: bcfMafFile
120
120
  /** allow to apply special configurations to certain INFO fields of the bcf file */
@@ -549,8 +549,16 @@ configs for types of cnv data
549
549
  important: presence of filtering properties indiate the type of cnv quantification
550
550
  and will trigger rendering of ui controls
551
551
  */
552
- type CnvSegment = {
553
- /** ds supplied ordynamically added getter */
552
+ type CnvSegmentQuery = {
553
+ /** ds supplied or dynamically added getter
554
+ todo properly type input/output
555
+ returns:
556
+ {
557
+ cnvs:[]
558
+ { chr, start, stop, value?, class, samples[], occurrence=1, ssm_id }
559
+ cnvMsg:string
560
+ }
561
+ */
554
562
  get?: (q: any) => any
555
563
  /** either file or get is required. file is bgzipped with columns:
556
564
  1. chr
@@ -633,7 +641,7 @@ type CnvSegment = {
633
641
  no longer used!!
634
642
  file content is a probe-by-sample matrix, values are signals
635
643
  for a given region, the median signal from probes in the region is used to make a gain/loss call for each sample
636
- this is alternative to CnvSegment
644
+ this is alternative to CnvSegmentQuery
637
645
 
638
646
  type Probe2Cnv = {
639
647
  file: string
@@ -901,7 +909,7 @@ type Mds3Queries = {
901
909
  gbRestrictMode?: 'protein' | 'genomic'
902
910
  snvindel?: SnvIndelQuery
903
911
  svfusion?: SvFusion
904
- cnv?: CnvSegment
912
+ cnv?: CnvSegmentQuery
905
913
  trackLst?: TrackLst
906
914
  ld?: LdQuery
907
915
  defaultCoord?: string
@@ -70,6 +70,18 @@ export type GdcGRIN2listResponse = {
70
70
  caseDetails?: Array<{ caseName: string; fileCount: number; keptFileSize: number }>
71
71
  filteredFiles: Array<{ fileId: string; fileSize: number; reason: string }>
72
72
  }
73
+ /** all maf-related results when mafOptions is supplied */
74
+ mafFiles?: {
75
+ // TODO suggest to move above maf-related results under mafFiles{}
76
+ /** list of maf files returned to client */
77
+ files: GdcGRIN2File[]
78
+ }
79
+ /** all cnv-related results when cnvOptions is supplied */
80
+ cnvFiles?: {
81
+ /** list of cnv files returned to client */
82
+ files: GdcGRIN2File[]
83
+ /** to add additional stats on cnv file listing */
84
+ }
73
85
  }
74
86
 
75
87
  /**