@sjcrh/proteinpaint-types 2.146.4-1 → 2.147.2-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.
Files changed (43) hide show
  1. package/dist/aiProjectSelectedWSImages.js +1 -1
  2. package/dist/aiProjectTrainModel.js +11 -0
  3. package/dist/brainImaging.js +1 -1
  4. package/dist/{chunk-75OHIZMS.js → chunk-225Q2ZUA.js} +2 -6
  5. package/dist/{chunk-NBV7HYBA.js → chunk-3SKFYOKV.js} +407 -515
  6. package/dist/{chunk-G5KSPYQG.js → chunk-4SJC57Y6.js} +403 -511
  7. package/dist/{chunk-C246BWQE.js → chunk-5MGSKBUU.js} +268 -92
  8. package/dist/{chunk-4VEXL32Q.js → chunk-75GS5ZG5.js} +381 -489
  9. package/dist/{chunk-2BHWLFKE.js → chunk-ETMCI34A.js} +2 -6
  10. package/dist/{chunk-74B7B2CV.js → chunk-KQNLROUN.js} +258 -82
  11. package/dist/{chunk-7ICZFAGK.js → chunk-KSVIBMFQ.js} +1049 -797
  12. package/dist/{chunk-5KADNZH2.js → chunk-RA7IEGS4.js} +408 -516
  13. package/dist/{chunk-4DNCZQOB.js → chunk-TTUU5XQC.js} +258 -82
  14. package/dist/chunk-UYJA4UM7.js +97 -0
  15. package/dist/{chunk-GCAZSDCW.js → chunk-WL7ZVGZS.js} +403 -511
  16. package/dist/correlationVolcano.js +1 -1
  17. package/dist/index.js +48 -40
  18. package/dist/samplewsimages.js +1 -1
  19. package/dist/termdb.boxplot.js +1 -1
  20. package/dist/termdb.categories.js +1 -1
  21. package/dist/termdb.cluster.js +1 -1
  22. package/dist/termdb.descrstats.js +1 -1
  23. package/dist/termdb.percentile.js +1 -1
  24. package/dist/termdb.termsbyids.js +1 -1
  25. package/dist/termdb.topTermsByType.js +1 -1
  26. package/package.json +1 -1
  27. package/src/dataset.ts +15 -12
  28. package/src/index.ts +2 -0
  29. package/src/routes/aiProjectSelectedWSImages.ts +0 -1
  30. package/src/routes/aiProjectTrainModel.ts +20 -0
  31. package/src/routes/brainImaging.ts +3 -3
  32. package/src/terms/categorical.ts +9 -90
  33. package/src/terms/date.ts +1 -1
  34. package/src/terms/geneExpression.ts +3 -1
  35. package/src/terms/metaboliteIntensity.ts +4 -2
  36. package/src/terms/numeric.ts +5 -1
  37. package/src/terms/q.ts +5 -1
  38. package/src/terms/qualitative.ts +73 -0
  39. package/src/terms/singleCellCellType.ts +6 -10
  40. package/src/terms/snp.ts +9 -13
  41. package/src/terms/ssGSEA.ts +5 -1
  42. package/src/terms/term.ts +2 -2
  43. package/src/terms/tw.ts +3 -4
