[BioC] question about heatmap.2

James W. MacDonald jmacdon at med.umich.edu
Mon Mar 16 17:13:48 CET 2009


Hi Wei,

dat <- read.csv("file.csv", header = TRUE, row.names = 1)

heatmap.2(as.matrix(dat))

Best,

Jim



Wei Xu wrote:
> Hi, there,
> 
> This is a simple question.
> 
> I'm trying to read my data from a .csv file and draw a heatmap with
> heatmap.2.
> Here is my code,
> 
> data=read.csv("file.csv", header=T)
> x=as.matrix(data[,2:5])
> heatmap.2(x)
> 
> The file.csv includes 5 columns and 118 rows. First columns are the labels
> for the each probe.
> 
>               ID Temperature Agitation Oxygen Adhesion
> BG03_B01      -0.098     0.013  0.007    0.064
> BG04_A09       0.025     0.013 -0.011   -0.054
> BG04_A11      -0.005     0.000  0.018    0.050
> 
> When I had my heatmap, the probes were labeled with the number from 1 to 117
> instead of the ID numbers in the file. My question is how can I label each
> probe in the heatmap with their IDs. Thanks.
> 
> Wei
> 

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826



More information about the Bioconductor mailing list