Description Usage Arguments See Also Examples
View source: R/gelmap-functions.R
This function draws a simple pseudo-gelmap.
1 2 | gelmap(x, col = gray((255:1)/255), rowLabels, dendrogram,
dendrogramRatio = 1/5, xlab = "mass", cex.axis = 0.75, ...)
|
x |
an 'intensityMatrix'. |
col |
gelmap colours. |
rowLabels |
labels of rows. |
dendrogram |
a |
dendrogramRatio |
ratio of width of dendrogram to gelmap. |
xlab |
a label for the x axis. |
cex.axis |
magnification to be used for axis annotation (relative to
current setting of |
... |
further arguments passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library("MALDIquant")
library("MALDIquantTools")
data(fiedler2009subset)
## select some tumor/control subset
spectra <- fiedler2009subset[9:16]
## run preprocessing
spectra <- transformIntensity(spectra, method="sqrt")
spectra <- smoothIntensity(spectra, method="MovingAverage", halfWindowSize=2)
spectra <- removeBaseline(spectra, method="SNIP")
spectra <- calibrateIntensity(spectra, method="TIC")
peaks <- detectPeaks(spectra)
peaks <- binPeaks(peaks)
## create labels
tumor <- sapply(peaks, function(x)grepl(pattern="tumor", x=metaData(x)$file))
fullName <- sapply(peaks, function(x)metaData(x)$fullName)
rowLabels <- paste(fullName, " (", ifelse(tumor, "T", "C"), ")", sep="")
## run clustering and create dendrogram
iM <- intensityMatrix(peaks, spectra)
d <- dist(iM, method="euclidean")
d <- as.dendrogram(hclust(d, method="complete"), hang=-1)
## plot gelmap
gelmap(iM, rowLabels=rowLabels, dendrogram=d, xlab="mass [Da]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.