@sjcrh/proteinpaint-types 2.138.3-5 → 2.139.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 (33) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-CC3OBRKE.js → chunk-2QKCLUH3.js} +10 -10
  3. package/dist/{chunk-QG776KAI.js → chunk-34LXTZYA.js} +10 -10
  4. package/dist/{chunk-6HAS5WRS.js → chunk-4S36DRJ4.js} +1190 -390
  5. package/dist/{chunk-2YASZMH3.js → chunk-5BKOSJEU.js} +13 -13
  6. package/dist/{chunk-IY6W7HXW.js → chunk-F2ZZ5J3F.js} +10 -10
  7. package/dist/{chunk-DD2RLZHC.js → chunk-G5BYLEJC.js} +3 -3
  8. package/dist/{chunk-JKBVXIRQ.js → chunk-HJ7XFSJK.js} +3 -3
  9. package/dist/{chunk-I2BMMKPN.js → chunk-KDHGWAOS.js} +10 -10
  10. package/dist/{chunk-LTGT4NK4.js → chunk-NHELOLDH.js} +19 -19
  11. package/dist/{chunk-7FTOFTNK.js → chunk-P3Z422N2.js} +3 -3
  12. package/dist/{chunk-O3NHQOWL.js → chunk-Y6Z6XAFN.js} +3 -3
  13. package/dist/{chunk-HCBXL376.js → chunk-ZHCVV36H.js} +10 -10
  14. package/dist/correlationVolcano.js +1 -1
  15. package/dist/index.js +12 -12
  16. package/dist/termdb.boxplot.js +1 -1
  17. package/dist/termdb.categories.js +1 -1
  18. package/dist/termdb.cluster.js +1 -1
  19. package/dist/termdb.descrstats.js +1 -1
  20. package/dist/termdb.numericcategories.js +1 -1
  21. package/dist/termdb.percentile.js +1 -1
  22. package/dist/termdb.termsbyids.js +1 -1
  23. package/dist/termdb.topTermsByType.js +1 -1
  24. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  25. package/dist/termdb.violin.js +1 -1
  26. package/package.json +1 -1
  27. package/src/dataset.ts +9 -1
  28. package/src/index.ts +1 -0
  29. package/src/routes/termdb.percentile.ts +5 -3
  30. package/src/terms/geneExpression.ts +4 -1
  31. package/src/terms/numeric.ts +1 -1
  32. package/src/terms/ssGSEA.ts +26 -0
  33. package/src/vocab.ts +1 -1
