@sjcrh/proteinpaint-types 2.117.0 → 2.118.1-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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/dataset.ts +41 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.117.0",
3
+ "version": "2.118.1-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
@@ -522,33 +522,57 @@ type TrackLst = {
522
522
  activeTracks: string[]
523
523
  }
524
524
 
525
+ /** cnv segments are queried by coordinates, and can be filtered by segment length and/or value
526
+ configs for types of cnv data
527
+ - log(ratio)
528
+ {
529
+ cnvMaxLength:10000000
530
+ cnvGainCutoff:5
531
+ cnvLossCutoff:-5
532
+ }
533
+ - copy number
534
+ {
535
+ cnvMaxLength:1000000
536
+ cnvMaxCopynumber:10
537
+ cnvMinCopynumber:1
538
+ }
539
+ important: presence of filtering properties indiate the type of cnv quantification
540
+ and will trigger rendering of ui controls
541
+ */
525
542
  type CnvSegment = {
526
- byrange: CnvSegmentByRange
543
+ /** ds supplied ordynamically added getter */
544
+ get?: (q: any) => any
545
+ /** either file or get is required. file is bgzipped with columns:
546
+ 1. chr
547
+ 2. start, 0-based
548
+ 3. stop
549
+ 4. {"dt": 4, "mattr": {"origin": "somatic"}, "sample": "3332", "value": -1.0}
550
+ */
551
+ file?: string
552
+
527
553
  /****** rendering parameters ****
528
- not used as query parameter to filter segments
529
- value range for color scaling. default to 5. cnv segment value>this will use solid color
530
- */
554
+ not used as query parameter to filter segments
555
+ value range for color scaling. default to 5. cnv segment value>this will use solid color
556
+ */
531
557
  absoluteValueRenderMax?: number
532
558
  gainColor?: string
533
559
  lossColor?: string
534
560
 
535
- /*** filtering parameters ***
536
- default max length setting to restrict to focal events; if missing show all */
561
+ /** filter segments by max length to restrict to focal events; set to -1 to show all
562
+ allow to be missing, in such case will always show all */
537
563
  cnvMaxLength?: number
538
564
 
539
- /** TODO define value type, if logratio, or copy number */
540
-
541
- /** following two cutoffs only apply to log ratio, cnv gain value is positive, cnv loss value is negative
542
- if cnv is gain, skip if value<this cutoff */
565
+ /** if cnv is quantified as log(ratio) or similar, must set these two properties
566
+ filter segments by following two cutoffs only apply to log ratio, cnv gain value is positive, cnv loss value is negative
567
+ */
568
+ /** if value>0, skip if value<this cutoff, set to a large value e.g. 100 for not filtering */
543
569
  cnvGainCutoff?: number
544
- /** if cnv is loss, skip if value>this cutoff */
570
+ /** if value<0, skip if value>this cutoff, set to a large negative value e.g. -100 for not filtering */
545
571
  cnvLossCutoff?: number
546
- }
547
-
548
- type CnvSegmentByRange = {
549
- src: 'native' | 'gdcapi' | string
550
- /** only for src=native */
551
- file?: string
572
+ /** TODO if cnv is quantified as integer copy number, must set these properties; do not use for log(ratio)
573
+ */
574
+ cnvMinCopynumber?: number
575
+ cnvMaxCopynumber?: number
552
576
  }
553
577
 
554
578
  /*