mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-27 15:48:13 +08:00
varindex
This commit is contained in:
@@ -116,6 +116,7 @@ class ContinuousLegend extends React.Component {
|
||||
if (colors !== prevProps?.colors || annoMatrix !== prevProps?.annoMatrix) {
|
||||
const { schema } = annoMatrix;
|
||||
const { colorMode, colorAccessor, userColors } = colors;
|
||||
|
||||
const colorQuery = createColorQuery(
|
||||
colorMode,
|
||||
colorAccessor,
|
||||
|
||||
@@ -14,6 +14,7 @@ fulfill it
|
||||
*/
|
||||
export function createColorQuery(colorMode, colorByAccessor, schema, genesets) {
|
||||
if (!colorMode || !colorByAccessor || !schema || !genesets) return null;
|
||||
|
||||
switch (colorMode) {
|
||||
case "color by categorical metadata":
|
||||
case "color by continuous metadata": {
|
||||
@@ -34,10 +35,11 @@ export function createColorQuery(colorMode, colorByAccessor, schema, genesets) {
|
||||
];
|
||||
}
|
||||
case "color by geneset mean expression": {
|
||||
const varIndex = schema?.annotations?.var?.index;
|
||||
|
||||
if (!varIndex) return null;
|
||||
if (!genesets) return null;
|
||||
|
||||
const varIndex = schema?.annotations?.var?.index;
|
||||
const _geneset = genesets.get(colorByAccessor);
|
||||
const _setGenes = Array.from(_geneset.genes.keys());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user