knausb / vcfR

Tools to work with variant call format files
248 stars 54 forks source link

About vcfR::heatmap.bp, is there a way to scale the heatmap but keep the barplot as sum of unscaled values? #183

Open hope-data-science opened 3 years ago

hope-data-science commented 3 years ago

The heatmap produced by heatmap.bp is really beautiful, is there a way to scale the rows but keep the barplot to summarise the raw data? Thanks.

knausb commented 3 years ago

I'm not sure I understand you. The height of each row should scale with the height of the figure. Each bar of the marplot should scale with the row height. Perhaps you could provide some sort of example for what you're looking for?

hope-data-science commented 3 years ago

Thank you for the prompt feedback. I'll use the example presented in the helping manual:

library(vcfR)

x  <- as.matrix(mtcars)

heatmap.bp(x)  # pic1
heatmap.bp(x, scale="col") # pic2

The above codes yields two pictures, pic1 and pic2. I want to keep the side barplot in pic1, but I want to use the heatmap in pic2. Is that possible?

Thanks.