mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 10:28:11 +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:
@@ -0,0 +1,48 @@
|
||||
import React from "react";
|
||||
import {AnchorButton, ButtonGroup, Tooltip} from "@blueprintjs/core";
|
||||
import * as globals from "../../globals";
|
||||
|
||||
|
||||
function Subset(props) {
|
||||
const {
|
||||
subsetPossible,
|
||||
subsetResetPossible,
|
||||
handleSubset,
|
||||
handleSubsetReset,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<ButtonGroup style={{marginRight: "10px"}}>
|
||||
<Tooltip
|
||||
content="Subset to currently selected cells and associated metadata"
|
||||
position="bottom"
|
||||
hoverOpenDelay={globals.tooltipHoverOpenDelay}
|
||||
>
|
||||
<AnchorButton
|
||||
data-testid="subset-button"
|
||||
active={!subsetPossible}
|
||||
icon="pie-chart"
|
||||
onClick={() => {
|
||||
if (subsetPossible) handleSubset();
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
content="Undo subset and show all cells and associated metadata"
|
||||
position="bottom"
|
||||
hoverOpenDelay={globals.tooltipHoverOpenDelay}
|
||||
>
|
||||
<AnchorButton
|
||||
data-testid="reset-subset-button"
|
||||
active={!subsetResetPossible}
|
||||
icon="full-circle"
|
||||
onClick={() => {
|
||||
if (subsetResetPossible) handleSubsetReset();
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</ButtonGroup>
|
||||
);
|
||||
}
|
||||
|
||||
export default Subset;
|
||||
Reference in New Issue
Block a user