Entering edit mode
Levi Waldron
★
1.1k
@levi-waldron-3429
Last seen 5 hours ago
CUNY Graduate School of Public Health a…
Can someone recommend a more sophisticated way to annotate heatmaps
than the
ColSideColors argument of heatmap and heatmap.2? In particular, I
would
like to be able to annotate columns with more than one piece of
information,
like in Figure 1 of the article at
http://www3.interscience.wiley.com/cgi-
bin/fulltext/117905619/HTMLSTART /
doi:10.1002/hep.22256.
Some example data and a heatmap:
set.seed(1)
y <- matrix(rnorm(100),nrow=20,ncol=5)
colnames(x) <- LETTERS[1:5]
rownames(x) <- paste("r",1:20,sep="")
set.seed(1)
annotation <- matrix(sample(c("+","-"),15,replace=TRUE),ncol=5)
colnames(annotation) <- colnames(x)
rownames(annotation) <- paste("annotation",1:3)
heatmap(x,Rowv=NA,
ColSideColors=sapply(annotation[1,],function(x)
switch(x,"+"="red","-"="blue")))
This heatmap annotates the columns by the first of the three
annotations
with a colored bar along the top of the heatmap, but ideally I would
like to
put all three annotations on the heatmap by putting three rows of +/-
symbols between the top of the heatmap and the dendrogram, or
alternatively
three colored bars. Specific or general suggestions would be welcome.
Thank you,
Levi
--
Levi Waldron
post-doctoral fellow
Jurisica Lab, Ontario Cancer Institute
Division of Signaling Biology
IBM Life Sciences Discovery Centre
TMDT 9-304D
101 College Street
Toronto, Ontario M5G 1L7
(416)581-7453
[[alternative HTML version deleted]]