Conversation
There was a problem hiding this comment.
Pull request overview
This PR moves single-cell gene expression data processing from the client-side (vocabApi.getScatterData() and processGEData in scatterModel) to the server-side termdb/sampleScatter route, and replaces hardcoded term type strings (e.g. 'singleCellCellType') with imported constants.
Changes:
- Consolidated gene expression scatter data handling into the server route (
termdb.sampleScatter.ts) and removed client-sideprocessGEDataand thetermdb/singlecellDatafetch path. - Replaced all
'singleCellCellType'and'singleCellGeneExpression'string literals with imported constants across client and server code. - Updated violin integration test messages and reformatted quotes (double → single) in utility files.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| server/routes/termdb.sampleScatter.ts | Server now returns geneExp per cell and conditionally builds colorMap; uses imported constants |
| client/plots/scatter/model/scatterModel.ts | Removed processGEData; unified data flow; added geMin/geMax to ranges |
| client/plots/scatter/scatterTypes.ts | Added geMin/geMax to ScatterChart ranges type |
| client/termdb/TermdbVocab.js | Removed special singlecellData fetch path for gene expression |
| client/tw/TwRouter.ts | Replaced string literals with constants |
| client/tw/qualitative.ts | Replaced string literals with constants |
| client/tw/numeric.ts | Replaced string literals with constants |
| client/plots/sc/view/PlotButtons.ts | Replaced string literals with constants |
| client/test/testdata/data.ts | Replaced string literals with constants |
| client/termsetting/test/termsetting.integration.spec.js | Replaced string literal with constant |
| client/plots/scatter/test/scatter.integration.spec.js | Added colorTW to test config; imported getScctTw |
| client/plots/test/violin.integration.spec.js | Updated test messages; imported constant |
| shared/utils/src/urljson.js | Quote reformatting |
| shared/utils/src/time.js | Quote reformatting |
| shared/utils/src/joinUrl.js | Quote reformatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| else throw new Error('unsupported tw') | ||
| } | ||
|
|
||
| if (tw.term.type == SINGLECELL_GENE_EXPRESSION) arg.gene = tw.term.gene |
There was a problem hiding this comment.
please change to explicitly detecting scct and not to assume it (more such sc term types coming soon eg atac)
if(tw.term.type==scGeneExp) {
} else if(tw.term.type==scct) {
} else {
throw 'xx'
}
There was a problem hiding this comment.
@xzhou82, this will be addressed in my next PR.
Description
termdb/sampleScatterroute with adjustments in the scatterModel.All tests pass for me.
Test with:
Supports efforts detailed in SC roadmap
Checklist
Check each task that has been performed or verified to be not applicable.