@sjcrh/proteinpaint-types 2.180.1 → 2.182.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 (50) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-XCSFBW4V.js → chunk-2QTCQFYE.js} +1101 -649
  3. package/dist/{chunk-DIKDKRFN.js → chunk-3DA4MJ2U.js} +691 -467
  4. package/dist/{chunk-Y6F7ZVSV.js → chunk-45VA4Y6L.js} +691 -467
  5. package/dist/chunk-7OA6G77M.js +113 -0
  6. package/dist/{chunk-XAGXFLSH.js → chunk-C5ECCXOT.js} +1402 -756
  7. package/dist/{chunk-PZUKZRSI.js → chunk-DDMUMMOL.js} +438 -214
  8. package/dist/{chunk-4DCPDZW4.js → chunk-G6ZTAMGK.js} +13 -1
  9. package/dist/{chunk-DPWX7ORN.js → chunk-J55IQXT7.js} +515 -291
  10. package/dist/{chunk-P75GBHFO.js → chunk-K6W2WEPW.js} +857 -395
  11. package/dist/{chunk-LLBTODL6.js → chunk-KNDCWQJD.js} +691 -467
  12. package/dist/{chunk-NOT62STS.js → chunk-UBAJYDGK.js} +453 -229
  13. package/dist/{chunk-WSKMTIOO.js → chunk-URYAC364.js} +677 -453
  14. package/dist/{chunk-6PTYP7X4.js → chunk-UYKWZWCU.js} +2180 -1062
  15. package/dist/{chunk-OT6W3FNI.js → chunk-VUNM6QTX.js} +438 -214
  16. package/dist/{chunk-ICACMXK2.js → chunk-ZKO7LMCC.js} +438 -214
  17. package/dist/{chunk-KFNXZOED.js → chunk-ZRTB7SRA.js} +653 -425
  18. package/dist/correlationVolcano.js +1 -1
  19. package/dist/grin2.js +1 -1
  20. package/dist/index.js +34 -34
  21. package/dist/termdb.categories.js +1 -1
  22. package/dist/termdb.chat.js +438 -214
  23. package/dist/termdb.chat2.js +1 -1
  24. package/dist/termdb.cluster.js +1 -1
  25. package/dist/termdb.descrstats.js +1 -1
  26. package/dist/termdb.diffMeth.js +1 -1
  27. package/dist/termdb.dmr.js +1 -1
  28. package/dist/termdb.isoformAvailability.js +11 -0
  29. package/dist/termdb.numericcategories.js +1 -1
  30. package/dist/termdb.percentile.js +1 -1
  31. package/dist/termdb.termsbyids.js +1 -1
  32. package/dist/termdb.topTermsByType.js +1 -1
  33. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  34. package/dist/termdb.violinBox.js +11 -0
  35. package/package.json +1 -1
  36. package/src/dataset.ts +92 -58
  37. package/src/index.ts +3 -2
  38. package/src/routes/termdb.cluster.ts +11 -0
  39. package/src/routes/termdb.diffMeth.ts +6 -0
  40. package/src/routes/termdb.dmr.ts +73 -14
  41. package/src/routes/termdb.isoformAvailability.ts +22 -0
  42. package/src/routes/termdb.violinBox.ts +230 -0
  43. package/src/terms/isoformExpression.ts +36 -0
  44. package/src/terms/numeric.ts +2 -0
  45. package/src/vocab.ts +0 -1
  46. package/dist/chunk-R7BNDCKV.js +0 -3722
  47. package/dist/termdb.boxplot.js +0 -11
  48. package/dist/termdb.violin.js +0 -11
  49. package/src/routes/termdb.boxplot.ts +0 -164
  50. package/src/routes/termdb.violin.ts +0 -163
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  validChatRequest,
3
3
  validChatResponse
4
- } from "./chunk-ICACMXK2.js";
4
+ } from "./chunk-ZKO7LMCC.js";
5
5
  import {
6
6
  ChatPayload
7
7
  } from "./chunk-FRXRNCDV.js";
