mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-07 13:58:11 +08:00
diff exp reducer
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
const Differential = (state = {
|
||||||
|
diffExp: null,
|
||||||
|
loading: null,
|
||||||
|
error: null,
|
||||||
|
celllist1: null,
|
||||||
|
celllist2: null,
|
||||||
|
}, action) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case "request differential expression started":
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
loading: true,
|
||||||
|
error: null
|
||||||
|
});
|
||||||
|
case "request differential expression success":
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
error: null,
|
||||||
|
loading: false,
|
||||||
|
diffExp: action.data,
|
||||||
|
});
|
||||||
|
case "request differential expression error":
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
loading: false,
|
||||||
|
error: action.data
|
||||||
|
});
|
||||||
|
case "store current cell selection as differential set 1":
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
celllist1: action.data
|
||||||
|
});
|
||||||
|
case "store current cell selection as differential set 2":
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
celllist2: action.data
|
||||||
|
});
|
||||||
|
default:
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Differential;
|
||||||
@@ -9,12 +9,14 @@ import initialize from "./initialize";
|
|||||||
import cells from "./cells";
|
import cells from "./cells";
|
||||||
import expression from "./expression";
|
import expression from "./expression";
|
||||||
import controls from "./controls";
|
import controls from "./controls";
|
||||||
|
import differential from "./differential";
|
||||||
|
|
||||||
const Reducer = combineReducers({
|
const Reducer = combineReducers({
|
||||||
initialize,
|
initialize,
|
||||||
cells,
|
cells,
|
||||||
expression,
|
expression,
|
||||||
controls,
|
controls,
|
||||||
|
differential,
|
||||||
})
|
})
|
||||||
|
|
||||||
let store = createStore(
|
let store = createStore(
|
||||||
|
|||||||
Reference in New Issue
Block a user