diff --git a/src/components/data-exploration/heatmap/HeatmapPlot.jsx b/src/components/data-exploration/heatmap/HeatmapPlot.jsx index f49b6268f5..e76fbc2abe 100644 --- a/src/components/data-exploration/heatmap/HeatmapPlot.jsx +++ b/src/components/data-exploration/heatmap/HeatmapPlot.jsx @@ -137,8 +137,18 @@ const HeatmapPlot = (props) => { const cellOrder = populateHeatmapData(cellSets, heatmapSettings, true); - heatmapSettings.selectedGenes = selectedGenes; - const data = generateVitessceData(cellOrder, heatmapSettings, expressionData, cellSets); + // Selected genes is not contained in heatmap settings for the + // data exploration marker heatmap, so must be passed spearatedly. + // Trying to assign it to heatmapSettings will throw an error because + // heatmapSettings is is frozen in redux by immer. + const data = generateVitessceData( + cellOrder, + heatmapSettings, + expressionData, + selectedGenes, + cellSets, + ); + setHeatmapData(data); }, [ selectedGenes, diff --git a/src/components/plots/helpers/heatmap/vitessce/generateVitessceData.js b/src/components/plots/helpers/heatmap/vitessce/generateVitessceData.js index 8530054f18..bbda18d869 100644 --- a/src/components/plots/helpers/heatmap/vitessce/generateVitessceData.js +++ b/src/components/plots/helpers/heatmap/vitessce/generateVitessceData.js @@ -3,9 +3,9 @@ import generateVitessceHeatmapTracksData from 'components/plots/helpers/heatmap/ const generateVitessceData = ( cellOrder, heatmapSettings, - expression, cellSets, + expression, selectedGenes, cellSets, ) => { - const { selectedGenes, selectedTracks } = heatmapSettings; + const { selectedTracks } = heatmapSettings; const trackColorData = generateVitessceHeatmapTracksData( selectedTracks, cellSets, cellOrder,