@@ -0,0 +1,73 @@
1
+ import type {
2
+ GroupSettingQ,
3
+ ValuesQ,
4
+ BaseTW,
5
+ PredefinedGroupSettingQ,
6
+ CustomGroupSettingQ,
7
+ RawCategoricalTerm,
8
+ CategoricalTerm,
9
+ RawSnpTerm,
10
+ SnpTerm,
11
+ RawSingleCellCellTypeTerm,
12
+ SingleCellCellTypeTerm
13
+ } from '../index.ts'
14
+ import type { RawValuesQ, RawPredefinedGroupsetQ, RawCustomGroupsetQ, MinBaseQ } from './q.ts'
15
+
16
+ /**
17
+ * A raw qualitative termwrapper object, before filling-in
18
+ *
19
+ * test:QualitativeQ:
20
+ *
21
+ * @category TW
22
+ */
23
+
24
+ export type RawQualTerm = RawCategoricalTerm | RawSnpTerm | RawSingleCellCellTypeTerm
25
+ export type QualTerm = CategoricalTerm | SnpTerm | SingleCellCellTypeTerm
26
+
27
+ export type RawQualTWValues = BaseTW & {
28
+ type?: 'QualTWValues'
29
+ /** must already exist, for dictionary terms, TwRouter.fill() will use mayHydrateDictTwLst() */
30
+ term: RawQualTerm
31
+ q: RawValuesQ
32
+ }
33
+
34
+ export type RawQualTWPredefinedGS = BaseTW & {
35
+ type?: 'QualTWPredefinedGS'
36
+ term: RawQualTerm
37
+ q: RawPredefinedGroupsetQ
38
+ }
39
+
40
+ export type RawQualTWCustomGS = BaseTW & {
41
+ type?: 'QualTWCustomGS'
42
+ term: RawQualTerm
43
+ q: RawCustomGroupsetQ
44
+ }
45
+
46
+ export type RawQualTW = RawQualTWValues | RawQualTWPredefinedGS | RawQualTWCustomGS
47
+
48
+ export type QualBaseQ = MinBaseQ & {
49
+ mode?: 'discrete' | 'binary'
50
+ }
51
+
52
+ export type QualQ = GroupSettingQ | ValuesQ
53
+
54
+ export type QualTWValues = BaseTW & {
55
+ //id: string
56
+ term: QualTerm
57
+ q: ValuesQ
58
+ type: 'QualTWValues'
59
+ }
60
+
61
+ export type QualTWPredefinedGS = BaseTW & {
62
+ term: QualTerm
63
+ q: PredefinedGroupSettingQ
64
+ type: 'QualTWPredefinedGS'
65
+ }
66
+
67
+ export type QualTWCustomGS = BaseTW & {
68
+ term: QualTerm
69
+ q: CustomGroupSettingQ
70
+ type: 'QualTWCustomGS'
71
+ }
72
+
73
+ export type QualTW = QualTWValues | QualTWPredefinedGS | QualTWCustomGS
@@ -1,22 +1,18 @@
1
- import type { BaseTerm, BaseTW, GroupSettingQ, TermGroupSetting, TermValues } from '../index.ts'
2
- import type { MinBaseQ } from './q.ts'
3
-
4
- type SingleCellCellTypeBaseQ = MinBaseQ & { mode: 'discrete' | 'binary' }
5
-
6
- export type SingleCellCellTypeQ = SingleCellCellTypeBaseQ & GroupSettingQ
1
+ import type { BaseTerm, TermGroupSetting, TermValues } from '../index.ts'
7
2
 
8
3
  export type SingleCellCellTypeTerm = BaseTerm & {
9
4
  type: 'singleCellCellType'
10
5
  /** the cell types may be also cell attributes like CNV, Fusion, etc */
11
- values: TermValues
12
6
  /** single cell terms require a sample to read the term values, they are associated with a sample */
13
7
  sample: string
14
8
  /** the plot defined in the dataset contains a column with the term values for the sample, it needs to be passed to read the sample values */
15
9
  plot: string
16
10
  groupsetting: TermGroupSetting
11
+ // may be used to hide
12
+ values: TermValues
17
13
  }
18
14
 
