@sjcrh/proteinpaint-types 2.191.4 → 2.193.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/dist/index.js CHANGED
@@ -63,6 +63,12 @@ var WSImage = class {
63
63
  }
64
64
  };
65
65
 
66
+ // src/routes/termdb.bubbleHeatmap.ts
67
+ var bubbleHeatmapPayload = {
68
+ request: { typeId: "BubbleHeatmapRequest" },
69
+ response: { typeId: "BubbleHeatmapResponse" }
70
+ };
71
+
66
72
  // src/routes/termdb.categories.ts
67
73
  var termdbCategoriesPayloadExamples = {
68
74
  request: {
@@ -271,6 +277,172 @@ var termChildrenPayloadExamples = {
271
277
  ]
272
278
  };
273
279
 
280
+ // src/routes/termdb.singleCellPlots.ts
281
+ var TermdbSingleCellPlotsRequestExample = {
282
+ genome: "hg38-test",
283
+ dslabel: "TermdbTest",
284
+ singleCellPlot: {
285
+ name: "umap",
286
+ sample: { sID: "sample1" }
287
+ },
288
+ filter: {
289
+ type: "tvslst",
290
+ in: true,
291
+ join: "",
292
+ lst: [
293
+ {
294
+ tag: "cohortFilter",
295
+ type: "tvs",
296
+ tvs: {
297
+ term: { id: "subcohort", type: "multivalue" },
298
+ values: [{ key: "ABC", label: "ABC" }]
299
+ }
300
+ }
301
+ ]
302
+ },
303
+ filter0: void 0,
304
+ canvasSettings: {
305
+ cutoff: 1e4,
306
+ width: 800,
307
+ height: 600,
308
+ radius: 3,
309
+ minXScale: null,
310
+ maxXScale: null,
311
+ minYScale: null,
312
+ maxYScale: null,
313
+ opacity: 0.8,
314
+ startColor: "#0000ff",
315
+ stopColor: "#ff0000",
316
+ devicePixelRatio: 2
317
+ },
318
+ colorTW: {
319
+ term: {
320
+ name: "Cell Type",
321
+ plot: "UMAP",
322
+ type: "singleCellCellType",
323
+ sample: { sID: "1_patient" },
324
+ groupsetting: { disabled: false },
325
+ values: {}
326
+ },
327
+ q: { mode: "discrete", type: "values", hiddenValues: {} }
328
+ }
329
+ };
330
+ var TermdbSingleCellPlotsResponseExample = {
331
+ range: {
332
+ xMin: -2.45230826499861,
333
+ xMax: 2.02116419939392,
334
+ yMin: -2.670907125487,
335
+ yMax: 2.97596441655721,
336
+ geMin: null,
337
+ geMax: null
338
+ },
339
+ result: {
340
+ Default: {
341
+ colorLegend: [
342
+ [
343
+ "T_NK",
344
+ {
345
+ sampleCount: 20,
346
+ color: "#1b9e77",
347
+ key: "T_NK"
348
+ }
349
+ ],
350
+ [
351
+ "Blast",
352
+ {
353
+ sampleCount: 54,
354
+ color: "#030303",
355
+ key: "Blast"
356
+ }
357
+ ],
358
+ [
359
+ "Monocyte",
360
+ {
361
+ sampleCount: 26,
362
+ color: "#7570b3",
363
+ key: "Monocyte"
364
+ }
365
+ ]
366
+ ],
367
+ shapeLegend: [
368
+ [
369
+ "Ref",
370
+ {
371
+ sampleCount: 100,
372
+ shape: 0,
373
+ key: "Ref"
374
+ }
375
+ ]
376
+ ],
377
+ samples: [
378
+ {
379
+ sampleId: "cell1",
380
+ x: 0.958429213345285,
381
+ y: 1.94008987552318,
382
+ z: 0,
383
+ category: "T_NK",
384
+ shape: "Ref",
385
+ hidden: {
386
+ category: false
387
+ }
388
+ },
389
+ {
390
+ sampleId: "cell2",
391
+ x: 0.678836078621254,
392
+ y: -1.13854914348622,
393
+ z: 0,
394
+ category: "T_NK",
395
+ shape: "Ref",
396
+ hidden: {
397
+ category: false
398
+ }
399
+ },
400
+ {
401
+ sampleId: "cell3",
402
+ x: -2.11135267144421,
403
+ y: -2.33519450621652,
404
+ z: 0,
405
+ category: "T_NK",
406
+ shape: "Ref",
407
+ hidden: {
408
+ category: false
409
+ }
410
+ },
411
+ {
412
+ sampleId: "cell4",
413
+ x: 0.551783876521269,
414
+ y: -1.24685552943596,
415
+ z: 0,
416
+ category: "T_NK",
417
+ shape: "Ref",
418
+ hidden: {
419
+ category: false
420
+ }
421
+ },
422
+ {
423
+ sampleId: "cell5",
424
+ x: 1.84959385901015,
425
+ y: 2.68311790617899,
426
+ z: 0,
427
+ category: "T_NK",
428
+ shape: "Ref",
429
+ hidden: {
430
+ category: false
431
+ }
432
+ }
433
+ ]
434
+ }
435
+ }
436
+ };
437
+ var TermdbSingleCellPlotsExample = {
438
+ request: {
439
+ body: TermdbSingleCellPlotsRequestExample
440
+ },
441
+ response: {
442
+ body: TermdbSingleCellPlotsResponseExample
443
+ }
444
+ };
445
+
274
446
  // src/routes/termdb.violinBox.ts
275
447
  function isErrorResponse(response) {
276
448
  return "error" in response && "status" in response;
@@ -410,7 +582,9 @@ export {
410
582
  SelectionPrefixes,
411
583
  TERM_COLLECTION,
412
584
  TermTypes,
585
+ TermdbSingleCellPlotsExample,
413
586
  WSImage,
587
+ bubbleHeatmapPayload,
414
588
  checkSelectionType,
415
589
  createAmbiguousPoints,
416
590
  createFeatureID,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/routes/aiProjectSelectedWSImages.ts", "../src/routes/hicgenome.ts", "../src/routes/samplewsimages.ts", "../src/routes/termdb.categories.ts", "../src/routes/termdb.chat.ts", "../src/routes/termdb.descrstats.ts", "../src/routes/termdb.percentile.ts", "../src/routes/termdb.runChart.ts", "../src/routes/termdb.rootterm.ts", "../src/routes/termdb.termchildren.ts", "../src/routes/termdb.violinBox.ts", "../src/terms/constants.ts"],
4
- "sourcesContent": ["import type { WSImage } from './samplewsimages.ts'\n\nexport const FlagStatus = {\n\tNormal: 0,\n\tSkipped: 1,\n\tFlagged: 2,\n\tDeleted: 3\n} as const\n\nexport type FlagStatusValues = (typeof FlagStatus)[keyof typeof FlagStatus]\n\nexport const FeaturePrefixes = {\n\tStar: 'annotation-star-',\n\tSquare: 'annotation-square-',\n\tBorder: 'annotation-border-',\n\tPredBorder: 'prediction-border-'\n} as const\n\nexport type FeaturePrefixValues = (typeof FeaturePrefixes)[keyof typeof FeaturePrefixes]\n\nexport const SelectionPrefixes = {\n\tTileSelection: 'ts_',\n\tPrediction: 'pred_',\n\tAnnotation: 'anno_'\n} as const\n\nexport type SelectionPrefixValues = (typeof SelectionPrefixes)[keyof typeof SelectionPrefixes]\n\nexport const FlagStatusMessages = {\n\t[FlagStatus.Normal]: '',\n\t[FlagStatus.Skipped]: '(Skipped)',\n\t[FlagStatus.Flagged]: '(Flagged)'\n\t// Didn't add Deleted to FlagStatusMessages because deleted annotations dont exist\n\t// and deleted predictons are filtered out in proteinpaint/server/routes/aiProjectSelectedWSImages.ts around line 119\n}\n\nexport type AiProjectSelectedWSImagesRequest = {\n\tgenome: string\n\tdslabel: string\n\tprojectId: number\n\twsimagesFilenames: Array<string>\n}\n\nexport type AiProjectSelectedWSImagesResponse = {\n\t// TODO create a type for WSImage with AI project specific fields\n\twsimages: WSImage[]\n}\n\nexport interface FlagPredictionInfo {\n\tflag: FlagStatusValues\n\ttimestamp: string\n}\n\n// TODO move to another class\nexport interface TileSelection {\n\tzoomCoordinates: [number, number]\n\tclass?: string\n\tflag: FlagStatusValues\n\tid: string\n\ttimestamp: string\n}\n\nexport interface Annotation extends TileSelection {\n\tclass: string\n}\n\nexport interface Prediction extends TileSelection {\n\tclass: string\n\tuncertainty: number\n}\n\nexport function createSelectionID(prefix: SelectionPrefixValues, coordinates: [number, number]): string {\n\treturn prefix + JSON.stringify(coordinates)\n}\n\nexport function checkSelectionType(tileSelection: TileSelection, suspectedPrefix: SelectionPrefixValues): boolean {\n\treturn tileSelection.id.startsWith(suspectedPrefix)\n}\n\nexport function createFeatureID(featurePrefix: FeaturePrefixValues, coords: [number, number]) {\n\treturn featurePrefix + JSON.stringify(coords)\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n", "import type { BaseHicRequest, XYZCoord } from './hicdata.ts'\n\nexport type HicGenomeRequest = BaseHicRequest & {\n\t/** Entire chromosome list read from the file (see hicstate) */\n\tchrlst: string[]\n\t/** window location */\n\tembedder: string\n\t/** whether or not the file contains 'chr' for the chromosomes */\n\tnochr: boolean\n}\n\nexport type HicGenomeResponse = {\n\tdata: {\n\t\t/** First chromosome */\n\t\tlead: string\n\t\t/** Second chromosome */\n\t\tfollow: string\n\t\titems: XYZCoord[]\n\t}[]\n\t/** Error message to display on the client, if applicable */\n\terror?: string\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n// The example below will not work in github CI where only termdb test\nexport const hicGenomePayloadExample = {\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\turl: 'https://proteinpaint.stjude.org/ppdemo/hg19/hic/hic_demo.hic',\n\t\t\t\t\tmatrixType: 'observed',\n\t\t\t\t\tnmeth: 'NONE',\n\t\t\t\t\tpos1: '3',\n\t\t\t\t\tpos2: '2',\n\t\t\t\t\tresolution: 1000000\n\t\t\t\t} // satisfies HicGenomeRequest // TODO: fix the type or example\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { WSIClass } from '../dataset.ts'\nimport type { Annotation, Prediction } from './aiProjectSelectedWSImages.ts'\n\nexport type SampleWSImagesRequest = {\n\tgenome: string\n\tdslabel: string\n\tsample_id: string\n\twsimage: string\n}\n\nexport type SampleWSImagesResponse = {\n\tsampleWSImages: WSImage[]\n}\n\nexport class WSImage {\n\tid?: number\n\tfilename: string\n\tmetadata?: string\n\tpredictionLayers?: Array<string>\n\tannotations?: Array<Annotation>\n\tpredictions?: Array<Prediction>\n\tclasses?: Array<WSIClass>\n\t/** ds defined uncertainity labels and colors */\n\tuncertainty?: any\n\t/** Color to highlight active patches */\n\tactivePatchColor?: string\n\t/** Tile size in pixels needed for AI scripts */\n\ttileSize?: number\n\n\tconstructor(filename: string) {\n\t\tthis.filename = filename\n\t}\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n", "import type { Filter } from '../filter.ts'\nimport type { TermWrapper } from '../terms/tw.ts'\n\nexport type CategoriesRequest = {\n\tgenome: string\n\tdslabel: string\n\tembedder: string\n\t/** termwrapper object */\n\ttw: TermWrapper\n\tfilter?: Filter\n\tfilter0?: any\n\t/** quick fix only for gdc */\n\tcurrentGeneNames?: string[]\n\t/** optional property added by mds3 tk, to limit to cases mutated in this region */\n\trglst?: any\n}\n\ninterface Entries {\n\tsamplecount: number\n\tkey: string\n\tlabel: string\n}\n\nexport type CategoriesResponse = {\n\tlst: Entries[]\n\torderedLabels?: []\n}\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const termdbCategoriesPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'CategoriesRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'CategoriesResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\ttw: { id: 'diaggrp' },\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\ttype: 'tvslst',\n\t\t\t\t\t\tin: true,\n\t\t\t\t\t\tjoin: '',\n\t\t\t\t\t\tlst: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//tag: 'cohortFilter',\n\t\t\t\t\t\t\t\ttype: 'tvs',\n\t\t\t\t\t\t\t\ttvs: {\n\t\t\t\t\t\t\t\t\tterm: {\n\t\t\t\t\t\t\t\t\t\tname: 'Cohort',\n\t\t\t\t\t\t\t\t\t\ttype: 'categorical',\n\t\t\t\t\t\t\t\t\t\tvalues: { ABC: { label: 'ABC' }, XYZ: { label: 'XYZ' } },\n\t\t\t\t\t\t\t\t\t\tid: 'subcohort',\n\t\t\t\t\t\t\t\t\t\tisleaf: false,\n\t\t\t\t\t\t\t\t\t\tgroupsetting: { disabled: true }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} // satisfies CategoriesRequest // TODO: use the type definition\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { TermTypes } from '../terms/constants.ts'\nimport type { Filter } from '../filter.ts'\n\n/** */\n// Helps track ambiguous points in the LLM reasoning process for debugging and improvement purposes.\n// Create a fresh array per request/pipeline run to avoid sharing mutable state across module consumers.\nexport const createAmbiguousPoints = (): string[] => []\n\nexport type ChatRequest = {\n\tgenome: string\n\tdslabel: string\n\tfilter?: Filter\n\t/** user prompt */\n\tprompt: string\n\t__protected__?: any\n}\n\nexport type TextResponse = {\n\ttype: 'text'\n\t/** Plain text message to display in the chat */\n\ttext: string\n}\nexport type HtmlResponse = {\n\ttype: 'html'\n\t/** Pre-approved HTML from the dataset JSON resources array */\n\thtml: string\n}\nexport type PlotResponse = {\n\ttype: 'plot'\n\tplot: object\n\tmsg?: string\n\t/** Specifies what action to take e.g. Summary plot or no action. Will add more chart types later */\n}\n\nexport type LlmConfig = {\n\tprovider: 'SJ' | 'ollama' | 'huggingface' | 'azure'\n\tEmbeddingProvider: 'SJ' | 'ollama' | 'huggingface'\n\tEmbeddingProviderApi: string\n\tapi: string\n\tapiToken?: string\n\tEmbeddingProviderApiToken?: string\n\tmodelName: string\n\tembeddingModelName: string\n\t/** Whether to load the embedding model locally (via transformers.js) or call a remote API. Defaults to 'api'. */\n\tembeddingModelAccess?: 'local' | 'api'\n\t/** Smaller model to use for LLM classification fallback. Defaults to modelName if not set. */\n\tclassifierModelName?: string\n\t/** Log verbose debug output (e.g. raw embedding arrays) to the terminal. Defaults to false. */\n\tverbose?: boolean\n}\n\nexport interface GeneDataTypeResult {\n\tgene: string\n\tdataType: string\n}\n\nexport interface GeneSetDataTypeResult {\n\tgeneSet: string\n\tdataType: typeof TermTypes.SSGSEA | typeof TermTypes.GENE_VARIANT | 'ambiguous' | typeof TermTypes.GENE_EXPRESSION\n}\n\nexport type ChatResponse = TextResponse | HtmlResponse | PlotResponse\n\nexport type SummaryType = {\n\t/** Name of 1st term */\n\tterm: string\n\t/** Name of 2nd term */\n\tterm2?: string\n\t/** Optional simple filter terms */\n\tsimpleFilter: FilterTerm[]\n\t/** Optional explicit child type requested by the user. If omitted, the logic of the data types picks the child type. */\n\tchildType?: 'violin' | 'boxplot' | 'sampleScatter' | 'barchart'\n}\n\nexport type FilterTerm =\n\t| CategoricalFilterTerm\n\t| NumericFilterTerm /** FilterTerm can either be numeric or categorical */\n\nexport type CategoricalFilterTerm = {\n\t/** Name of categorical term */\n\tterm: string\n\t/** The category of the term */\n\tcategory: string\n\t/** join term to be used only when there is more than one filter term and should be placed from the 2nd filter term onwards describing how it connects to the previous term */\n\tjoin?: 'and' | 'or'\n}\n\nexport type NumericFilterTerm = {\n\t/** Name of numeric term */\n\tterm: string\n\t/** start position (or lower limit) of numeric term */\n\tstart?: number\n\t/** stop position (or upper limit) of numeric term */\n\tstop?: number\n\t/** join term to be used only when there is more than one filter term and should be placed from the 2nd filter term onwards describing how it connects to the previous term */\n\tjoin?: 'and' | 'or'\n}\n\nexport type DbRows = {\n\t/** Name of the term */\n\tname: string\n\t/** Description of the term in plain language */\n\tdescription: string\n\t/** The type of variable stored in the DB (e.g. categorical, float) */\n\tterm_type: string\n\t/** Array of {key,value} terms storing the possible categories for a categorical variable */\n\tvalues: DbValue[]\n}\n\nexport type DbValue = {\n\t/** Name of the key */\n\tkey: string\n\t/** Object of values corresponding to the key */\n\tvalue: any\n}\n\nexport type ClassificationType =\n\t| plot_type\n\t| resource_type\n\t| none_type /** Variable containing the type of action the UI needs to take */\n\nexport type plot_type = {\n\t/** When type == plot, show the corresponding plot in the plot field */\n\ttype: 'plot'\n\t/** The type of plot to be displayed on the UI.\n\t * Standard categories are listed; datasets may define additional custom categories. */\n\tplot: 'summary' | 'dge' | 'survival' | 'matrix' | 'sampleScatter' | 'hierCluster' | 'genomeBrowser'\n}\n\nexport type resource_type = {\n\t/** When type == resource, invoke the resource agent to return a matching resource link */\n\ttype: 'resource'\n}\n\nexport type none_type = {\n\t/** When type == none, the query did not match any known category */\n\ttype: 'none'\n}\n\n/** Top-level classification returned by classifyQuery: plot or notplot (subtype determined separately by plot.ts) */\nexport type QueryClassification = { type: 'plot' } | { type: 'notplot' } | { type: 'binaryQuery' }\n\n/** Specific plot type returned by classifyPlotType in plot.ts */\nexport type PlotType = 'summary' | 'dge' | 'survival' | 'matrix' | 'prebuiltscatter' | 'hiercluster' | 'genomeBrowser'\n\nexport type DEType = {\n\t/** Name of group1 which is an array of filter terms */\n\tgroup1: FilterTerm[]\n\t/** Name of group2 which is an array of filter terms */\n\tgroup2: FilterTerm[]\n\t/** Method used for carrying out differential gene expression analysis */\n\tmethod?: 'edgeR' | 'limma' | 'wilcoxon'\n}\n\nexport type MatrixType = {\n\t/** Names of dictionary terms to include as rows in the matrix (e.g. \"Diagnosis\", \"Gender\", \"Race\") */\n\tterms?: string[]\n\t/** Names of genes to include as gene variant rows in the matrix (e.g. \"TP53\", \"KRAS\", \"NRAS\") */\n\tgeneNames?: string[]\n\t/** Names of gene sets containing ssGSEA enrichment scores */\n\tgenesetNames?: string[]\n\t/** Optional simple filter terms to restrict the sample set */\n\tsimpleFilter?: FilterTerm[]\n}\n\nexport type HierClusterType = {\n\t/** Names of genes to include in the hierarchical clustering (e.g. \"TP53\", \"KRAS\", \"BCR\") */\n\tgeneNames?: string[]\n\t/** Names of gene sets containing list of genes to be used for hierarchical clustering */\n\tgenesetNames?: string[]\n\t/** Optional simple filter terms to restrict the sample set */\n\tsimpleFilter?: FilterTerm[]\n}\n\nexport type SampleScatterType = {\n\t/** Name of the pre-built plot (e.g. \"Transcriptome t-SNE\", \"Transcriptome UMAP\") */\n\tplotName: string\n\t/** Term or gene name to overlay as color, or null to remove color overlay */\n\tcolorTW?: string | null\n\t/** Term or gene name to overlay as shape, or null to remove shape overlay */\n\tshapeTW?: string | null\n\t/** Term or gene name to overlay as Z-divide, or null to remove divide overlay */\n\tterm0?: string | null\n\t/** Optional simple filter terms */\n\tsimpleFilter?: FilterTerm[]\n}\n", "import type { Filter } from '../filter.ts'\nimport type { TermWrapper } from '../terms/tw.ts'\n\nexport type DescrStatsRequest = {\n\t/** genome label in the serverconfig.json */\n\tgenome: string\n\t/** dataset label for the given genome */\n\tdslabel: string\n\tembedder: string\n\t/** wrapper of a numeric term, q.mode can be any as getData() will always pull sample-level values for summarizing */\n\ttw: TermWrapper\n\t/** if true, the (violin) plot is in log scale and must exclude 0-values from the stat */\n\tlogScale?: boolean\n\t/** optional pp filter */\n\tfilter?: Filter\n\t/** optional gdc filter */\n\tfilter0?: any\n}\n\nexport type DescrStats = {\n\t[key: string]: {\n\t\tkey: string\n\t\tlabel: string\n\t\tvalue: number\n\t}\n}\n\nexport type DescrStatsResponse = DescrStats\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const descrStatsPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'DescrStatsRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'DescrStatsResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\ttw: { term: { id: 'hrtavg' }, q: { mode: 'continuous' } },\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\ttype: 'tvslst',\n\t\t\t\t\t\tin: true,\n\t\t\t\t\t\tjoin: '',\n\t\t\t\t\t\tlst: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttag: 'cohortFilter',\n\t\t\t\t\t\t\t\ttype: 'tvs',\n\t\t\t\t\t\t\t\ttvs: {\n\t\t\t\t\t\t\t\t\tterm: {\n\t\t\t\t\t\t\t\t\t\tname: 'Cohort',\n\t\t\t\t\t\t\t\t\t\ttype: 'categorical',\n\t\t\t\t\t\t\t\t\t\tvalues: { ABC: { label: 'ABC' }, XYZ: { label: 'XYZ' } },\n\t\t\t\t\t\t\t\t\t\tid: 'subcohort',\n\t\t\t\t\t\t\t\t\t\tisleaf: false,\n\t\t\t\t\t\t\t\t\t\tgroupsetting: { disabled: true }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} // satisfies DescrStatsRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { Filter } from '../filter.ts'\nimport type { Term } from '../terms/term.ts'\n\nexport type PercentileRequest = {\n\t/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */\n\tgenome: string\n\t/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */\n\tdslabel: string\n\tembedder: string\n\tgetpercentile: number[]\n\t/** term id string */\n\tterm: Term\n\tfilter?: Filter\n\tfilter0?: any\n}\n\nexport type PercentileResponse = {\n\tvalues: number[]\n}\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const percentilePayloadExamples = {\n\trequest: {\n\t\ttypeId: 'PercentileRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'PercentileResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\tgetpercentile: [50],\n\t\t\t\t\tterm: { id: 'agedx' },\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\ttype: 'tvslst',\n\t\t\t\t\t\tin: true,\n\t\t\t\t\t\tjoin: '',\n\t\t\t\t\t\tlst: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttag: 'cohortFilter',\n\t\t\t\t\t\t\t\ttype: 'tvs',\n\t\t\t\t\t\t\t\ttvs: {\n\t\t\t\t\t\t\t\t\tterm: {\n\t\t\t\t\t\t\t\t\t\tname: 'Cohort',\n\t\t\t\t\t\t\t\t\t\ttype: 'categorical',\n\t\t\t\t\t\t\t\t\t\tvalues: { ABC: { label: 'ABC' }, XYZ: { label: 'XYZ' } },\n\t\t\t\t\t\t\t\t\t\tid: 'subcohort',\n\t\t\t\t\t\t\t\t\t\tisleaf: false,\n\t\t\t\t\t\t\t\t\t\tgroupsetting: { disabled: true }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} // satisfies PercentileRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "export type RunChartRequest = {\n\tgenome: string\n\tdslabel: string\n\t/**\n\t * term wrapper for x axis: { term, q }.\n\t * runChart2: q.mode='continuous' \u2192 1 series.\n\t * runChart2Period: q.mode='discrete' (with bins) \u2192 multiple series by period.\n\t */\n\txtw: { term: { id: string }; q?: { mode?: 'continuous' | 'discrete' }; $id?: string }\n\t/** term wrapper for y axis: { term, q }. When omitted, chart renders as frequency (count per time bucket). */\n\tytw?: { term: { id: string }; q?: { mode?: string }; $id?: string }\n\taggregation?: 'median'\n\t/** When true (frequency mode only), series Y values are cumulative counts. */\n\tshowCumulativeFrequency?: boolean\n\tfilter?: any\n\t__protected__?: any // auth token for accessing protected data\n}\n\nexport type RunChartSeries = {\n\t/** period/series identifier */\n\tseriesId?: string\n\t/** calculated Y median value for this curve */\n\tmedian: number\n\tpoints: Point[]\n}\n\nexport type RunChartSuccessResponse = {\n\tstatus: 'ok'\n\t/** each series is one curve, with a median. a runchart may show 1 or multiple curves */\n\tseries: RunChartSeries[]\n}\n\nexport type RunChartErrorResponse = {\n\terror: string\n\t/** Always empty on error; present so response shape is consistent for clients/checkers. */\n\tseries: RunChartSeries[]\n}\n\n/** Discriminated union: server returns success shape on 200 or error shape with series: []. */\nexport type RunChartResponse = RunChartSuccessResponse | RunChartErrorResponse\n\nexport function isRunChartSuccess(r: RunChartResponse): r is RunChartSuccessResponse {\n\treturn 'status' in r && r.status === 'ok'\n}\n\ntype Point = {\n\t/** decimal year, e.g. 2024.21321321 */\n\tx: number\n\t/** text of human-readable x value, e.g. \"Jan 2024\" which may be by the months, depends on dataset customization */\n\txName: string\n\t/** timeline, e.g. number of days */\n\ty: number\n\t/** number of samples with this timeline at this time point */\n\tsampleCount: number\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n", "export type RootTermRequest = {\n\t/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */\n\tgenome: string\n\t/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */\n\tdslabel: string\n\tembedder: string\n\tdefault_rootterm: number\n\tcohortValues: string\n\ttreeFilter: string\n}\n\ninterface Entries {\n\tname: string\n\tid: string\n\tisleaf: boolean\n\tincluded_types: string[]\n\tchild_types: string[]\n}\n\nexport type RootTermResponse = {\n\tlst: Entries[]\n}\n\nexport const rootTermPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'RootTermRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'RootTermResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\tdefault_rootterm: 1,\n\t\t\t\t\tcohortValues: 'ABC'\n\t\t\t\t} // satisfies RootTermRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "export type TermChildrenRequest = {\n\t/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */\n\tgenome: string\n\t/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */\n\tdslabel: string\n\tembedder: string\n\tget_children: number\n\tcohortValues?: string\n\ttid: string\n}\n\ninterface Entries {\n\tname: string\n\tid: string\n\tisleaf: boolean\n\tincluded_types: string[]\n\tchild_types: string[]\n}\n\nexport type TermChildrenResponse = {\n\tlst: Entries[]\n}\n\nexport const termChildrenPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'TermChildrenRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'TermChildrenResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\tget_children: 1,\n\t\t\t\t\tcohortValues: 'ABC',\n\t\t\t\t\ttid: 'GO:0000001'\n\t\t\t\t} satisfies TermChildrenRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { TermWrapper } from '../terms/tw.ts'\nimport type { Filter } from '../filter.ts'\nimport type { ErrorResponse } from './errorResponse.ts'\nimport type { DescrStats } from './termdb.descrstats.ts'\n\n/** Common properties shared by both violin and box plots */\ntype CommonProps = {\n\t/** numeric tw to fetch numeric data. tw.q.mode must be continuous */\n\ttw: TermWrapper\n\tdslabel: string\n\tgenome: string\n\t/** overlay tw for multiple violins/boxplots */\n\toverlayTw?: TermWrapper\n\t/** tw to divide to multiple charts */\n\tdivideTw?: TermWrapper\n\t/** mass filter */\n\tfilter?: Filter\n\t/** read-only invisible filter */\n\tfilter0?: any\n\t/** TODO: Needs description FIXME delete */\n\tcurrentGeneNames?: string[]\n\t/** if true, use log scale; if false or undefined, use linear scale */\n\tisLogScale?: boolean\n}\n\n/** Request type for violin plots with required violin-specific parameters */\nexport type ViolinRequest = CommonProps & {\n\t/** Indicates the type of chart to render */\n\tplotType: 'violin'\n\t/** A number representing the dimension perpendicular to the violin spread */\n\taxisHeight?: number\n\t/** A string representing the type of symbol used on the plot */\n\tdatasymbol?: string\n\t/** A number representing the device's pixel ratio */\n\tdevicePixelRatio: number\n\t/** If true, uses KDE method to build plot */\n\tisKDE?: boolean\n\t/** A string with two possible values: 'horizontal' or 'vertical' */\n\torientation: string\n\t/** A number representing the radius of the data symbols */\n\tradius: number\n\t/** A number representing the right margin */\n\trightMargin?: number\n\t/** Term may be scaled from regression analysis */\n\tscale?: any\n\t/** A number representing the width of the stroke */\n\tstrokeWidth?: number\n\t/** A number representing the width of the SVG box */\n\tsvgw: number\n\t/** Number of bins to build the plot. Default is 20. */\n\tticks?: number\n}\n\n/** Request type for box plots with required box-specific parameters */\nexport type BoxRequest = CommonProps & {\n\t/** Indicates the type of chart to render */\n\tplotType: 'box'\n\t/** sort plots by median value */\n\torderByMedian?: boolean\n\t/** Remove outliers from the plot */\n\tremoveOutliers?: boolean\n\t/** If true, show association tests table */\n\tshowAssocTests?: boolean\n}\n\n/**Unified request type for violin and boxplot - union of ViolinRequest and BoxRequest */\nexport type ViolinBoxRequest = ViolinRequest | BoxRequest\n\nexport type ViolinBoxResponse = ViolinResponse | BoxPlotResponse | ErrorResponse\n\n/** Type guard to check if response is an ErrorResponse */\nexport function isErrorResponse(response: ViolinBoxResponse): response is ErrorResponse {\n\treturn 'error' in response && 'status' in response\n}\n\n/** Type guard to check if response is a BoxPlotResponse */\nexport function isBoxPlotResponse(response: ViolinBoxResponse): response is BoxPlotResponse {\n\treturn !isErrorResponse(response) && 'charts' in response && 'descrStats' in response\n}\n\n/** Type guard to check if response is a ViolinResponse */\nexport function isViolinResponse(response: ViolinBoxResponse): response is ViolinResponse {\n\treturn !isErrorResponse(response) && 'min' in response && 'max' in response\n}\n\n/** Violin response types */\ninterface BinsEntries {\n\tx0: number\n\tx1: number\n\tdensity: number\n}\n\ninterface ValuesEntries {\n\tid: string\n\tlabel: string\n\tvalue: number\n}\n\ninterface PValueEntries {\n\tvalue?: string\n\thtml?: string\n}\n\ntype ViolinDensity = {\n\tbins: BinsEntries[]\n\tdensityMax: number\n\tdensityMin: number\n}\n\nexport type ViolinPlotEntry = {\n\tcolor: string\n\tchartId: string\n\tdensity: ViolinDensity\n\tlabel: string\n\tplotValueCount: number\n\tseriesId: string\n\tsrc: string\n\tsummaryStats: ValuesEntries[]\n}\n\nexport type ViolinResponse = {\n\tbins: { [index: string]: any }\n\tcharts: {\n\t\t[index: string]: {\n\t\t\tchartId: string\n\t\t\tplots: ViolinPlotEntry[]\n\t\t\tpvalues?: PValueEntries[][]\n\t\t}\n\t}\n\tmin: number\n\tmax: number\n\tuncomputableValues: { [index: string]: number }[] | null\n\tdescrStats?: DescrStats\n}\n\n/** Boxplot response types */\nexport type BoxPlotData = {\n\tw1: number | undefined\n\tw2: number | undefined\n\tp05: number\n\tp25: number\n\tp50: number\n\tp75: number\n\tp95: number\n\tiqr: number\n\tout: { value: number }[]\n}\n\nexport type BoxPlotEntry = {\n\tboxplot: BoxPlotData & { label: string }\n\tcolor?: string\n\tdescrStats: DescrStats\n\tisHidden?: boolean\n\tkey: string\n\tseriesId?: string\n}\n\nexport type BoxPlotChartEntry = {\n\tchartId: string\n\tplots: BoxPlotEntry[]\n\tsampleCount: number\n\twilcoxon?: [{ value: string }, { value: string }, { html: string }][]\n}\n\nexport type BoxPlotResponse = {\n\tabsMin?: number\n\tabsMax?: number\n\tbins?: {\n\t\t[index: string]: any\n\t}\n\tcharts: {\n\t\t[chartId: string]: BoxPlotChartEntry\n\t}\n\tdescrStats: DescrStats\n\tuncomputableValues: { label: string; value: number }[] | null\n}\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const violinBoxPayload = {\n\trequest: {\n\t\ttypeId: 'ViolinBoxRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'ViolinBoxResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tplotType: 'violin',\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\ttw: {\n\t\t\t\t\t\tterm: { id: 'aaclassic_5', type: 'float' },\n\t\t\t\t\t\tq: { mode: 'continuous' }\n\t\t\t\t\t},\n\t\t\t\t\tdevicePixelRatio: 2,\n\t\t\t\t\tsvgw: 200,\n\t\t\t\t\torientation: 'horizontal',\n\t\t\t\t\tdatasymbol: 'rug',\n\t\t\t\t\tradius: 5,\n\t\t\t\t\tisLogScale: false\n\t\t\t\t} // satisfies ViolinBoxRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tplotType: 'box',\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\ttw: {\n\t\t\t\t\t\tterm: { id: 'agedx', type: 'float' },\n\t\t\t\t\t\tq: { mode: 'continuous' }\n\t\t\t\t\t},\n\t\t\t\t\toverlayTw: {\n\t\t\t\t\t\tterm: { id: 'sex', type: 'categorical' }\n\t\t\t\t\t},\n\t\t\t\t\torderByMedian: true\n\t\t\t\t} // satisfies ViolinBoxRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "export const CATEGORICAL = 'categorical'\nexport const CONDITION = 'condition'\nexport const DATE = 'date'\nexport const DNA_METHYLATION = 'dnaMethylation'\nexport const FLOAT = 'float'\nexport const GENE_VARIANT = 'geneVariant'\nexport const GENE_EXPRESSION = 'geneExpression'\nexport const ISOFORM_EXPRESSION = 'isoformExpression'\nexport const INTEGER = 'integer'\nexport const METABOLITE_INTENSITY = 'metaboliteIntensity'\nexport const MULTIVALUE = 'multivalue'\nexport const SAMPLELST = 'samplelst'\nexport const SINGLECELL_CELLTYPE = 'singleCellCellType'\nexport const SINGLECELL_GENE_EXPRESSION = 'singleCellGeneExpression'\nexport const SNP = 'snp'\nexport const SNP_LIST = 'snplst'\nexport const SNP_LOCUS = 'snplocus'\nexport const SSGSEA = 'ssGSEA'\nexport const SURVIVAL = 'survival'\nexport const TERM_COLLECTION = 'termCollection'\nexport const PROTEOME_ABUNDANCE = 'proteomeAbundance'\nexport const PROTEOME_DAP = 'proteomeDAP'\n\n//Term types should be used gradually using these constants instead of hardcoding the values,\n// eg: type == CATEGORICAL instead of type == 'categorical'\nexport const TermTypes: { [key: string]: string } = {\n\tGENE_VARIANT,\n\tGENE_EXPRESSION,\n\tISOFORM_EXPRESSION,\n\tSSGSEA,\n\tDNA_METHYLATION,\n\tCATEGORICAL,\n\tINTEGER,\n\tFLOAT,\n\tSNP,\n\tSNP_LIST,\n\tSNP_LOCUS,\n\tCONDITION,\n\tSURVIVAL,\n\tSAMPLELST,\n\tMETABOLITE_INTENSITY,\n\tPROTEOME_ABUNDANCE,\n\tSINGLECELL_CELLTYPE,\n\tSINGLECELL_GENE_EXPRESSION,\n\tMULTIVALUE,\n\tDATE,\n\tTERM_COLLECTION\n}\n"],
5
- "mappings": ";AAEO,IAAM,aAAa;AAAA,EACzB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACV;AAIO,IAAM,kBAAkB;AAAA,EAC9B,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,YAAY;AACb;AAIO,IAAM,oBAAoB;AAAA,EAChC,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AACb;AAIO,IAAM,qBAAqB;AAAA,EACjC,CAAC,WAAW,MAAM,GAAG;AAAA,EACrB,CAAC,WAAW,OAAO,GAA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AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
3
+ "sources": ["../src/routes/aiProjectSelectedWSImages.ts", "../src/routes/hicgenome.ts", "../src/routes/samplewsimages.ts", "../src/routes/termdb.bubbleHeatmap.ts", "../src/routes/termdb.categories.ts", "../src/routes/termdb.chat.ts", "../src/routes/termdb.descrstats.ts", "../src/routes/termdb.percentile.ts", "../src/routes/termdb.runChart.ts", "../src/routes/termdb.rootterm.ts", "../src/routes/termdb.termchildren.ts", "../src/routes/termdb.singleCellPlots.ts", "../src/routes/termdb.violinBox.ts", "../src/terms/constants.ts"],
4
+ "sourcesContent": ["import type { WSImage } from './samplewsimages.ts'\n\nexport const FlagStatus = {\n\tNormal: 0,\n\tSkipped: 1,\n\tFlagged: 2,\n\tDeleted: 3\n} as const\n// These are action that will change the active index/highlight for the table in AIHAL project\nexport type ProvokingActions = 'annotation' | 'delete' | 'skipping' | 'flagging'\nexport type FlagStatusValues = (typeof FlagStatus)[keyof typeof FlagStatus]\n\nexport const FeaturePrefixes = {\n\tStar: 'annotation-star-',\n\tSquare: 'annotation-square-',\n\tBorder: 'annotation-border-',\n\tPredBorder: 'prediction-border-'\n} as const\n\nexport type FeaturePrefixValues = (typeof FeaturePrefixes)[keyof typeof FeaturePrefixes]\n\nexport const SelectionPrefixes = {\n\tTileSelection: 'ts_',\n\tPrediction: 'pred_',\n\tAnnotation: 'anno_'\n} as const\n\nexport type SelectionPrefixValues = (typeof SelectionPrefixes)[keyof typeof SelectionPrefixes]\n\nexport const FlagStatusMessages = {\n\t[FlagStatus.Normal]: '',\n\t[FlagStatus.Skipped]: '(Skipped)',\n\t[FlagStatus.Flagged]: '(Flagged)'\n\t// Didn't add Deleted to FlagStatusMessages because deleted annotations dont exist\n\t// and deleted predictons are filtered out in proteinpaint/server/routes/aiProjectSelectedWSImages.ts around line 119\n}\n\nexport type AiProjectSelectedWSImagesRequest = {\n\tgenome: string\n\tdslabel: string\n\tprojectId: number\n\twsimagesFilenames: Array<string>\n}\n\nexport type AiProjectSelectedWSImagesResponse = {\n\t// TODO create a type for WSImage with AI project specific fields\n\twsimages: WSImage[]\n}\n\nexport interface FlagPredictionInfo {\n\tflag: FlagStatusValues\n\ttimestamp: string\n}\n\n// TODO move to another class\nexport interface TileSelection {\n\tzoomCoordinates: [number, number]\n\tclass?: string\n\tflag: FlagStatusValues\n\tid: string\n\ttimestamp: string\n}\n\nexport interface Annotation extends TileSelection {\n\tclass: string\n}\n\nexport interface Prediction extends TileSelection {\n\tclass: string\n\tuncertainty: number\n}\n\nexport function createSelectionID(prefix: SelectionPrefixValues, coordinates: [number, number]): string {\n\treturn prefix + JSON.stringify(coordinates)\n}\n\nexport function checkSelectionType(tileSelection: TileSelection, suspectedPrefix: SelectionPrefixValues): boolean {\n\treturn tileSelection.id.startsWith(suspectedPrefix)\n}\n\nexport function createFeatureID(featurePrefix: FeaturePrefixValues, coords: [number, number]) {\n\treturn featurePrefix + JSON.stringify(coords)\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n", "import type { BaseHicRequest, XYZCoord } from './hicdata.ts'\n\nexport type HicGenomeRequest = BaseHicRequest & {\n\t/** Entire chromosome list read from the file (see hicstate) */\n\tchrlst: string[]\n\t/** window location */\n\tembedder: string\n\t/** whether or not the file contains 'chr' for the chromosomes */\n\tnochr: boolean\n}\n\nexport type HicGenomeResponse = {\n\tdata: {\n\t\t/** First chromosome */\n\t\tlead: string\n\t\t/** Second chromosome */\n\t\tfollow: string\n\t\titems: XYZCoord[]\n\t}[]\n\t/** Error message to display on the client, if applicable */\n\terror?: string\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n// The example below will not work in github CI where only termdb test\nexport const hicGenomePayloadExample = {\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\turl: 'https://proteinpaint.stjude.org/ppdemo/hg19/hic/hic_demo.hic',\n\t\t\t\t\tmatrixType: 'observed',\n\t\t\t\t\tnmeth: 'NONE',\n\t\t\t\t\tpos1: '3',\n\t\t\t\t\tpos2: '2',\n\t\t\t\t\tresolution: 1000000\n\t\t\t\t} // satisfies HicGenomeRequest // TODO: fix the type or example\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { WSIClass } from '../dataset.ts'\nimport type { Annotation, Prediction } from './aiProjectSelectedWSImages.ts'\n\nexport type SampleWSImagesRequest = {\n\tgenome: string\n\tdslabel: string\n\tsample_id: string\n\twsimage: string\n}\n\nexport type SampleWSImagesResponse = {\n\tsampleWSImages: WSImage[]\n}\n\nexport class WSImage {\n\tid?: number\n\tfilename: string\n\tmetadata?: string\n\tpredictionLayers?: Array<string>\n\tannotations?: Array<Annotation>\n\tpredictions?: Array<Prediction>\n\tclasses?: Array<WSIClass>\n\t/** ds defined uncertainity labels and colors */\n\tuncertainty?: any\n\t/** Color to highlight active patches */\n\tactivePatchColor?: string\n\t/** Tile size in pixels needed for AI scripts */\n\ttileSize?: number\n\n\tconstructor(filename: string) {\n\t\tthis.filename = filename\n\t}\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n", "import type { ErrorResponse } from './errorResponse.ts'\n\nexport type BubbleHeatmapRequest = {\n\tgenome: string\n\tdslabel: string\n\tgene: string\n}\n\n/** One modification site (PTM) or one protein-level measurement (whole/insoluble\n * proteome). PTM cells carry many of these; protein-level cells carry exactly one. */\nexport type BubbleSite = {\n\t/** site identifier \u2014 the DAPfile `identifier` column (modified peptide for PTM,\n\t * e.g. `K.VAVVRT%PPKSPSS*AK.S`; protein id for protein-level rows) */\n\tid: string\n\t/** raw per-site log2 fold change from the DAPfile */\n\tlog2FC: number\n\t/** raw per-site p-value from the DAPfile */\n\tp_value: number\n\t/** true when p_value < the response's pValueThreshold; non-significant sites\n\t * are still returned (the client draws non-significant protein-level dots faded\n\t * and hides non-significant PTM sites) */\n\tsignificant: boolean\n\t/** matched reference-assay (total protein) log2FC for this protein (base UniProt\n\t * acc) + cohort, if available */\n\tproteinLog2FC?: number\n\t/** protein-abundance-adjusted change = log2FC \u2212 proteinLog2FC (point estimate),\n\t * present only when proteinLog2FC is available */\n\tadjustedLog2FC?: number\n\t/** true when a matched protein value existed and adjustedLog2FC was computed */\n\tadjustedAvailable: boolean\n}\n\nexport type BubbleCell = {\n\t/** all sites for this (acc, assay, cohort); one entry for protein-level assays */\n\tsites: BubbleSite[]\n}\n\nexport type BubbleHeatmapIsoform = {\n\tgene_name: string\n\t/** data[assay][cohort] \u2192 cell (omitted when the cohort doesn't exist under the\n\t * assay or the gene has no row in that DAPfile) */\n\tdata: {\n\t\t[assay: string]: {\n\t\t\t[cohort: string]: BubbleCell\n\t\t}\n\t}\n}\n\nexport type BubbleHeatmapResponse =\n\t| ErrorResponse\n\t| {\n\t\t\tisoforms: { [isoformId: string]: BubbleHeatmapIsoform }\n\t\t\t/** subset of `assays` that are PTM assays \u2014 rendered as multiple small\n\t\t\t * per-site dots; the rest render as a single big dot per cell */\n\t\t\tptmAssays: string[]\n\t\t\t/** Row order */\n\t\t\tassays: string[]\n\t\t\t/** Column order */\n\t\t\tcohorts: string[]\n\t\t\t/** raw p-value threshold below which a site is significant. Sites with\n\t\t\t * p \u2265 threshold are still returned with `significant: false`; the client\n\t\t\t * draws non-significant protein-level dots faded and omits non-significant\n\t\t\t * PTM sites. */\n\t\t\tpValueThreshold: number\n\t\t\t/** assay used as the total-protein baseline for protein-abundance\n\t\t\t * adjustment, or null when adjustment is not configured for this dataset */\n\t\t\tproteinReferenceAssay: string | null\n\t }\n\nexport const bubbleHeatmapPayload = {\n\trequest: { typeId: 'BubbleHeatmapRequest' },\n\tresponse: { typeId: 'BubbleHeatmapResponse' }\n}\n", "import type { Filter } from '../filter.ts'\nimport type { TermWrapper } from '../terms/tw.ts'\n\nexport type CategoriesRequest = {\n\tgenome: string\n\tdslabel: string\n\tembedder: string\n\t/** termwrapper object */\n\ttw: TermWrapper\n\tfilter?: Filter\n\tfilter0?: any\n\t/** quick fix only for gdc */\n\tcurrentGeneNames?: string[]\n\t/** optional property added by mds3 tk, to limit to cases mutated in this region */\n\trglst?: any\n}\n\ninterface Entries {\n\tsamplecount: number\n\tkey: string\n\tlabel: string\n}\n\nexport type CategoriesResponse = {\n\tlst: Entries[]\n\torderedLabels?: []\n}\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const termdbCategoriesPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'CategoriesRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'CategoriesResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\ttw: { id: 'diaggrp' },\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\ttype: 'tvslst',\n\t\t\t\t\t\tin: true,\n\t\t\t\t\t\tjoin: '',\n\t\t\t\t\t\tlst: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//tag: 'cohortFilter',\n\t\t\t\t\t\t\t\ttype: 'tvs',\n\t\t\t\t\t\t\t\ttvs: {\n\t\t\t\t\t\t\t\t\tterm: {\n\t\t\t\t\t\t\t\t\t\tname: 'Cohort',\n\t\t\t\t\t\t\t\t\t\ttype: 'categorical',\n\t\t\t\t\t\t\t\t\t\tvalues: { ABC: { label: 'ABC' }, XYZ: { label: 'XYZ' } },\n\t\t\t\t\t\t\t\t\t\tid: 'subcohort',\n\t\t\t\t\t\t\t\t\t\tisleaf: false,\n\t\t\t\t\t\t\t\t\t\tgroupsetting: { disabled: true }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} // satisfies CategoriesRequest // TODO: use the type definition\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { TermTypes } from '../terms/constants.ts'\nimport type { Filter } from '../filter.ts'\n\n/** */\n// Helps track ambiguous points in the LLM reasoning process for debugging and improvement purposes.\n// Create a fresh array per request/pipeline run to avoid sharing mutable state across module consumers.\nexport const createAmbiguousPoints = (): string[] => []\n\nexport type ChatRequest = {\n\tgenome: string\n\tdslabel: string\n\tfilter?: Filter\n\t/** user prompt */\n\tprompt: string\n\t__protected__?: any\n}\n\nexport type TextResponse = {\n\ttype: 'text'\n\t/** Plain text message to display in the chat */\n\ttext: string\n}\nexport type HtmlResponse = {\n\ttype: 'html'\n\t/** Pre-approved HTML from the dataset JSON resources array */\n\thtml: string\n}\nexport type PlotResponse = {\n\ttype: 'plot'\n\tplot: object\n\tmsg?: string\n\t/** Specifies what action to take e.g. Summary plot or no action. Will add more chart types later */\n}\n\nexport type LlmConfig = {\n\tprovider: 'SJ' | 'ollama' | 'huggingface' | 'azure'\n\tEmbeddingProvider: 'SJ' | 'ollama' | 'huggingface'\n\tEmbeddingProviderApi: string\n\tapi: string\n\tapiToken?: string\n\tEmbeddingProviderApiToken?: string\n\tmodelName: string\n\tembeddingModelName: string\n\t/** Whether to load the embedding model locally (via transformers.js) or call a remote API. Defaults to 'api'. */\n\tembeddingModelAccess?: 'local' | 'api'\n\t/** Smaller model to use for LLM classification fallback. Defaults to modelName if not set. */\n\tclassifierModelName?: string\n\t/** Log verbose debug output (e.g. raw embedding arrays) to the terminal. Defaults to false. */\n\tverbose?: boolean\n}\n\nexport interface GeneDataTypeResult {\n\tgene: string\n\tdataType: string\n}\n\nexport interface GeneSetDataTypeResult {\n\tgeneSet: string\n\tdataType: typeof TermTypes.SSGSEA | typeof TermTypes.GENE_VARIANT | 'ambiguous' | typeof TermTypes.GENE_EXPRESSION\n}\n\nexport type ChatResponse = TextResponse | HtmlResponse | PlotResponse\n\nexport type SummaryType = {\n\t/** Name of 1st term */\n\tterm: string\n\t/** Name of 2nd term */\n\tterm2?: string\n\t/** Optional simple filter terms */\n\tsimpleFilter: FilterTerm[]\n\t/** Optional explicit child type requested by the user. If omitted, the logic of the data types picks the child type. */\n\tchildType?: 'violin' | 'boxplot' | 'sampleScatter' | 'barchart'\n}\n\nexport type FilterTerm =\n\t| CategoricalFilterTerm\n\t| NumericFilterTerm /** FilterTerm can either be numeric or categorical */\n\nexport type CategoricalFilterTerm = {\n\t/** Name of categorical term */\n\tterm: string\n\t/** The category of the term */\n\tcategory: string\n\t/** join term to be used only when there is more than one filter term and should be placed from the 2nd filter term onwards describing how it connects to the previous term */\n\tjoin?: 'and' | 'or'\n}\n\nexport type NumericFilterTerm = {\n\t/** Name of numeric term */\n\tterm: string\n\t/** start position (or lower limit) of numeric term */\n\tstart?: number\n\t/** stop position (or upper limit) of numeric term */\n\tstop?: number\n\t/** join term to be used only when there is more than one filter term and should be placed from the 2nd filter term onwards describing how it connects to the previous term */\n\tjoin?: 'and' | 'or'\n}\n\nexport type DbRows = {\n\t/** Name of the term */\n\tname: string\n\t/** Description of the term in plain language */\n\tdescription: string\n\t/** The type of variable stored in the DB (e.g. categorical, float) */\n\tterm_type: string\n\t/** Array of {key,value} terms storing the possible categories for a categorical variable */\n\tvalues: DbValue[]\n}\n\nexport type DbValue = {\n\t/** Name of the key */\n\tkey: string\n\t/** Object of values corresponding to the key */\n\tvalue: any\n}\n\nexport type ClassificationType =\n\t| plot_type\n\t| resource_type\n\t| none_type /** Variable containing the type of action the UI needs to take */\n\nexport type plot_type = {\n\t/** When type == plot, show the corresponding plot in the plot field */\n\ttype: 'plot'\n\t/** The type of plot to be displayed on the UI.\n\t * Standard categories are listed; datasets may define additional custom categories. */\n\tplot: 'summary' | 'dge' | 'survival' | 'matrix' | 'sampleScatter' | 'hierCluster' | 'genomeBrowser'\n}\n\nexport type resource_type = {\n\t/** When type == resource, invoke the resource agent to return a matching resource link */\n\ttype: 'resource'\n}\n\nexport type none_type = {\n\t/** When type == none, the query did not match any known category */\n\ttype: 'none'\n}\n\n/** Top-level classification returned by classifyQuery: plot or notplot (subtype determined separately by plot.ts) */\nexport type QueryClassification = { type: 'plot' } | { type: 'notplot' } | { type: 'binaryQuery' }\n\n/** Specific plot type returned by classifyPlotType in plot.ts */\nexport type PlotType = 'summary' | 'dge' | 'survival' | 'matrix' | 'prebuiltscatter' | 'hiercluster' | 'genomeBrowser'\n\nexport type DEType = {\n\t/** Name of group1 which is an array of filter terms */\n\tgroup1: FilterTerm[]\n\t/** Name of group2 which is an array of filter terms */\n\tgroup2: FilterTerm[]\n\t/** Method used for carrying out differential gene expression analysis */\n\tmethod?: 'edgeR' | 'limma' | 'wilcoxon'\n}\n\nexport type MatrixType = {\n\t/** Names of dictionary terms to include as rows in the matrix (e.g. \"Diagnosis\", \"Gender\", \"Race\") */\n\tterms?: string[]\n\t/** Names of genes to include as gene variant rows in the matrix (e.g. \"TP53\", \"KRAS\", \"NRAS\") */\n\tgeneNames?: string[]\n\t/** Names of gene sets containing ssGSEA enrichment scores */\n\tgenesetNames?: string[]\n\t/** Optional simple filter terms to restrict the sample set */\n\tsimpleFilter?: FilterTerm[]\n}\n\nexport type HierClusterType = {\n\t/** Names of genes to include in the hierarchical clustering (e.g. \"TP53\", \"KRAS\", \"BCR\") */\n\tgeneNames?: string[]\n\t/** Names of gene sets containing list of genes to be used for hierarchical clustering */\n\tgenesetNames?: string[]\n\t/** Optional simple filter terms to restrict the sample set */\n\tsimpleFilter?: FilterTerm[]\n}\n\nexport type SampleScatterType = {\n\t/** Name of the pre-built plot (e.g. \"Transcriptome t-SNE\", \"Transcriptome UMAP\") */\n\tplotName: string\n\t/** Term or gene name to overlay as color, or null to remove color overlay */\n\tcolorTW?: string | null\n\t/** Term or gene name to overlay as shape, or null to remove shape overlay */\n\tshapeTW?: string | null\n\t/** Term or gene name to overlay as Z-divide, or null to remove divide overlay */\n\tterm0?: string | null\n\t/** Optional simple filter terms */\n\tsimpleFilter?: FilterTerm[]\n}\n", "import type { Filter } from '../filter.ts'\nimport type { TermWrapper } from '../terms/tw.ts'\n\nexport type DescrStatsRequest = {\n\t/** genome label in the serverconfig.json */\n\tgenome: string\n\t/** dataset label for the given genome */\n\tdslabel: string\n\t// embedder: string\n\t/** wrapper of a numeric term, q.mode can be any as getData() will always pull sample-level values for summarizing */\n\ttw: TermWrapper\n\t/** if true, the (violin) plot is in log scale and must exclude 0-values from the stat */\n\tlogScale?: boolean\n\t/** optional pp filter */\n\tfilter?: Filter\n\t/** optional gdc filter */\n\tfilter0?: any\n}\n\nexport type DescrStats = {\n\t[key: string]: {\n\t\tkey: string\n\t\tlabel: string\n\t\tvalue: number\n\t}\n}\n\nexport type DescrStatsResponse = DescrStats\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const descrStatsPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'DescrStatsRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'DescrStatsResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\ttw: { term: { id: 'hrtavg' }, q: { mode: 'continuous' } },\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\ttype: 'tvslst',\n\t\t\t\t\t\tin: true,\n\t\t\t\t\t\tjoin: '',\n\t\t\t\t\t\tlst: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttag: 'cohortFilter',\n\t\t\t\t\t\t\t\ttype: 'tvs',\n\t\t\t\t\t\t\t\ttvs: {\n\t\t\t\t\t\t\t\t\tterm: {\n\t\t\t\t\t\t\t\t\t\tname: 'Cohort',\n\t\t\t\t\t\t\t\t\t\ttype: 'categorical',\n\t\t\t\t\t\t\t\t\t\tvalues: { ABC: { label: 'ABC' }, XYZ: { label: 'XYZ' } },\n\t\t\t\t\t\t\t\t\t\tid: 'subcohort',\n\t\t\t\t\t\t\t\t\t\tisleaf: false,\n\t\t\t\t\t\t\t\t\t\tgroupsetting: { disabled: true }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} // satisfies DescrStatsRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { Filter } from '../filter.ts'\nimport type { Term } from '../terms/term.ts'\n\nexport type PercentileRequest = {\n\t/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */\n\tgenome: string\n\t/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */\n\tdslabel: string\n\tembedder: string\n\tgetpercentile: number[]\n\t/** term id string */\n\tterm: Term\n\tfilter?: Filter\n\tfilter0?: any\n}\n\nexport type PercentileResponse = {\n\tvalues: number[]\n}\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const percentilePayloadExamples = {\n\trequest: {\n\t\ttypeId: 'PercentileRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'PercentileResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\tgetpercentile: [50],\n\t\t\t\t\tterm: { id: 'agedx' },\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\ttype: 'tvslst',\n\t\t\t\t\t\tin: true,\n\t\t\t\t\t\tjoin: '',\n\t\t\t\t\t\tlst: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttag: 'cohortFilter',\n\t\t\t\t\t\t\t\ttype: 'tvs',\n\t\t\t\t\t\t\t\ttvs: {\n\t\t\t\t\t\t\t\t\tterm: {\n\t\t\t\t\t\t\t\t\t\tname: 'Cohort',\n\t\t\t\t\t\t\t\t\t\ttype: 'categorical',\n\t\t\t\t\t\t\t\t\t\tvalues: { ABC: { label: 'ABC' }, XYZ: { label: 'XYZ' } },\n\t\t\t\t\t\t\t\t\t\tid: 'subcohort',\n\t\t\t\t\t\t\t\t\t\tisleaf: false,\n\t\t\t\t\t\t\t\t\t\tgroupsetting: { disabled: true }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} // satisfies PercentileRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "export type RunChartRequest = {\n\tgenome: string\n\tdslabel: string\n\t/**\n\t * term wrapper for x axis: { term, q }.\n\t * runChart2: q.mode='continuous' \u2192 1 series.\n\t * runChart2Period: q.mode='discrete' (with bins) \u2192 multiple series by period.\n\t */\n\txtw: { term: { id: string }; q?: { mode?: 'continuous' | 'discrete' }; $id?: string }\n\t/** term wrapper for y axis: { term, q }. When omitted, chart renders as frequency (count per time bucket). */\n\tytw?: { term: { id: string }; q?: { mode?: string }; $id?: string }\n\taggregation?: 'median'\n\t/** When true (frequency mode only), series Y values are cumulative counts. */\n\tshowCumulativeFrequency?: boolean\n\tfilter?: any\n\t__protected__?: any // auth token for accessing protected data\n}\n\nexport type RunChartSeries = {\n\t/** period/series identifier */\n\tseriesId?: string\n\t/** calculated Y median value for this curve */\n\tmedian: number\n\tpoints: Point[]\n}\n\nexport type RunChartSuccessResponse = {\n\tstatus: 'ok'\n\t/** each series is one curve, with a median. a runchart may show 1 or multiple curves */\n\tseries: RunChartSeries[]\n}\n\nexport type RunChartErrorResponse = {\n\terror: string\n\t/** Always empty on error; present so response shape is consistent for clients/checkers. */\n\tseries: RunChartSeries[]\n}\n\n/** Discriminated union: server returns success shape on 200 or error shape with series: []. */\nexport type RunChartResponse = RunChartSuccessResponse | RunChartErrorResponse\n\nexport function isRunChartSuccess(r: RunChartResponse): r is RunChartSuccessResponse {\n\treturn 'status' in r && r.status === 'ok'\n}\n\ntype Point = {\n\t/** decimal year, e.g. 2024.21321321 */\n\tx: number\n\t/** text of human-readable x value, e.g. \"Jan 2024\" which may be by the months, depends on dataset customization */\n\txName: string\n\t/** timeline, e.g. number of days */\n\ty: number\n\t/** number of samples with this timeline at this time point */\n\tsampleCount: number\n}\n\n// TODO: write payload examples to help with automated testing and documentation, for non-prod use only\n", "export type RootTermRequest = {\n\t/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */\n\tgenome: string\n\t/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */\n\tdslabel: string\n\tembedder: string\n\tdefault_rootterm: number\n\tcohortValues: string\n\ttreeFilter: string\n}\n\ninterface Entries {\n\tname: string\n\tid: string\n\tisleaf: boolean\n\tincluded_types: string[]\n\tchild_types: string[]\n}\n\nexport type RootTermResponse = {\n\tlst: Entries[]\n}\n\nexport const rootTermPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'RootTermRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'RootTermResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\tdefault_rootterm: 1,\n\t\t\t\t\tcohortValues: 'ABC'\n\t\t\t\t} // satisfies RootTermRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "export type TermChildrenRequest = {\n\t/** a user-defined genome label in the serverconfig.json, hg38, hg19, mm10, etc */\n\tgenome: string\n\t/** a user-defined dataset label in the serverconfig.json, such as ClinVar, SJLife, GDC, etc */\n\tdslabel: string\n\tembedder: string\n\tget_children: number\n\tcohortValues?: string\n\ttid: string\n}\n\ninterface Entries {\n\tname: string\n\tid: string\n\tisleaf: boolean\n\tincluded_types: string[]\n\tchild_types: string[]\n}\n\nexport type TermChildrenResponse = {\n\tlst: Entries[]\n}\n\nexport const termChildrenPayloadExamples = {\n\trequest: {\n\t\ttypeId: 'TermChildrenRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'TermChildrenResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\tembedder: 'localhost',\n\t\t\t\t\tget_children: 1,\n\t\t\t\t\tcohortValues: 'ABC',\n\t\t\t\t\ttid: 'GO:0000001'\n\t\t\t\t} satisfies TermChildrenRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "import type { Filter } from '../filter.ts'\nimport type { ErrorResponse } from './errorResponse.ts'\nimport type { ColorLegendEntry, ShapeLegendEntry } from './termdb.sampleScatter.ts'\n\nexport type TermdbSingleCellPlotsRequest = {\n\t/** Genome id */\n\tgenome: string\n\t/** Dataset label */\n\tdslabel: string\n\tsingleCellPlot: {\n\t\t/** Name of the single cell plot type, e.g. 'umap', 'tsne' */\n\t\tname: string\n\t\tsample?: { eID?: string; sID: string }\n\t\tisMetaResult?: boolean\n\t}\n\tfilter?: Filter\n\tfilter0?: any //ds specific filter, specifically for api requests\n\t/** When sample size is too large, canvas rendering uses\n\t * these settings to control how the plot is rendered. */\n\tcanvasSettings: {\n\t\t/** Maximum number of samples to render on the client side.\n\t\t * If over the cutoff, will return an image instead of sample array.\n\t\t * Matches the maxSvgSamplesCutoff in scatter settings.*/\n\t\tcutoff: number\n\t\t/** Width of the scatter canvas */\n\t\twidth: number\n\t\t/** Height of the scatter canvas */\n\t\theight: number\n\t\t/** Radius of the points in the scatter plot. In scatter,\n\t\t * this is the setting size. */\n\t\tradius: number\n\t\t/** Default or user defined lower limit cutoff for x scale */\n\t\tminXScale: number | null\n\t\t/** Default or user defined upper limit cutoff for x scale */\n\t\tmaxXScale: number | null\n\t\t/** Default or user defined lower limit cutoff for y scale */\n\t\tminYScale: number | null\n\t\t/** Default or user defined upper limit cutoff for y scale */\n\t\tmaxYScale: number | null\n\t\t/** Default or user defined opacity for the scatter plot points */\n\t\topacity: number\n\t\t/** Required non expression color for scge plots. 'startColor' is the\n\t\t * settings key in the scatter. */\n\t\tstartColor: string\n\t\t/** Required non expression color for scge plots. 'stopColor' is the\n\t\t * settings key in the scatter. */\n\t\tstopColor: string\n\t\t/** Device pixel ratio from the client for HiDPI rendering */\n\t\tdevicePixelRatio?: number\n\t}\n\t/** Term wrapper for coloring the single cell plot */\n\tcolorTW?: any\n}\n\nexport type TermdbSingleCellPlotsResponse = ErrorResponse | ValidSingleCellPlotsResponse\n\n/** The computed coordinate and gene expression range for cells\n * returned in a single request. Scoped to the specific plot type\n * (e.g. 'umap', 'tsne') and optional sample filter \u2014 not a global\n * range across all plots or samples. Used to define axis domains\n * and color scale domains for rendering. */\nexport type SingleCellRange = {\n\t/** Minimum x coordinate across all cells in this plot response */\n\txMin: number\n\t/** Maximum x coordinate across all cells in this plot response */\n\txMax: number\n\t/** Minimum y coordinate across all cells in this plot response */\n\tyMin: number\n\t/** Maximum y coordinate across all cells in this plot response */\n\tyMax: number\n\t/** Minimum gene expression value (Infinity when no expression data) */\n\tgeMin: number\n\t/** Maximum gene expression value (-Infinity when no expression data) */\n\tgeMax: number\n}\n\n/** Returns cell data formatted in samples array for the sampleScatter */\nexport type FormattedCell2Sample = {\n\t/** Cell identifier used as the sample id */\n\tsampleId: string\n\t/** X coordinate of the cell in the plot */\n\tx: number\n\t/** Y coordinate of the cell in the plot */\n\ty: number\n\t/** Z coordinate, always 0 (2D plots only) */\n\tz: number\n\t/** Cell type or group assignment for coloring */\n\tcategory: string\n\t/** Shape key for the legend, always 'Ref' */\n\tshape: string\n\t/** Visibility state based on user-hidden categories */\n\thidden: { category: boolean }\n\t/** Gene expression value for this cell, undefined when not applicable */\n\tgeneExp: number | undefined\n}\n\nexport type SingleCellPlotDataResult = {\n\tcolorLegend: ColorLegendEntry[]\n\tshapeLegend: ShapeLegendEntry[]\n\tsamples?: FormattedCell2Sample[]\n\t/** If over the cutoff, will return image instead of sample array */\n\tsrc?: string\n\t/** css dimensions of the canvas image, used to display at\n\t * the correct size when devicePixelRatio > 1 */\n\tcanvasWidth?: number\n\tcanvasHeight?: number\n\t/** When no sample array is returned, send the total sample count for\n\t * the legend. */\n\ttotalSampleCount?: number\n}\n\nexport type ValidSingleCellPlotsResponse = {\n\trange: SingleCellRange\n\tresult: { Default: SingleCellPlotDataResult }\n}\n\nconst TermdbSingleCellPlotsRequestExample = {\n\tgenome: 'hg38-test',\n\tdslabel: 'TermdbTest',\n\tsingleCellPlot: {\n\t\tname: 'umap',\n\t\tsample: { sID: 'sample1' }\n\t},\n\tfilter: {\n\t\ttype: 'tvslst',\n\t\tin: true,\n\t\tjoin: '',\n\t\tlst: [\n\t\t\t{\n\t\t\t\ttag: 'cohortFilter',\n\t\t\t\ttype: 'tvs',\n\t\t\t\ttvs: {\n\t\t\t\t\tterm: { id: 'subcohort', type: 'multivalue' },\n\t\t\t\t\tvalues: [{ key: 'ABC', label: 'ABC' }]\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\tfilter0: undefined,\n\tcanvasSettings: {\n\t\tcutoff: 10000,\n\t\twidth: 800,\n\t\theight: 600,\n\t\tradius: 3,\n\t\tminXScale: null,\n\t\tmaxXScale: null,\n\t\tminYScale: null,\n\t\tmaxYScale: null,\n\t\topacity: 0.8,\n\t\tstartColor: '#0000ff',\n\t\tstopColor: '#ff0000',\n\t\tdevicePixelRatio: 2\n\t},\n\tcolorTW: {\n\t\tterm: {\n\t\t\tname: 'Cell Type',\n\t\t\tplot: 'UMAP',\n\t\t\ttype: 'singleCellCellType',\n\t\t\tsample: { sID: '1_patient' },\n\t\t\tgroupsetting: { disabled: false },\n\t\t\tvalues: {}\n\t\t},\n\t\tq: { mode: 'discrete', type: 'values', hiddenValues: {} }\n\t}\n}\n\nconst TermdbSingleCellPlotsResponseExample = {\n\trange: {\n\t\txMin: -2.45230826499861,\n\t\txMax: 2.02116419939392,\n\t\tyMin: -2.670907125487,\n\t\tyMax: 2.97596441655721,\n\t\tgeMin: null,\n\t\tgeMax: null\n\t},\n\tresult: {\n\t\tDefault: {\n\t\t\tcolorLegend: [\n\t\t\t\t[\n\t\t\t\t\t'T_NK',\n\t\t\t\t\t{\n\t\t\t\t\t\tsampleCount: 20,\n\t\t\t\t\t\tcolor: '#1b9e77',\n\t\t\t\t\t\tkey: 'T_NK'\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'Blast',\n\t\t\t\t\t{\n\t\t\t\t\t\tsampleCount: 54,\n\t\t\t\t\t\tcolor: '#030303',\n\t\t\t\t\t\tkey: 'Blast'\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'Monocyte',\n\t\t\t\t\t{\n\t\t\t\t\t\tsampleCount: 26,\n\t\t\t\t\t\tcolor: '#7570b3',\n\t\t\t\t\t\tkey: 'Monocyte'\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t],\n\t\t\tshapeLegend: [\n\t\t\t\t[\n\t\t\t\t\t'Ref',\n\t\t\t\t\t{\n\t\t\t\t\t\tsampleCount: 100,\n\t\t\t\t\t\tshape: 0,\n\t\t\t\t\t\tkey: 'Ref'\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t],\n\t\t\tsamples: [\n\t\t\t\t{\n\t\t\t\t\tsampleId: 'cell1',\n\t\t\t\t\tx: 0.958429213345285,\n\t\t\t\t\ty: 1.94008987552318,\n\t\t\t\t\tz: 0,\n\t\t\t\t\tcategory: 'T_NK',\n\t\t\t\t\tshape: 'Ref',\n\t\t\t\t\thidden: {\n\t\t\t\t\t\tcategory: false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tsampleId: 'cell2',\n\t\t\t\t\tx: 0.678836078621254,\n\t\t\t\t\ty: -1.13854914348622,\n\t\t\t\t\tz: 0,\n\t\t\t\t\tcategory: 'T_NK',\n\t\t\t\t\tshape: 'Ref',\n\t\t\t\t\thidden: {\n\t\t\t\t\t\tcategory: false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tsampleId: 'cell3',\n\t\t\t\t\tx: -2.11135267144421,\n\t\t\t\t\ty: -2.33519450621652,\n\t\t\t\t\tz: 0,\n\t\t\t\t\tcategory: 'T_NK',\n\t\t\t\t\tshape: 'Ref',\n\t\t\t\t\thidden: {\n\t\t\t\t\t\tcategory: false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tsampleId: 'cell4',\n\t\t\t\t\tx: 0.551783876521269,\n\t\t\t\t\ty: -1.24685552943596,\n\t\t\t\t\tz: 0,\n\t\t\t\t\tcategory: 'T_NK',\n\t\t\t\t\tshape: 'Ref',\n\t\t\t\t\thidden: {\n\t\t\t\t\t\tcategory: false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tsampleId: 'cell5',\n\t\t\t\t\tx: 1.84959385901015,\n\t\t\t\t\ty: 2.68311790617899,\n\t\t\t\t\tz: 0,\n\t\t\t\t\tcategory: 'T_NK',\n\t\t\t\t\tshape: 'Ref',\n\t\t\t\t\thidden: {\n\t\t\t\t\t\tcategory: false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}\n\nexport const TermdbSingleCellPlotsExample = {\n\trequest: {\n\t\tbody: TermdbSingleCellPlotsRequestExample\n\t},\n\tresponse: {\n\t\tbody: TermdbSingleCellPlotsResponseExample\n\t}\n}\n", "import type { TermWrapper } from '../terms/tw.ts'\nimport type { Filter } from '../filter.ts'\nimport type { ErrorResponse } from './errorResponse.ts'\nimport type { DescrStats } from './termdb.descrstats.ts'\n\n/** Common properties shared by both violin and box plots */\ntype CommonProps = {\n\t/** numeric tw to fetch numeric data. tw.q.mode must be continuous */\n\ttw: TermWrapper\n\tdslabel: string\n\tgenome: string\n\t/** overlay tw for multiple violins/boxplots */\n\toverlayTw?: TermWrapper\n\t/** tw to divide to multiple charts */\n\tdivideTw?: TermWrapper\n\t/** mass filter */\n\tfilter?: Filter\n\t/** read-only invisible filter */\n\tfilter0?: any\n\t/** TODO: Needs description FIXME delete */\n\tcurrentGeneNames?: string[]\n\t/** if true, use log scale; if false or undefined, use linear scale */\n\tisLogScale?: boolean\n}\n\n/** Request type for violin plots with required violin-specific parameters */\nexport type ViolinRequest = CommonProps & {\n\t/** Indicates the type of chart to render */\n\tplotType: 'violin'\n\t/** A number representing the dimension perpendicular to the violin spread */\n\taxisHeight?: number\n\t/** A string representing the type of symbol used on the plot */\n\tdatasymbol?: string\n\t/** A number representing the device's pixel ratio */\n\tdevicePixelRatio: number\n\t/** If true, uses KDE method to build plot */\n\tisKDE?: boolean\n\t/** A string with two possible values: 'horizontal' or 'vertical' */\n\torientation: string\n\t/** A number representing the radius of the data symbols */\n\tradius: number\n\t/** A number representing the right margin */\n\trightMargin?: number\n\t/** Term may be scaled from regression analysis */\n\tscale?: any\n\t/** A number representing the width of the stroke */\n\tstrokeWidth?: number\n\t/** A number representing the width of the SVG box */\n\tsvgw: number\n\t/** Number of bins to build the plot. Default is 20. */\n\tticks?: number\n}\n\n/** Request type for box plots with required box-specific parameters */\nexport type BoxRequest = CommonProps & {\n\t/** Indicates the type of chart to render */\n\tplotType: 'box'\n\t/** sort plots by median value */\n\torderByMedian?: boolean\n\t/** Remove outliers from the plot */\n\tremoveOutliers?: boolean\n\t/** If true, show association tests table */\n\tshowAssocTests?: boolean\n}\n\n/**Unified request type for violin and boxplot - union of ViolinRequest and BoxRequest */\nexport type ViolinBoxRequest = ViolinRequest | BoxRequest\n\nexport type ViolinBoxResponse = ViolinResponse | BoxPlotResponse | ErrorResponse\n\n/** Type guard to check if response is an ErrorResponse */\nexport function isErrorResponse(response: ViolinBoxResponse): response is ErrorResponse {\n\treturn 'error' in response && 'status' in response\n}\n\n/** Type guard to check if response is a BoxPlotResponse */\nexport function isBoxPlotResponse(response: ViolinBoxResponse): response is BoxPlotResponse {\n\treturn !isErrorResponse(response) && 'charts' in response && 'descrStats' in response\n}\n\n/** Type guard to check if response is a ViolinResponse */\nexport function isViolinResponse(response: ViolinBoxResponse): response is ViolinResponse {\n\treturn !isErrorResponse(response) && 'min' in response && 'max' in response\n}\n\n/** Violin response types */\ninterface BinsEntries {\n\tx0: number\n\tx1: number\n\tdensity: number\n}\n\ninterface ValuesEntries {\n\tid: string\n\tlabel: string\n\tvalue: number\n}\n\ninterface PValueEntries {\n\tvalue?: string\n\thtml?: string\n}\n\ntype ViolinDensity = {\n\tbins: BinsEntries[]\n\tdensityMax: number\n\tdensityMin: number\n}\n\nexport type ViolinPlotEntry = {\n\tcolor: string\n\tchartId: string\n\tdensity: ViolinDensity\n\tlabel: string\n\tplotValueCount: number\n\tseriesId: string\n\tsrc: string\n\tsummaryStats: ValuesEntries[]\n}\n\nexport type ViolinResponse = {\n\tbins: { [index: string]: any }\n\tcharts: {\n\t\t[index: string]: {\n\t\t\tchartId: string\n\t\t\tplots: ViolinPlotEntry[]\n\t\t\tpvalues?: PValueEntries[][]\n\t\t}\n\t}\n\tmin: number\n\tmax: number\n\tuncomputableValues: { [index: string]: number }[] | null\n\tdescrStats?: DescrStats\n}\n\n/** Boxplot response types */\nexport type BoxPlotData = {\n\tw1: number | undefined\n\tw2: number | undefined\n\tp05: number\n\tp25: number\n\tp50: number\n\tp75: number\n\tp95: number\n\tiqr: number\n\tout: { value: number }[]\n}\n\nexport type BoxPlotEntry = {\n\tboxplot: BoxPlotData & { label: string }\n\tcolor?: string\n\tdescrStats: DescrStats\n\tisHidden?: boolean\n\tkey: string\n\tseriesId?: string\n}\n\nexport type BoxPlotChartEntry = {\n\tchartId: string\n\tplots: BoxPlotEntry[]\n\tsampleCount: number\n\twilcoxon?: [{ value: string }, { value: string }, { html: string }][]\n}\n\nexport type BoxPlotResponse = {\n\tabsMin?: number\n\tabsMax?: number\n\tbins?: {\n\t\t[index: string]: any\n\t}\n\tcharts: {\n\t\t[chartId: string]: BoxPlotChartEntry\n\t}\n\tdescrStats: DescrStats\n\tuncomputableValues: { label: string; value: number }[] | null\n}\n\n// TODO: write more payload examples to help with automated testing and documentation, for non-prod use only\n\nexport const violinBoxPayload = {\n\trequest: {\n\t\ttypeId: 'ViolinBoxRequest'\n\t},\n\tresponse: {\n\t\ttypeId: 'ViolinBoxResponse'\n\t},\n\texamples: [\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tplotType: 'violin',\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\ttw: {\n\t\t\t\t\t\tterm: { id: 'aaclassic_5', type: 'float' },\n\t\t\t\t\t\tq: { mode: 'continuous' }\n\t\t\t\t\t},\n\t\t\t\t\tdevicePixelRatio: 2,\n\t\t\t\t\tsvgw: 200,\n\t\t\t\t\torientation: 'horizontal',\n\t\t\t\t\tdatasymbol: 'rug',\n\t\t\t\t\tradius: 5,\n\t\t\t\t\tisLogScale: false\n\t\t\t\t} // satisfies ViolinBoxRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\trequest: {\n\t\t\t\tbody: {\n\t\t\t\t\tplotType: 'box',\n\t\t\t\t\tgenome: 'hg38-test',\n\t\t\t\t\tdslabel: 'TermdbTest',\n\t\t\t\t\ttw: {\n\t\t\t\t\t\tterm: { id: 'agedx', type: 'float' },\n\t\t\t\t\t\tq: { mode: 'continuous' }\n\t\t\t\t\t},\n\t\t\t\t\toverlayTw: {\n\t\t\t\t\t\tterm: { id: 'sex', type: 'categorical' }\n\t\t\t\t\t},\n\t\t\t\t\torderByMedian: true\n\t\t\t\t} // satisfies ViolinBoxRequest // TODO: enable type check\n\t\t\t},\n\t\t\tresponse: {\n\t\t\t\theader: { status: 200 }\n\t\t\t}\n\t\t}\n\t]\n}\n", "export const CATEGORICAL = 'categorical'\nexport const CONDITION = 'condition'\nexport const DATE = 'date'\nexport const DNA_METHYLATION = 'dnaMethylation'\nexport const FLOAT = 'float'\nexport const GENE_VARIANT = 'geneVariant'\nexport const GENE_EXPRESSION = 'geneExpression'\nexport const ISOFORM_EXPRESSION = 'isoformExpression'\nexport const INTEGER = 'integer'\nexport const METABOLITE_INTENSITY = 'metaboliteIntensity'\nexport const MULTIVALUE = 'multivalue'\nexport const SAMPLELST = 'samplelst'\nexport const SINGLECELL_CELLTYPE = 'singleCellCellType'\nexport const SINGLECELL_GENE_EXPRESSION = 'singleCellGeneExpression'\nexport const SNP = 'snp'\nexport const SNP_LIST = 'snplst'\nexport const SNP_LOCUS = 'snplocus'\nexport const SSGSEA = 'ssGSEA'\nexport const SURVIVAL = 'survival'\nexport const TERM_COLLECTION = 'termCollection'\nexport const PROTEOME_ABUNDANCE = 'proteomeAbundance'\nexport const PROTEOME_DAP = 'proteomeDAP'\n\n//Term types should be used gradually using these constants instead of hardcoding the values,\n// eg: type == CATEGORICAL instead of type == 'categorical'\nexport const TermTypes: { [key: string]: string } = {\n\tGENE_VARIANT,\n\tGENE_EXPRESSION,\n\tISOFORM_EXPRESSION,\n\tSSGSEA,\n\tDNA_METHYLATION,\n\tCATEGORICAL,\n\tINTEGER,\n\tFLOAT,\n\tSNP,\n\tSNP_LIST,\n\tSNP_LOCUS,\n\tCONDITION,\n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E,MAAM,aAAa;AAAA,UACzB;AAAA,UACA,WAAW;AAAA,YACV,MAAM,EAAE,IAAI,OAAO,MAAM,cAAc;AAAA,UACxC;AAAA,UACA,eAAe;AAAA,QAChB;AAAA;AAAA,MACD;AAAA,MACA,UAAU;AAAA,QACT,QAAQ,EAAE,QAAQ,IAAI;AAAA,MACvB;AAAA,IACD;AAAA,EACD;AACD;;;ACtOO,IAAM,cAAc;AACpB,IAAM,YAAY;AAClB,IAAM,OAAO;AACb,IAAM,kBAAkB;AACxB,IAAM,QAAQ;AACd,IAAM,eAAe;AACrB,IAAM,kBAAkB;AACxB,IAAM,qBAAqB;AAC3B,IAAM,UAAU;AAChB,IAAM,uBAAuB;AAC7B,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,sBAAsB;AAC5B,IAAM,6BAA6B;AACnC,IAAM,MAAM;AACZ,IAAM,WAAW;AACjB,IAAM,YAAY;AAClB,IAAM,SAAS;AACf,IAAM,WAAW;AACjB,IAAM,kBAAkB;AACxB,IAAM,qBAAqB;AAC3B,IAAM,eAAe;AAIrB,IAAM,YAAuC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.191.4",
3
+ "version": "2.193.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "dist/index.js",