@sjcrh/proteinpaint-types 2.191.4 → 2.192.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.map +2 -2
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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;
|
|
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 { 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 { 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;AAKO,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,GAAG;AAAA,EACtB,CAAC,WAAW,OAAO,GAAG;AAAA;AAAA;AAGvB;AAqCO,SAAS,kBAAkB,QAA+B,aAAuC;AACvG,SA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