19
- export type SingleCellCellTypeTW = BaseTW & {
20
- term: SingleCellCellTypeTerm
21
- q: SingleCellCellTypeQ
15
+ export type RawSingleCellCellTypeTerm = SingleCellCellTypeTerm & {
16
+ groupsetting?: TermGroupSetting
17
+ values?: TermValues
22
18
  }
package/src/terms/snp.ts CHANGED
@@ -1,28 +1,24 @@
1
- import type { BaseTW, MinBaseQ, BaseTerm, GroupSettingQ, TermGroupSetting } from '../index.ts'
2
- import type { TermSettingInstance } from '../termsetting.ts'
1
+ import type { TermGroupSetting, TermValues, BaseTerm } from '../index.ts'
3
2
 
4
3
  /*
5
4
  For term type 'snp'
6
5
  */
7
6
 
8
- export type SnpQ = MinBaseQ & GroupSettingQ
9
-
10
7
  export type SnpTerm = BaseTerm & {
8
+ type: 'snp'
9
+ id: string
10
+ name: string
11
11
  chr: string
12
12
  start: number
13
13
  stop: number
14
14
  ref: string
15
15
  alt: string[]
16
16
  groupsetting: TermGroupSetting
17
+ // may be used to hide
18
+ values: TermValues
17
19
  }
18
20
 
19
- export type SnpTW = BaseTW & {
20
- type: 'SnpTW'
21
- q: SnpQ
22
- term: SnpTerm
23
- }
24
-
25
- export type SnpTermSettingInstance = TermSettingInstance & {
26
- q: SnpQ
27
- term: SnpTerm
21
+ export type RawSnpTerm = SnpTerm & {
22
+ groupsetting?: TermGroupSetting
23
+ values?: TermValues
28
24
  }
@@ -11,12 +11,16 @@ export type SsGSEATerm = NumericBaseTerm & {
11
11
  /** term.name: geneset db term name for native term, and user-defined name for custom term */
12
12
  /** custom term has list of gene names used for computing score */
13
13
  genes?: string[]
14
- name?: string
14
+ name: string
15
15
  type: 'ssGSEA'
16
16
  bins?: PresetNumericBins
17
17
  unit?: string
18
18
  }
19
19
 
20
+ export type RawSsGSEATerm = SsGSEATerm & {
21
+ name?: string
22
+ }
23
+
20
24
  export type SsGSEATW = NumTW & { term: SsGSEATerm }
21
25
 
22
26
  export type RawSsGSEATW = RawNumTW & { term: SsGSEATerm }
package/src/terms/term.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { Filter } from '../filter.js'
2
- import type { CategoricalTerm } from './categorical.js'
3
2
  import type { ConditionTerm } from './condition.js'
4
3
  import type { NumericTerm } from './numeric.js'
5
4
  import type { GvTerm } from './geneVariant.js'
6
5
  import type { SampleLstTerm } from './samplelst.js'
7
6
  import type { SnpsTerm } from './snps.js'
7
+ import type { QualTerm } from './qualitative.ts'
8
8
 
9
9
  /**
10
10
  * @param id term.id for dictionary terms, undefined for non-dictionary terms
@@ -42,7 +42,7 @@ export type BaseTerm = {
42
42
  }
43
43
 
44
44
  // NumericTerm includes integer, float, date, geneExpression, metaboliteIntensity, and other non-dict terms
45
- export type Term = BaseTerm & (NumericTerm | CategoricalTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm)
45
+ export type Term = BaseTerm & (NumericTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm | QualTerm)
46
46
 
47
47
  /*** types supporting Term types ***/
48
48
 
package/src/terms/tw.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import type { SnpsQ, SnpsTW } from './snps.ts'
2
- import type { SnpQ, SnpTW } from './snp.ts'
3
2
  import type { ConditionQ, ConditionTW } from './condition.ts'
4
3
  import type { SampleLstQ } from './samplelst.ts'
5
- import type { CatTWTypes, CategoricalQ } from './categorical.ts'
6
4
  import type { NumTW, NumericQ } from './numeric.ts'
7
5
  import type { GvTW, GvQ } from './geneVariant.ts'
6
+ import type { QualTW, QualQ } from './qualitative.ts'
8
7
 
9
8
  export type BaseTW = {
10
9
  id?: string
@@ -21,9 +20,9 @@ export type BaseTW = {
21
20
  valueFilter?: any
22
21
  }
23
22
 
24
- export type TermWrapper = CatTWTypes | NumTW | GvTW | ConditionTW | SnpsTW | SnpTW
23
+ export type TermWrapper = NumTW | GvTW | ConditionTW | SnpsTW | QualTW
25
24
 
26
- export type Q = CategoricalQ | NumericQ | GvQ | ConditionQ | SnpsQ | SnpQ | SampleLstQ // | other q
25
+ export type Q = NumericQ | GvQ | ConditionQ | SnpsQ | SampleLstQ | QualQ // | other q
27
26
 
28
27
  //export type TermWrapper = CategoricalTW | NumericTW | SnpsTW | (BaseTW & { term: Term; q: Q })
29
28
  export type TwLst = TermWrapper[]