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
+12 -2
View File
@@ -76,6 +76,8 @@ function createModelTF() {
graphInteractionMode: state.controls.graphInteractionMode,
colors: state.colors,
pointDilation: state.pointDilation,
genesets: state.genesets.genesets,
differential: state.differential,
}))
class Graph extends React.Component {
static createReglState(canvas) {
@@ -526,6 +528,7 @@ class Graph extends React.Component {
colorsProp,
pointDilation
);
const { currentDimNames } = layoutChoice;
const X = layoutDf.col(currentDimNames[0]).asArray();
const Y = layoutDf.col(currentDimNames[1]).asArray();
@@ -782,10 +785,17 @@ class Graph extends React.Component {
}
createColorByQuery(colors) {
const { annoMatrix } = this.props;
const { annoMatrix, genesets, differential } = this.props;
const { schema } = annoMatrix;
const { colorMode, colorAccessor } = colors;
return createColorQuery(colorMode, colorAccessor, schema);
return createColorQuery(
colorMode,
colorAccessor,
schema,
genesets,
differential.diffExp
);
}
renderPoints(