mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 15:08: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:
@@ -106,16 +106,26 @@ const continuous = (selectorId, colorScale, colorAccessor) => {
|
||||
@connect((state) => ({
|
||||
annoMatrix: state.annoMatrix,
|
||||
colors: state.colors,
|
||||
genesets: state.genesets.genesets,
|
||||
differential: state.differential,
|
||||
}))
|
||||
class ContinuousLegend extends React.Component {
|
||||
async componentDidUpdate(prevProps) {
|
||||
const { annoMatrix, colors } = this.props;
|
||||
const { annoMatrix, colors, genesets, differential } = this.props;
|
||||
if (!colors || !annoMatrix) return;
|
||||
|
||||
if (colors !== prevProps?.colors || annoMatrix !== prevProps?.annoMatrix) {
|
||||
const { schema } = annoMatrix;
|
||||
const { colorMode, colorAccessor, userColors } = colors;
|
||||
const colorQuery = createColorQuery(colorMode, colorAccessor, schema);
|
||||
|
||||
const colorQuery = createColorQuery(
|
||||
colorMode,
|
||||
colorAccessor,
|
||||
schema,
|
||||
genesets,
|
||||
differential.diffExp
|
||||
);
|
||||
|
||||
const colorDf = colorQuery ? await annoMatrix.fetch(...colorQuery) : null;
|
||||
const colorTable = createColorTable(
|
||||
colorMode,
|
||||
|
||||
Reference in New Issue
Block a user