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

break (white) lines presenting in the columns and rows of the main heatmap plot with no NA data in matrix. #81

Open
WenxuLiu opened this issue Sep 9, 2021 · 4 comments

Comments

@WenxuLiu
Copy link

WenxuLiu commented Sep 9, 2021

this problem confuses me for a long time
I use pheatmap to draw a 10000* 2000(more or less) size matrix , final plot will show some blank(white) lines inserting to the row and col of my main plot in most of the time, like some cut-off rules to my main plot.
I have checked my data , it has no NA rows or cols. And this cut-off lines will change position when adjusting the resolution of the plot. wheather ploting directly in Rstudio window or generating the plot file in work path, this problem can not be avoided either.

I guess this problem may due to the plot system of R or the resolution or Pheatmap, if someone can sovle this, I would appreciate it greatfully.

Thank you.
QQ截图20210909170213

@KforKuma
Copy link

KforKuma commented Oct 22, 2021

I have met the same problem!!! It really confused me as well because I have tried pheatmap with gaps_col (for adding some gaps, which functions nicely) so I thought there could be some problem remained after I change my code, maybe bottom layer code or sth.
1634877319(1)

my code is like:
pheatmap::pheatmap(mat, cluster_rows = F,cluster_cols = F, gaps_col=NULL, show_colnames = F, annotation_col = colanno, annotation_colors = mycolors, color = viridis(20), filename="DE_Heatmap.png",width=16,height = 20 )

All the other parameters work well. The 'gaps_col=NULL' is added after the unwanted white gap reoccured but nothing really changes.

@repeatpipettor
Copy link

Hi @WenxuLiu and @KforKuma, was this issue ever resolved? I am having the same exact issue as well with similar plotting code. Thanks.

@repeatpipettor
Copy link

In case this is useful to anyone, this issue was fixed for me when I used the development version of ComplexHeatmap (v 2.13.1), which has a wrapper to pheatmap. I think it's because there's a function that specifically checks for white space and fills them in with the appropriate colors. (validate_raster_matrix in Heatmap-draw_component.R).

The same solution also worked for another user here.

@prinkessbambi
Copy link

@repeatpipettor I have the same problem! Do you wrap the oncoprint output in pheatmap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants