@sjcrh/proteinpaint-types 2.117.0 → 2.118.2

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 +45 -23
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.2",
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
  /*
@@ -563,11 +587,11 @@ type Probe2Cnv = {
563
587
  */
564
588
 
565
589
  type RnaseqGeneCount = {
566
- /** Name of the HDF5 or text file */
590
+ /** Name of the HDF5 file */
567
591
  file: string
568
592
  samplesFile?: string
569
- /** Storage_type for storing data (HDF5 or text). Will deprecate text files in the future */
570
- storage_type: 'text' | 'HDF5'
593
+ /** Storage_type for storing data (HDF5) */
594
+ storage_type: 'HDF5'
571
595
  }
572
596
 
573
597
  /** the metabolite query */
@@ -599,8 +623,6 @@ export type GeneExpressionQueryNative = {
599
623
  samples?: number[]
600
624
  /** dynamically added flag during launch */
601
625
  nochr?: boolean
602
- /** if true, the file is in HDF5 format */
603
- hdf5File?: boolean
604
626
  /** dynamically added getter */
605
627
  get?: (param: any) => void
606
628
  /** This dictionary is used to store/cache the default bins calculated for a geneExpression term when initialized in the fillTermWrapper */
@@ -611,7 +633,7 @@ export type GeneExpressionQuery = GeneExpressionQueryGdc | GeneExpressionQueryNa
611
633
 
612
634
  export type SingleCellGeneExpressionNative = {
613
635
  src: 'native'
614
- /** path to HDF5 files. for now only hdf5 is supported.
636
+ /** path to HDF5 files. for now only HDF5 is supported.
615
637
  each is a gene-by-cell matrix for a sample, with ".h5" suffix. missing files are detected and handled */
616
638
  folder: string
617
639
  /** dynamically added getter */