@@ -2,7 +2,7 @@ import {
2
2
  termdbClusterPayload,
3
3
  validTermdbClusterRequest,
4
4
  validTermdbClusterResponse
5
- } from "./chunk-6PTYP7X4.js";
5
+ } from "./chunk-UYKWZWCU.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbClusterPayload,
@@ -2,7 +2,7 @@ import {
2
2
  descrStatsPayload,
3
3
  validDescrStatsRequest,
4
4
  validDescrStatsResponse
5
- } from "./chunk-Y6F7ZVSV.js";
5
+ } from "./chunk-45VA4Y6L.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  descrStatsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  diffMethPayload,
3
3
  validDiffMethRequest,
4
4
  validDiffMethResponse
5
- } from "./chunk-4DCPDZW4.js";
5
+ } from "./chunk-G6ZTAMGK.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  diffMethPayload,
@@ -2,7 +2,7 @@ import {
2
2
  TermdbDmrPayload,
3
3
  validTermdbDmrRequest,
4
4
  validTermdbDmrResponse
5
- } from "./chunk-P75GBHFO.js";
5
+ } from "./chunk-K6W2WEPW.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  TermdbDmrPayload,
@@ -0,0 +1,11 @@
1
+ import {
2
+ TermdbIsoformAvailabilityPayload,
3
+ validTermdbIsoformAvailabilityRequest,
4
+ validTermdbIsoformAvailabilityResponse
5
+ } from "./chunk-7OA6G77M.js";
6
+ import "./chunk-YNHC5SXO.js";
7
+ export {
8
+ TermdbIsoformAvailabilityPayload,
9
+ validTermdbIsoformAvailabilityRequest,
10
+ validTermdbIsoformAvailabilityResponse
11
+ };
@@ -2,7 +2,7 @@ import {
2
2
  numericCategoriesPayload,
3
3
  validNumericCategoriesRequest,
4
4
  validNumericCategoriesResponse
5
- } from "./chunk-PZUKZRSI.js";
5
+ } from "./chunk-DDMUMMOL.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  numericCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  percentilePayload,
3
3
  validPercentileRequest,
4
4
  validPercentileResponse
5
- } from "./chunk-KFNXZOED.js";
5
+ } from "./chunk-ZRTB7SRA.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  percentilePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-DIKDKRFN.js";
5
+ } from "./chunk-3DA4MJ2U.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termsByIdsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopTermsByTypePayload,
3
3
  validTermdbTopTermsByTypeRequest,
4
4
  validTermdbTopTermsByTypeResponse
5
- } from "./chunk-XCSFBW4V.js";
5
+ } from "./chunk-2QTCQFYE.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbTopTermsByTypePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopVariablyExpressedGenesPayload,
3
3
  validTermdbTopVariablyExpressedGenesRequest,
4
4
  validTermdbTopVariablyExpressedGenesResponse
