mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 01:48:11 +08:00
feat(geneset): save diff exp result as geneset (#2216)
* update package lock * allow falsey vals * remove old diff exp handling * save diff exp results as geneset * delete test * check for undefined or null * use global geneset description for diffexp * remove diffexp special code, no longer showing adjpval + logfoldchange * remove differential map to state * remove clear from FSM, since we no longer support those actions * restore controlHelpers test with todo
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Button, ButtonGroup, AnchorButton, Tooltip } from "@blueprintjs/core";
|
||||
import { ButtonGroup, AnchorButton, Tooltip } from "@blueprintjs/core";
|
||||
import * as globals from "../../globals";
|
||||
import styles from "./menubar.css";
|
||||
import actions from "../../actions";
|
||||
@@ -8,8 +8,6 @@ import CellSetButton from "./cellSetButtons";
|
||||
|
||||
@connect((state) => ({
|
||||
differential: state.differential,
|
||||
celllist1: state.differential?.celllist1,
|
||||
celllist2: state.differential?.celllist2,
|
||||
diffexpMayBeSlow: state.config?.parameters?.["diffexp-may-be-slow"] ?? false,
|
||||
diffexpCellcountMax: state.config?.limits?.diffexp_cellcount_max,
|
||||
}))
|
||||
@@ -26,17 +24,6 @@ class DiffexpButtons extends React.PureComponent {
|
||||
}
|
||||
};
|
||||
|
||||
clearDifferentialExpression = () => {
|
||||
const { dispatch, differential } = this.props;
|
||||
dispatch({
|
||||
type: "clear differential expression",
|
||||
diffExp: differential.diffExp,
|
||||
});
|
||||
dispatch({
|
||||
type: "clear scatterplot",
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
/* diffexp-related buttons may be disabled */
|
||||
const { differential, diffexpMayBeSlow, diffexpCellcountMax } = this.props;
|
||||
@@ -65,41 +52,22 @@ class DiffexpButtons extends React.PureComponent {
|
||||
<ButtonGroup className={styles.menubarButton}>
|
||||
<CellSetButton eitherCellSetOneOrTwo={1} />
|
||||
<CellSetButton eitherCellSetOneOrTwo={2} />
|
||||
{!differential.diffExp ? (
|
||||
<Tooltip
|
||||
content={warnMaxSizeExceeded ? tipMessageWarn : tipMessage}
|
||||
position="bottom"
|
||||
hoverOpenDelay={globals.tooltipHoverOpenDelayQuick}
|
||||
intent={warnMaxSizeExceeded ? "danger" : "none"}
|
||||
>
|
||||
<AnchorButton
|
||||
disabled={!haveBothCellSets || warnMaxSizeExceeded}
|
||||
intent={warnMaxSizeExceeded ? "danger" : "primary"}
|
||||
data-testid="diffexp-button"
|
||||
loading={differential.loading}
|
||||
icon="left-join"
|
||||
fill
|
||||
onClick={this.computeDiffExp}
|
||||
/>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
|
||||
{differential.diffExp ? (
|
||||
<Tooltip
|
||||
content="Remove differentially expressed gene list and clear cell selections"
|
||||
position="bottom"
|
||||
hoverOpenDelay={globals.tooltipHoverOpenDelayQuick}
|
||||
>
|
||||
<Button
|
||||
type="button"
|
||||
fill
|
||||
intent="warning"
|
||||
onClick={this.clearDifferentialExpression}
|
||||
>
|
||||
Clear Differential Expression
|
||||
</Button>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
<Tooltip
|
||||
content={warnMaxSizeExceeded ? tipMessageWarn : tipMessage}
|
||||
position="bottom"
|
||||
hoverOpenDelay={globals.tooltipHoverOpenDelayQuick}
|
||||
intent={warnMaxSizeExceeded ? "danger" : "none"}
|
||||
>
|
||||
<AnchorButton
|
||||
disabled={!haveBothCellSets || warnMaxSizeExceeded}
|
||||
intent={warnMaxSizeExceeded ? "danger" : "primary"}
|
||||
data-testid="diffexp-button"
|
||||
loading={differential.loading}
|
||||
icon="left-join"
|
||||
fill
|
||||
onClick={this.computeDiffExp}
|
||||
/>
|
||||
</Tooltip>
|
||||
</ButtonGroup>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user