Skip to content
Prev 246867 / 398506 Next

Heat map in R

Make sure your data is a matrix. There are many examples of expression heatmaps
available on the bioconductor list. After checking out these examples, I would
post to the bioconductor list if you are still having problems. Also
consider a small
example to get you a working heatpmap. You have to install two
bioconductor packages for this by using:

source("http://bioconductor.org/biocLite.R")
biocLite(c("ALL","genefilter"))

This will also install other bioconductor packages  that are needed.

#Then try:

library(ALL)
library(genefilter)
data(ALL)

#  just creating create data

 bcell <- grep("^B", as.character(ALL$BT))
 types <- c("NEG", "BCR/ABL")
 mysub <- which(as.character(ALL$mol.biol) %in% types)
 bc  <- ALL[, intersect(bcell, mysub)]
 bc$BT <- factor(bc$BT)
 bc$mol.biol <- factor(bc$mol.biol)
filter_bc  <- nsFilter(bc,var.cutoff=0.9)
 myfilt  <- filter_bc$eset
e <- exprs(myfilt)
# end of data creation

dim(e)
#[1] 880  79

class(e)
# [1] "matrix"

heatmap(e)
On Wed, Jan 5, 2011 at 4:33 PM, lraeburn at sfu.ca <lraeburn at sfu.ca> wrote: