DingWB / PyComplexHeatmap

PyComplexHeatmap: A Python package to plot complex heatmap (clustermap)
https://dingwb.github.io/PyComplexHeatmap/
MIT License
249 stars 28 forks source link

Thick white lines appearning in clustermap when large genesets used #52

Closed julie-jch closed 9 months ago

julie-jch commented 9 months ago

Describe the bug I have a matrix of size 157 rows (genes) × 1023 columns (cells). When I create a clustermap plot, I get these thick white lines/ artifacts appearing in the image.

image

Expected behavior

When I reduce the size of my matrix 59 rows (genes) × 1023 columns (cells), the clustermap outputs as it should. image

What can I do about this?

Desktop (please complete the following information): -Linux Mint 20.1

Additional context Plots generated following this tutorial with own data

DingWB commented 9 months ago

Could you please check whether there were missing values in the data of 157 rows (genes) × 1023 columns (cells)? I think the white rows were missing values.

julie-jch commented 9 months ago

Thank you. The issue was caused because of rows or columns which contained all zeros across the dataframe. When the the z_score parameter was used, naturally the calculation failed on these rows/columns and resulted in NaNs which caused the white lines in plots.

DingWB commented 9 months ago

Great! Thanks for letting me know.