Closed ccshao closed 3 years ago
Hi, can you update the package for GitHub to the newest version? I think I've fixed that bug (I hope!).
Thanks, the lastest version solved the issue.
By the way, with magick package, the saved figure was blurry. An example is shown below.
Hi @jokergoo, I am using the l am trying to replicate the output plot from inferCNV package using a recent version of your package (2.7.6.1004).I'm trying to get some plot like this:
I'm having some white lines but in the row annotation color bars of the upper heatmap. In my casethere are ~7000 rows in the upper heatmap,so it's probable it is due to a raster problem, but even specifying the argument raster_device = "CairoPNG"
there are some white lines appearing in the annotation bars of the plot. Also I don't know if it has something to do that, since it is a list of heatmaps, I'm using the draw()
function to print the plot. But I think that's not the case because when I plot the upper heatmap alone I still have the lines
Any suggestion?
Thanks in advance
@mmfalco What version of ComplexHeatmap are you using?
@jokergoo I used ComplexHeatmap_2.7.6.1004. I replicated the plot with random data so you can see what I mean.
The dim()
for the upper heatmap is 6891 5863 and for the lower heatmap 2848 5863
And this is how I made the plot:
ht1<-Heatmap(imat,name = "ht1",
cluster_rows = F,cluster_columns = F,show_row_names = F,show_column_names = F,#remove dendograms and name labels in col and row
row_title = "Observations(Cells)",row_title_side = "left",
col = col_fun,#custom legend
left_annotation = subc_annot,
right_annotation = sample_annotation,
bottom_annotation = chr_labels,
heatmap_legend_param = list(title="Modified Expression"),
height = 0.75,raster_device = "CairoPNG"
)
ref_ht<-Heatmap(rmat,name = "ref_ht",
cluster_rows = F,cluster_columns = F,show_row_names = F,show_column_names = F,#remove dendograms and name labels in col and row
row_title = "Reference(Cells)",row_title_side = "left",
show_heatmap_legend = F,
col = col_fun,#custom legend
right_annotation = ref_annotation,
height = 0.25,raster_device = "CairoPNG"
)
draw(ref_ht %v% ht1, merge_legends=T,ht_gap = unit(0.8, "cm"),
legend_title_gp=gpar(fontsize = 16),legend_labels_gp=gpar(fontsize = 14))
#add cluster and chr lines for Observations
decorate_heatmap_body("ht1", {
eval(parse(text =chr_lines ))
eval(parse(text =clus_lines ))
})
#add lines for ref
decorate_heatmap_body("ref_ht", {
eval(parse(text =chr_lines ))
eval(parse(text = ref_clus_lines))
})
Same issue here, what worked for me was to install the magick
package.
@ATpoint Hi, I have the same problem but with the oncoprint() function. I've installed magick 2.7.3, but I don't see an improvement. Do you have any tips? Did you use something specific from the magick package?
@prinkessbambi I have no additional advise, sorry. It really just was installing that packing, restarting the session and done.
@prinkessbambi If you can provide your code, your plot and your session info, I can help you with it.
For me, use_raster = F
in Heatmap function solved it.
Hello,
When saving the heatmap to pdf/png files, the plots show vertical white lines, more in png files. Input is a large matrix, 113 genes by 10154 cells.
Here is the codes for a pdf file,
draw
makes no difference.Googled it but I don't get a clear answer. Any suggestions? Many thanks!
Saved pdf file
Saved png file