Entering edit mode
Hi,
I plotting a heat map using heatmap.2 command, where my rows are
samples
columns are sequence capture regions. The entry in the matrix is the
average
depth of coverage for that sample/target. heatmap.2 is doing what
want, but
the color key is showing a column z-score for mapping the colors. I
would
like to have the actual values in the color key. So if my sequence
coverages
ranged from 5-50X, the lighter colors would be the lower coverage
values and
the darker colors be the higher coverage values I have been searching
thru
the docs and doing google searches, but still not getting quite what I
want.
Thanks for any pointers.
Amit
library(gplots)
library("RColorBrewer")
coverage <- read.table("cov.txt", header=TRUE)
# order the table by average coverage for the sample
coverage <- (coverage[order(coverage$avg, decreasing=TRUE),])
cov_matrix <- data.matrix(coverage)
#plot the heat map
#
heatmap.2(cov_matrix, Rowv=FALSE, Colv=FALSE,
scale="column",margins=c(5,10), trace="none", density.info="none",
xlab="target", ylab="samples", col=brewer.pal(9,"OrRd"))
--
Amit Indap
Dept. of Biology
Boston College
http://bioinformatics.bc.edu/marthlab/Main_Page
[[alternative HTML version deleted]]