Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BIOMAGE-2001] Fix gene selection error and reload #780

Merged
merged 2 commits into from
Jul 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ const DotPlotPage = (props) => {
};

const reorderData = (order) => {
if (!plotData) return;

const cellSetsNames = [...new Set(plotData.map((elem) => elem.cellSets))];
const reorderedData = [];
cellSetsNames.forEach((set) => {
Expand All @@ -190,6 +192,8 @@ const DotPlotPage = (props) => {
};

const deleteData = (genes) => {
if (!plotData) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this even be executed if theres no plotData - nothing to delete right? So maybe this is redundant?

Copy link
Contributor Author

@jszpila314 jszpila314 Jul 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This executes when returning to the dot plot when there is an error loading the plot data, due to for example the work request timing out. I ran into this due to some problems with the worker in staging, where the plot data wouldn't load and editing the tree threw errors.


const data = plotData.filter((elem) => !genes.includes(elem.geneName));
dispatch(updatePlotData(plotUuid, data));
};
Expand Down Expand Up @@ -291,7 +295,7 @@ const DotPlotPage = (props) => {

// load initial state, based on highest dispersion genes from all genes
useEffect(() => {
if (_.isEmpty(geneData) || !config || plotData?.length) {
if (_.isEmpty(geneData) || !config || plotDataLoading) {
return;
}
loadHighestDispersionGenes();
Expand Down