This commit is contained in:
Colin Megill
2021-04-20 01:16:27 -07:00
parent 22d51ab174
commit 5418678b77
2 changed files with 4 additions and 1 deletions
@@ -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,
+3 -1
View File
@@ -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());