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:
Colin Megill
2021-04-22 13:58:30 -04:00
committed by GitHub
parent 860547ced1
commit fd2a7a53ab
10 changed files with 170 additions and 27 deletions
+17 -2
View File
@@ -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;
}
+1
View File
@@ -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",