[BioC] multiple ColSideColors-type annotations on a heatmap

James F. Reid james.reid at ifom-ieo-campus.it
Fri May 1 20:28:58 CEST 2009


Hi Levi,

maybe Heatplus is what you are looking for:
  <http://www.bioconductor.org/packages/release/bioc/html/Heatplus.html>

HTH.
J.

Levi Waldron wrote:
> 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
>



More information about the Bioconductor mailing list