mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 01:38:12 +08:00
Color by gene set mean expression (#2157)
* colorby histo
* color graph by mean expression
* move var index after returns
* add genesets as an argument
* varindex
* undo redo for mean expression
* destructure
* ternary
* Revert "destructure"
This reverts commit 2d9432c1c7.
* color by mean for diffexp
This commit is contained in:
@@ -4,8 +4,8 @@ Color By UI state
|
||||
|
||||
const ColorsReducer = (
|
||||
state = {
|
||||
colorMode: null,
|
||||
colorAccessor: null,
|
||||
colorMode: null /* by continuous, by expression */,
|
||||
colorAccessor: null /* tissue, Apod */,
|
||||
},
|
||||
action,
|
||||
nextSharedState,
|
||||
@@ -96,6 +96,21 @@ const ColorsReducer = (
|
||||
};
|
||||
}
|
||||
|
||||
case "color by geneset mean expression": {
|
||||
/* toggle between this mode and reset */
|
||||
const resetCurrent =
|
||||
action.type === state.colorMode &&
|
||||
action.geneset === state.colorAccessor;
|
||||
const colorMode = !resetCurrent ? action.type : null;
|
||||
const colorAccessor = !resetCurrent ? action.geneset : null;
|
||||
|
||||
return {
|
||||
...state,
|
||||
colorMode,
|
||||
colorAccessor,
|
||||
};
|
||||
}
|
||||
|
||||
default: {
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ const saveOnActions = new Set([
|
||||
"color by categorical metadata",
|
||||
"color by continuous metadata",
|
||||
"color by expression",
|
||||
"color by geneset mean expression",
|
||||
|
||||
"show centroid labels for category",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user