Skip to main content
Topic: Heatmap of data (Read 5838 times) previous topic - next topic

Heatmap of data

You want to look at a heatmap of your final data, maybe have a dendrogram as well.

 
Code: [Select]
library(xcms)
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE,full=T)
xset <- xcmsSet(cdffiles)
xsg <- group(xset)
xsg <- retcor(xsg)
xsg <- group(xsg,bw=10)
xsg <- fillPeaks(xsg)

Load up the default toy dataset. Extract the intensities for each sample for each feature from the xcmsSet object. We'll take the 'into' group here but if you have used centWave for peak detection then you can also use 'intb' which is the background subtracted intensity.



Code: [Select]
library(gplots)
dat<-groupval(xsg, "medret", "into")
heatmap.2(dat, col=redgreen, scale="row", trace="none")

This code will produce a heatmap of all of your data matrix. The scaling will scale each row (feature) of your data into a Z-score. For more on z-scores look at
http://http://en.wikipedia.org/wiki/Standard_score



[attachment deleted by admin]
~~
H. Paul Benton
Scripps Research Institute
If you have an error with XCMS Online please send me the JOBID and submit an error via the XCMS Online contact page