5
- } from "./chunk-OT6W3FNI.js";
5
+ } from "./chunk-VUNM6QTX.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  termdbTopVariablyExpressedGenesPayload,
@@ -0,0 +1,11 @@
1
+ import {
2
+ validViolinBoxRequest,
3
+ validViolinBoxResponse,
4
+ violinBoxPayload
5
+ } from "./chunk-C5ECCXOT.js";
6
+ import "./chunk-YNHC5SXO.js";
7
+ export {
8
+ validViolinBoxRequest,
9
+ validViolinBoxResponse,
10
+ violinBoxPayload
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.180.1",
3
+ "version": "2.182.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
@@ -72,9 +72,9 @@ type InfoFieldEntry = {
72
72
 
73
73
  /*
74
74
  type GenomicPositionEntry = {
75
- chr: string
76
- start: number
77
- stop: number
75
+ chr: string
76
+ start: number
77
+ stop: number
78
78
  }
79
79
  */
80
80
 
@@ -175,12 +175,12 @@ type DictApi = {
175
175
  type SnvIndelFormat = {
176
176
  [index: string]: {
177
177
  /* has value for a non-GT field indicating the variant
178
- is annotated to this sample*/
178
+ is annotated to this sample*/
179
179
  ID: string
180
180
  Description: string
181
181
  /** 'R' or 1. do not parse values here based on Number="R"
182
- as we don't need to compute on the format values on backend
183
- client will parse the values for display */
182
+ as we don't need to compute on the format values on backend
183
+ client will parse the values for display */
184
184
  Number: string | number
185
185
  Type: string
186
186
  }
@@ -292,15 +292,15 @@ type SnvindelComputeDetails = {
292
292
  name: string
293
293
  }[]
294
294
  /** a type of computing decides numeric values for each variant displayed in tk
295
- computing type is also determined by number of groups
296
- if only 1 group:
297
- type=info: use numeric info field
298
- type=filter: use AF
299
- type=population: use AF
300
- if there're two groups:
301
- both types are "filter": allow AF diff or fisher
302
- "filter" and "population": allow AF diff or fisher
303
- else: value difference
295
+ computing type is also determined by number of groups
296
+ if only 1 group:
297
+ type=info: use numeric info field
298
+ type=filter: use AF
299
+ type=population: use AF
300
+ if there're two groups:
301
+ both types are "filter": allow AF diff or fisher
302
+ "filter" and "population": allow AF diff or fisher
303
+ else: value difference
304
304
  */
305
305
  groups: (SnvindelComputeGroup_filter | SnvindelComputeGroup_population | SnvindelComputeGroup_info)[]
306
306
  /** define lists of group-comparison methods to compute one numerical value per variant
@@ -520,11 +520,11 @@ type TrackLst = {
520
520
 
521
521
  [
522
522
  {
523
- "isfacet": true,
524
- "name": "PEDDEP Prepilot",
525
- "tracks": [
523
+ "isfacet": true,
524
+ "name": "PEDDEP Prepilot",
525
+ "tracks": [
526
526
  {
527
- name:str // required. used as *identifer* for a track
527
+ name:str // required. used as *identifer* for a track
528
528
  sample:str // required. should match with a sample in db!
529
529
  assay:str // required. free string not controlled in dictionary yet. if missing the track won't appear in facet table
530
530
  type:str // properties inherent for each custom track
@@ -681,7 +681,7 @@ for a given region, the median signal from probes in the region is used to make
681
681
  this is alternative to CnvSegmentQuery
682
682
 
683
683
  type Probe2Cnv = {
684
- file: string
684
+ file: string
685
685
  }
686
686
  */
687
687
 
@@ -711,6 +711,7 @@ export type MetaboliteIntensityQuery = MetaboliteIntensityQueryNative
711
711
  type CohortConfig = {
712
712
  file: string
713
713
  filter?: Tvs[]
714
+ overlayTerm?: BaseTerm
714
715
  }
715
716
  type AssayWithCohorts = {
716
717
  cohorts: {
@@ -757,6 +758,24 @@ export type GeneExpressionQuery = {
757
758
  unit?: string
758
759
  }
759
760
 
761
+ /** Isoform expression query — either .get() or .file is needed.
762
+ * availableItems is populated at startup from the HDF5 item dataset
763
+ * so the client can filter isoform selection lists. */
764
+ export type IsoformExpressionQuery = {
765
+ /** ds-supplied or dynamically added getter */
766
+ get?: (param: any, ds: any) => void
767
+ /** HDF5 file with ENST IDs as row keys */
768
+ file?: string
769
+ /** dynamically added during server launch, list of sample integer IDs from file */
770
+ samples?: number[]
771
+ /** cache for default bins per isoform */
772
+ geneExpression2bins?: { [index: string]: any }
773
+ /** expression unit (e.g. 'TPM') */
774
+ unit?: string
775
+ /** ENST IDs available in the HDF5 file, populated during server validation */
776
+ availableItems?: string[]
777
+ }
778
+
760
779
  export type SingleCellGeneExpressionNative = {
761
780
  src: 'native'
762
781
  /** path to HDF5 files. for now only HDF5 is supported.
@@ -999,6 +1018,7 @@ type Mds3Queries = {
999
1018
  singleSampleMutation?: SingleSampleMutationQuery
1000
1019
  NIdata?: NIdataQuery
1001
1020
  geneExpression?: GeneExpressionQuery
1021
+ isoformExpression?: IsoformExpressionQuery
1002
1022
  /** single-sample gsea precomputed scores for rnaseq samples, for genesets from geneset db
1003
1023
  requires genome to be equipped with geneset db
1004
1024
  */
@@ -1418,13 +1438,19 @@ type UrlTemplateBase = {
1418
1438
  }
1419
1439
  export type UrlTemplateSsm = UrlTemplateBase & {
1420
1440
  /** to create separate link, but not directly on chr.pos.ref.alt string.
1421
- name of link is determined by either namekey or linkText. former allows to retrieve a name per m that's different from chr.pos.xx */
1441
+ name of link is determined by either namekey or linkText. former allows to retrieve a name per m that's different from chr.pos.xx */
1422
1442
  shownSeparately?: boolean
1423
1443
  /** optional name of link, if set, same name will be used for all links. e.g. "ClinVar".
1424
1444
  if missing, name is value of m[url.namekey], as used in url itself (e.g. snp rsid) */
1425
1445
  linkText?: string
1426
1446
  }
1427
1447
 
1448
+ export type GetSamplesOpts = {
1449
+ filter: any // pp filter
1450
+ filter0: any // mmrf filter
1451
+ ds: any
1452
+ }
1453
+
1428
1454
  /*** type of ds.cohort.termdb{} ***/
1429
1455
  export type Termdb = {
1430
1456
  /** Terms */
@@ -1457,7 +1483,7 @@ export type Termdb = {
1457
1483
  /** if true, backend is allowed to send sample names to client in charts */
1458
1484
  displaySampleIds?: (clientAuthResult: any) => boolean
1459
1485
  /** get samples that match supplied filter */
1460
- getSamples?: (filter: any, ds: any) => Promise<Set<any>>
1486
+ getSamples?: (opts: GetSamplesOpts) => Promise<Set<any>>
1461
1487
  converSampleIds?: boolean
1462
1488
  alwaysShowBranchTerms?: boolean
1463
1489
  minimumSampleAllowed4filter?: number
@@ -1567,9 +1593,9 @@ keep this setting here for reason of:
1567
1593
  hierCluster?: any
1568
1594
 
1569
1595
  /** ds customization of rules in TermTypeSelect on what term type to exclude for a usecase.
1570
- used by gdc in that gene exp cannot be used for filtering
1571
- note this applies to left-side term type tabs, but not terms in dict tree. latter is controlled by excludeTermtypeByTarget
1572
- */
1596
+ used by gdc in that gene exp cannot be used for filtering
1597
+ note this applies to left-side term type tabs, but not terms in dict tree. latter is controlled by excludeTermtypeByTarget
1598
+ */
1573
1599
  useCasesExcluded?: {
1574
1600
  /** key is target name (todo restrict values), value is array of 1 or more term
1575
1601
  * types (todo restrict values) */
@@ -1819,39 +1845,12 @@ type MassNav = {
1819
1845
  tabs?: {
1820
1846
  /** supported keys: about, charts, groups, filter
1821
1847
  invalid key is ignored
1822
- when dslabel is too long to show in about tab middl row or to define alternative label, do .tabs:{about:{mid:'alt label'}}
1823
- */
1824
- [index: string]: {
1825
- /** show in a specific order of tabs */
1826
- order?: number
1827
- /** label appearing in the top row in upper case */
1828
- top?: string
1829
- /** biggest label appearing in the middle row */
1830
- mid?: string
1831
- /** label appearing in the bottom row*/
1832
- btm?: string
1833
- /** if true, does not show the tab */
1834
- hide?: boolean
1835
- /** static html contents to show specifically in "about" tab subheader
1836
- * maybe used for other tabs as well.
1837
- */
1838
- html?: string
1839
- /** declare data release. should only use for "about" */
1840
- dataRelease?: {
1841
- /** data release version */
1842
- version: string
1843
- /** link to data release page */
1844
- link: string
1845
- }
1846
- /** html string, can include links to other
1847
- * pages (e.g., tutorials, google group) */
1848
- additionalInfo?: string
1849
- /** "active" items, shown as clickable buttons in about tab. click an item to launch a plot */
1850
- activeItems?: {
1851
- items: ActiveItem[]
1852
- // can add holderStyle to customize
1853
- }
1854
- }
1848
+ when dslabel is too long to show in about tab middle row or to define alternative label,
1849
+ do .tabs:{about:{mid:'alt label'}} */
1850
+ about?: MassNavAboutTabEntry
1851
+ charts?: MassNavTabEntry
1852
+ groups?: MassNavTabEntry
1853
+ filter?: MassNavTabEntry
1855
1854
  }
1856
1855
  /** customize background color of active navigation tab */
1857
1856
  activeColor?: string
@@ -1859,6 +1858,41 @@ type MassNav = {
1859
1858
  activeColorHover?: string
1860
1859
  }
1861
1860
 
1861
+ type MassNavTabEntry = {
1862
+ /** show in a specific order of tabs */
1863
+ order?: number
1864
+ /** label appearing in the top row in upper case */
1865
+ top?: string
1866
+ /** biggest label appearing in the middle row */
1867
+ mid?: string
1868
+ /** label appearing in the bottom row*/
1869
+ btm?: string
1870
+ /** if true, does not show the tab */
1871
+ hide?: boolean
1872
+ }
1873
+
1874
+ type MassNavAboutTabEntry = MassNavTabEntry & {
1875
+ /** html string, can include links to other
1876
+ * pages (e.g., tutorials, google group) */
1877
+ additionalInfo?: string
1878
+ /** static html contents to show specifically in "about" tab subheader
1879
+ * maybe used for other tabs as well.
1880
+ * Will not render if cohort.termdb.selectCohort is present */
1881
+ html?: string
1882
+ /** declare data release. Shown with the server info */
1883
+ dataRelease?: {
1884
+ /** data release version */
1885
+ version: string
1886
+ /** link to data release page */
1887
+ link: string
1888
+ }
1889
+ /** "active" items, shown as clickable buttons in about tab. click an item to launch a plot */
1890
+ activeItems?: {
1891
+ items: ActiveItem[]
1892
+ // can add holderStyle to customize
1893
+ }
1894
+ }
1895
+
1862
1896
  type ActiveItem = {
1863
1897
  /** string or html to show inside the button for the item, potentially allow to include <image> as logo */
1864
1898
  title: string
package/src/index.ts CHANGED
@@ -38,7 +38,6 @@ export * from './routes/routeApi.ts'
38
38
  export * from './routes/samplewsimages.ts'
39
39
  export * from './routes/saveWSIAnnotation.ts'
40
40
  export * from './routes/snp.ts'
41
- export * from './routes/termdb.boxplot.ts'
42
41
  export * from './routes/termdb.categories.ts'
43
42
  export * from './routes/termdb.chat2.ts'
44
43
  export * from './routes/termdb.cluster.ts'
@@ -48,6 +47,7 @@ export * from './routes/termdb.DE.ts'
48
47
  export * from './routes/termdb.diffMeth.ts'
49
48
  export * from './routes/termdb.descrstats.ts'
50
49
  export * from './routes/termdb.dmr.ts'
50
+ export * from './routes/termdb.isoformAvailability.ts'
51
51
  export * from './routes/termdb.numericcategories.ts'
52
52
  export * from './routes/termdb.percentile.ts'
53
53
  export * from './routes/termdb.runChart.ts'
@@ -64,7 +64,7 @@ export * from './routes/termdb.termchildren.ts'
64
64
  export * from './routes/termdb.topMutatedGenes.ts'
65
65
  export * from './routes/termdb.topTermsByType.ts'
66
66
  export * from './routes/termdb.topVariablyExpressedGenes.ts'
67
- export * from './routes/termdb.violin.ts'
67
+ export * from './routes/termdb.violinBox.ts'
68
68
  export * from './routes/tileserver.ts'
69
69
  export * from './routes/wsimages.ts'
70
70
  export * from './routes/wsisamples.ts'
@@ -74,6 +74,7 @@ export * from './terms/date.ts'
74
74
  export * from './terms/numeric.ts'
75
75
  export * from './terms/geneVariant.ts'
76
76
  export * from './terms/geneExpression.ts'
77
+ export * from './terms/isoformExpression.ts'
77
78
  export * from './terms/metaboliteIntensity.ts'
78
79
  export * from './terms/proteomeAbundance.ts'
79
80
  export * from './terms/qualitative.ts'
@@ -3,6 +3,7 @@ import type { ErrorResponse } from './errorResponse.ts'
3
3
  import type { Filter } from '../filter.ts'
4
4
  import type { Term } from '../terms/term.ts'
5
5
  import type { GeneExpressionTW } from '../terms/geneExpression.ts'
6
+ import type { IsoformExpressionTW } from '../terms/isoformExpression.ts'
6
7
  import type { MetaboliteIntensityTW } from '../terms/metaboliteIntensity.ts'
7
8
  import type { ProteomeAbundanceTW, ProteomeDetails } from '../terms/proteomeAbundance.ts'
8
9
 
@@ -48,6 +49,15 @@ export type TermdbClusterRequestMetabolite = TermdbClusterRequestBase & {
48
49
  zScoreTransformation?: string
49
50
  }
50
51
 
52
+ export type TermdbClusterRequestIsoformExpression = TermdbClusterRequestBase & {
53
+ /** Data type */
54
+ dataType: 'isoformExpression'
55
+ /** List of terms */
56
+ terms: IsoformExpressionTW[]
57
+ /** perform z-score transformation on values */
58
+ zScoreTransformation?: string
59
+ }
60
+
51
61
  export type TermdbClusterRequestProteomeAbundance = TermdbClusterRequestBase & {
52
62
  /** Data type */
53
63
  dataType: 'proteomeAbundance'
@@ -61,6 +71,7 @@ export type TermdbClusterRequestProteomeAbundance = TermdbClusterRequestBase & {
61
71
 
62
72
  export type TermdbClusterRequest =
63
73
  | TermdbClusterRequestGeneExpression
74
+ | TermdbClusterRequestIsoformExpression
64
75
  | TermdbClusterRequestMetabolite
65
76
  | TermdbClusterRequestProteomeAbundance
66
77
 
@@ -31,6 +31,12 @@ export type DiffMethDataEntry = {
31
31
  promoter_id: string
32
32
  /** Gene symbol(s) associated with the promoter (comma-separated if multiple) */
33
33
  gene_name: string
34
+ /** Chromosome (e.g. "chr1") */
35
+ chr: string
36
+ /** Promoter start coordinate (0-based) */
37
+ start: number
38
+ /** Promoter end coordinate (exclusive) */
39
+ stop: number
34
40
  /** M-value difference (positive = hypermethylated in cases) */
35
41
  fold_change: number
36
42
  /** Raw p-value from moderated t-test */
@@ -11,10 +11,26 @@ export type TermdbDmrRequest = {
11
11
  chr: string
12
12
  start: number
13
13
  stop: number
14
- /** optional regulatory domain annotations for the GP model */
15
- annotations?: DmrAnnotation[]
16
- /** max fraction of NaN per probe before dropping (default 0.5) */
17
- nan_threshold?: number
14
+ /** DMRCate lambda parameter: Gaussian kernel bandwidth in nucleotides (default 1000) */
15
+ lambda?: number
16
+ /** DMRCate C parameter: scaling factor for kernel width (default 2) */
17
+ C?: number
18
+ /** FDR cutoff for CpG significance (default 0.05) */
19
+ fdr_cutoff?: number
20
+ /** display name for group1 (e.g. from volcano plot) */
21
+ group1Name?: string
22
+ /** display name for group2 (e.g. from volcano plot) */
23
+ group2Name?: string
24
+ /** Block width in CSS pixels for server-side track rendering (default 800) */
25
+ blockWidth?: number
26
+ /** Device pixel ratio for server-side track rendering (default 1) */
27
+ devicePixelRatio?: number
28
+ /** Maximum region size (bp) to show LOESS curves (default 50000) */
29
+ maxLoessRegion?: number
30
+ /** Group/DMR colors for server-side track rendering */
31
+ colors?: { group1: string; group2: string; hyper: string; hypo: string }
32
+ /** Backend engine: 'rust' (genome-wide eBayes, default) or 'r' (DMRCate via cached limma) */
33
+ backend?: 'rust' | 'r'
18
34
  filter?: Filter
19
35
  __protected__?: any
20
36
  }
@@ -24,12 +40,44 @@ type Sample = {
24
40
  sample: string
25
41
  }
26
42
 
27
- type DmrAnnotation = {
28
- name: string
29
- start: number
30
- end: number
31
- base_methylation?: number
32
- length_scale_bp?: number
43
+ export type DmrLoessCurves = {
44
+ /** Evenly spaced genomic positions where LOESS was evaluated */
45
+ positions: number[]
46
+ /** LOESS fitted values for group 1 (control) */
47
+ group1_fitted: number[]
48
+ /** Lower 95% CI bound for group 1 */
49
+ group1_ci_lower: number[]
50
+ /** Upper 95% CI bound for group 1 */
51
+ group1_ci_upper: number[]
52
+ /** LOESS fitted values for group 2 (case) */
53
+ group2_fitted: number[]
54
+ /** Lower 95% CI bound for group 2 */
55
+ group2_ci_lower: number[]
56
+ /** Upper 95% CI bound for group 2 */
57
+ group2_ci_upper: number[]
58
+ }
59
+
60
+ export type DmrDiagnostic = {
61
+ probes: {
62
+ positions: number[]
63
+ mean_group1: (number | null)[]
64
+ mean_group2: (number | null)[]
65
+ fdr: number[]
66
+ logFC: (number | null)[]
67
+ }
68
+ probe_spacings: number[]
69
+ /** LOESS smoothed curves with 95% CI for both groups */
70
+ loess?: DmrLoessCurves
71
+ /** Total probes analyzed genome-wide for eBayes */
72
+ total_probes_analyzed?: number
73
+ /** Peak RSS memory in MB */
74
+ peak_memory_mb?: number
75
+ /** Starting RSS memory in MB */
76
+ start_memory_mb?: number
77
+ /** Total elapsed time in milliseconds */
78
+ elapsed_ms?: number
79
+ /** Server-rendered track PNG as data URI (Rust backend only) */
80
+ track_png?: string | null
33
81
  }
34
82
 
35
83
  export type TermdbDmrSuccessResponse = {
@@ -38,12 +86,23 @@ export type TermdbDmrSuccessResponse = {
38
86
  chr: string
39
87
  start: number
40
88
  stop: number
41
- width: number
42
- max_delta_beta: number
43
- /** hyper = group2 hypermethylated relative to group1; hypo = opposite */
89
+ /** Number of CpG sites in this DMR */
90
+ no_cpgs: number
91
+ /** Minimum FDR from the kernel-smoothed estimate across the region */
92
+ min_smoothed_fdr: number
93
+ /** Harmonic mean of individual CpG FDR-corrected p-values */
94
+ HMFDR: number
95
+ /** Maximum methylation difference (beta-scale) within the DMR */
96
+ maxdiff: number
97
+ /** Mean methylation difference across the DMR */
98
+ meandiff: number
99
+ /** hyper = case hypermethylated relative to control; hypo = opposite */
44
100
  direction: 'hyper' | 'hypo'
45
- probability: number
101
+ /** Comma-separated gene symbols overlapping the DMR */
102
+ overlapping_genes?: string | null
46
103
  }[]
104
+ /** Diagnostic data: per-CpG probe means and statistics */
105
+ diagnostic?: DmrDiagnostic
47
106
  }
48
107
 
49
108
  export type TermdbDmrErrorResponse = {
@@ -0,0 +1,22 @@
1
+ import type { RoutePayload } from './routeApi.ts'
2
+
3
+ export type TermdbIsoformAvailabilityRequest = {
4
+ genome: string
5
+ dslabel: string
6
+ /** candidate ENST IDs to check */
7
+ isoforms: string[]
8
+ }
9
+
10
+ export type TermdbIsoformAvailabilityResponse = {
11
+ /** subset of input isoforms that have data in the HDF5 */
12
+ available: string[]
13
+ }
14
+
15
+ export const TermdbIsoformAvailabilityPayload: RoutePayload = {
16
+ request: {
17
+ typeId: 'TermdbIsoformAvailabilityRequest'
18
+ },
19
+ response: {
20
+ typeId: 'TermdbIsoformAvailabilityResponse'
21
+ }
22
+ }