package/src/dataset.ts CHANGED
@@ -973,6 +973,14 @@ type Mds3Queries = {
973
973
  singleSampleMutation?: SingleSampleMutationQuery
974
974
  NIdata?: NIdataQuery
975
975
  geneExpression?: GeneExpressionQuery
976
+ /** single-sample gsea precomputed scores for rnaseq samples, for genesets from geneset db
977
+ requires genome to be equipped with geneset db
978
+ */
979
+ ssGSEA?: {
980
+ /** path to h5 file, matrix of NES scores. rows are msigdb geneset ids, columns are rnaseq samples */
981
+ file: string
982
+ // in case a genome may have more than 1 geneset dbs, here may specify name of db that this result is based on */
983
+ }
976
984
  rnaseqGeneCount?: RnaseqGeneCount
977
985
  /** Used to create the top mutated genes UI in the gene
978
986
  * set edit ui and data requests. */
@@ -981,7 +989,7 @@ type Mds3Queries = {
981
989
  * set edit ui. Also used for data requests */
982
990
  topVariablyExpressedGenes?: TopVariablyExpressedGenesQuery
983
991
  metaboliteIntensity?: {
984
- src: 'native' | 'gdc'
992
+ src: 'native'
985
993
  file: string
986
994
  }
987
995
  singleCell?: SingleCellQuery
package/src/index.ts CHANGED
@@ -71,6 +71,7 @@ export * from './terms/singleCellGeneExpression.ts'
71
71
  export * from './terms/snp.ts'
72
72
  export * from './terms/snps.ts'
73
73
  export * from './terms/samplelst.ts'
74
+ export * from './terms/ssGSEA.ts'
74
75
  export * from './terms/q.ts'
75
76
  export * from './terms/term.ts'
76
77
  export * from './terms/tw.ts'
@@ -1,5 +1,6 @@
1
1
  import type { RoutePayload } from './routeApi.js'
2
2
  import type { Filter } from '../filter.ts'
3
+ import type { Term } from '../terms/term.ts'
3
4
 
4
5
  export type PercentileRequest = {
5
6
  /** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */
@@ -9,8 +10,9 @@ export type PercentileRequest = {
9
10
  embedder: string
10
11
  getpercentile: number[]
11
12
  /** term id string */
12
- tid: string
13
- filter: Filter
13
+ term: Term
14
+ filter?: Filter
15
+ filter0?: any
14
16
  }
15
17
 
16
18
  export type PercentileResponse = {
@@ -32,7 +34,7 @@ export const percentilePayload: RoutePayload = {
32
34
  dslabel: 'TermdbTest',
33
35
  embedder: 'localhost',
34
36
  getpercentile: [50],
35
- tid: 'agedx',
37
+ term: { id: 'agedx' },
36
38
  filter: {
37
39
  type: 'tvslst',
38
40
  in: true,
@@ -10,7 +10,10 @@ GeneExpressionTermSettingInstance
10
10
 
11
11
  */
12
12
 
13
- export type GeneExpressionQ = NumericQ & { dt?: number }
13
+ export type GeneExpressionQ = NumericQ & {
14
+ dt?: number
15
+ preferredBins?: string
16
+ }
14
17
 
15
18
  export type GeneExpressionTW = TermWrapper & {
16
19
  q: GeneExpressionQ
@@ -34,7 +34,7 @@ export type NumericTerm = BaseTerm & {
34
34
  id?: string
35
35
  // these concrete term.type values make it clear that only these are numeric,
36
36
  // "categorical", "condition", and other term.types are not included in this union
37
- type: 'integer' | 'float' | 'geneExpression' | 'metaboliteIntensity' | 'date'
37
+ type: 'integer' | 'float' | 'geneExpression' | 'metaboliteIntensity' | 'date' | 'ssGSEA'
38
38
  bins: PresetNumericBins
39
39
  values?: TermValues
40
40
  unit?: string
@@ -0,0 +1,26 @@
1
+ import type { TermWrapper } from './tw.ts'
2
+ import type { NumericTerm, NumericQ } from './numeric.ts'
3
+ import type { TermSettingInstance } from '../termsetting.ts'
4
+
5
+ /*
6
+ duplicated from geneExpression.ts
7
+ */
8
+
9
+ export type SsGSEAQ = NumericQ & { dt?: number }
10
+
11
+ export type SsGSEATW = TermWrapper & {
12
+ q: SsGSEAQ
13
+ term: SsGSEATerm
14
+ }
15
+
16
+ export type SsGSEATerm = NumericTerm & {
17
+ /** term.id: geneset db term id for native term, and cache file name for custom term */
18
+ /** term.name: geneset db term name for native term, and user-defined name for custom term */
19
+ /** custom term has list of gene names used for computing score */
20
+ genes?: string[]
21
+ }
22
+
23
+ export type SsGSEATermSettingInstance = TermSettingInstance & {
24
+ q: SsGSEAQ
25
+ term: SsGSEATerm
26
+ }
package/src/vocab.ts CHANGED
@@ -19,7 +19,7 @@ export type VocabApi = {
19
19
  findTerm: (f: string, activeCohort: number, usecase: UseCase, x: string) => { lst: Term[] }
20
20
  getCategories: (term: Term, filter?: Filter, body?: any) => any
21
21
  getCustomTermQLst: (f: Term) => any
22
- getPercentile: (term_id: string | number, percentile_lst: number[], filter?: Filter) => any
22
+ getPercentile: (term: Term, percentile_lst: number[], termfilter?) => any
23
23
  getterm: (f: any) => Term
24
24
  getTerms: (f: any) => any
25
25
  getTermdbConfig: () => any