mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-27 19:08:12 +08:00
Undo selection appends genes from differential expression to user gene list (#1183)
* Undo selection appends diffExp genes to user gene list Fixes https://github.com/chanzuckerberg/cellxgene/issues/1171 Need: When a user performs a differential expression from within a sub-selection (world) of the data and then resets the selection to all cells (universe), the differential expression results are no longer valid. Approach: * When the selection is reset, move the top (maxUserDefinedGenes - len(userDefinedGenes) from the differential expression results to the list of user defined genes * Raise maxUserDefinedGenes to 25 to give users more room and accommodate the extra genes transferred in from differential expression Other commits: * Choose different button icons * Add diff exp genes to user defined genes on subset too * Respond to feedback from @liaprins-czi and @bkmartinjr
This commit is contained in:
@@ -586,7 +586,7 @@ class Dataframe {
|
||||
|
||||
withRowIndex allows assignment of new row index during subset operation.
|
||||
If withRowIndex === null, it will reset the index to identity (offset)
|
||||
indexing. if withRowIndex is a label index object, it will be used
|
||||
indexing. If withRowIndex is a label index object, it will be used
|
||||
for the new dataframe.
|
||||
*/
|
||||
return this.__subset(rowOffsets, colOffsets, withRowIndex);
|
||||
|
||||
@@ -200,3 +200,10 @@ export function pruneVarDataCache(varData, needed) {
|
||||
}
|
||||
return varData;
|
||||
}
|
||||
|
||||
export function subsetAndResetGeneLists(state) {
|
||||
const { userDefinedGenes, diffexpGenes } = state;
|
||||
const newUserDefinedGenes = [].concat(userDefinedGenes, diffexpGenes).slice(0, globals.maxGenes);
|
||||
const newDiffExpGenes = [];
|
||||
return [newUserDefinedGenes, newDiffExpGenes];
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import { isContinuousAnnotation } from "./annotationsHelpers";
|
||||
|
||||
/*
|
||||
|
||||
World is a subset of universe. Most code should use world, and should
|
||||
(generally) not use Universe. World contains any per-obs or per-var data
|
||||
World is a subset of universe. Most code should use world, and should
|
||||
(generally) not use Universe. World contains any per-obs or per-var data
|
||||
that must be consistent acorss the app when we view/manipulate subsets
|
||||
of Universe.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user