@sjcrh/proteinpaint-types 2.183.1 → 2.184.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.183.1",
3
+ "version": "2.184.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
@@ -120,7 +120,7 @@ type SnvindelByRange = {
120
120
  /** allow to apply special configurations to certain INFO fields of the bcf file */
121
121
  infoFields?: InfoFieldEntry[]
122
122
  /** getter function to retrieve data. dynamically added or ds-supplied */
123
- get?: (f: any) => void
123
+ get?: (f: any, f2?: any) => void
124
124
  }
125
125
 
126
126
  type URLEntry = {
@@ -714,7 +714,6 @@ type ProteomeFilter = {
714
714
  }
715
715
 
716
716
  type ProteomeCohortConfig = {
717
- cohortName: string
718
717
  controlFilter: ProteomeFilter[]
719
718
  caseFilter: ProteomeFilter[]
720
719
  }
@@ -722,7 +721,9 @@ type ProteomeCohortConfig = {
722
721
  type ProteomeAssayConfig = {
723
722
  columnIdx: number
724
723
  columnValue: string | number
725
- cohorts: ProteomeCohortConfig[]
724
+ cohorts: {
725
+ [cohortName: string]: ProteomeCohortConfig
726
+ }
726
727
  /** optional PTM type for PTM assay type */
727
728
  PTMType?: string
728
729
  /** optional specific mclass override for PTM assay type */
@@ -732,6 +733,7 @@ type ProteomeAssayConfig = {
732
733
  export type ProteomeAbundanceQuery = {
733
734
  /** database file path */
734
735
  dbfile?: string
736
+ overlayTerm?: BaseTerm
735
737
  /** document structure */
736
738
  assays: {
737
739
  [assayName: string]: ProteomeAssayConfig
@@ -123,13 +123,13 @@ export type TermCollectionTWQual = BaseTW & {
123
123
  // TODO: may add different termCollection TW types here
124
124
  export type TermCollectionTW = TermCollectionTWCont | TermCollectionTWQual
125
125
 
126
- export type RawTermCollectionTWCont = {
126
+ export type RawTermCollectionTWCont = BaseTW & {
127
127
  type?: 'TermCollectionTWCont'
128
128
  term: RawNumericTermCollection
129
129
  q?: TermCollectionQCont
130
130
  }
131
131
 
132
- export type RawTermCollectionTWQual = {
132
+ export type RawTermCollectionTWQual = BaseTW & {
133
133
  type?: 'TermCollectionTWQual'
134
134
  term: RawCategoricalTermCollection
135
135
  q?: TermCollectionQQual
package/src/terms/tw.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { SnpsQ, SnpsTW } from './snps.ts'
2
- import type { ConditionQ, ConditionTW } from './condition.ts'
2
+ import type { ConditionQ, ConditionTW, RawConditionTW } from './condition.ts'
3
3
  import type { SampleLstQ } from './samplelst.ts'
4
- import type { NumTW, NumericQ } from './numeric.ts'
5
- import type { GvTW, GvQ } from './geneVariant.ts'
6
- import type { QualTW, QualQ } from './qualitative.ts'
7
- import type { TermCollectionTW, TermCollectionQ } from './termCollection.ts'
4
+ import type { NumTW, NumericQ, RawNumTW } from './numeric.ts'
5
+ import type { GvTW, GvQ, RawGvTW } from './geneVariant.ts'
6
+ import type { QualTW, QualQ, RawQualTW } from './qualitative.ts'
7
+ import type { TermCollectionTW, TermCollectionQ, RawTermCollectionTW } from './termCollection.ts'
8
8
 
9
9
  export type BaseTW = {
10
10
  id?: string
@@ -31,27 +31,33 @@ export type TwLst = TermWrapper[]
31
31
 
32
32
  //export type Q = BaseQ | CategoricalQ | ConditionQ | NumericQ | SampleLstQ | SnpsQ
33
33
 
34
- export type RawTW =
35
- //{ id: string } | RawCatTW
36
- //
37
- // BELOW TYPE IS NOT TESTED, only being used to compare tsc type checking behavior
38
- // between non-union versus type-unions, which way is easier to code against
39
- {
40
- id?: string
41
- term?: {
42
- type: 'categorical' | 'condition'
43
- [key: string | number]: any
44
- }
45
- q?: {
46
- //predefined_groupset_idx?: number
47
- //customset?: any
48
- [key: string]: any
49
- //type?: string //'custom-groupset' |
50
- //customset?: any
51
- }
52
- isAtomic?: true
53
- $id?: string
54
- }
34
+ export type RawDictTW = BaseTW & {
35
+ id: string
36
+ term?: undefined
37
+ q?: any
38
+ }
39
+
40
+ export type RawTW = RawDictTW | RawQualTW | RawNumTW | RawGvTW | RawConditionTW | RawTermCollectionTW
41
+ //{ id: string } | RawCatTW
42
+ //
43
+ // BELOW TYPE IS NOT TESTED, only being used to compare tsc type checking behavior
44
+ // between non-union versus type-unions, which way is easier to code against
45
+ // {
46
+ // id?: string
47
+ // term?: {
48
+ // type: 'categorical' | 'condition'
49
+ // [key: string | number]: any
50
+ // }
51
+ // q?: {
52
+ // //predefined_groupset_idx?: number
53
+ // //customset?: any
54
+ // [key: string]: any
55
+ // //type?: string //'custom-groupset' |
56
+ // //customset?: any
57
+ // }
58
+ // isAtomic?: true
59
+ // $id?: string
60
+ // }
55
61
 
56
62
  export interface TwHandler {
57
63
  render?: (opts?: any) => void