gelmap: This function draws a simple pseudo-gelmap.

Description Usage Arguments See Also Examples

View source: R/gelmap-functions.R

Description

This function draws a simple pseudo-gelmap.

Usage

1
2
3
  gelmap(x, col = gray((255:1)/255), rowLabels, dendrogram,
    dendrogramRatio = 1/5, xlab = "mass", cex.axis = 0.75,
    ...)

Arguments

x

a list of MassSpectrum or a list of MassPeaks objects.

col

gelmap colours.

rowLabels

labels of rows.

dendrogram

a dendrogram which is plotted on the left of the gelmap.

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 cex).

...

further arguments passed to image.

See Also

MassPeaks, MassSpectrum

Examples

 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
28
29
30
31
library("MALDIquant")
library("MALDIquantTools")
data(fiedler2009subset)

## select some tumor/control subset
spectra <- fiedler2009subset[9:16]

## run preprocessing
spectra <- transformIntensity(spectra, sqrt)
spectra <- transformIntensity(spectra, movingAverage, halfWindowSize=2)
spectra <- removeBaseline(spectra)
spectra <- standardizeTotalIonCurrent(spectra)
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="")

## plot gelmap
gelmap(peaks, rowLabels=rowLabels)

## run clustering and create dendrogram
iM <- intensityMatrix(peaks)
iM[is.na(iM)] <- 0
d <- dist(iM, method="euclidean")
d <- as.dendrogram(hclust(d, method="complete"), hang=-1)

## plot gelmap
gelmap(peaks, rowLabels=rowLabels, dendrogram=d)

sgibb/MALDIquantTools documentation built on May 26, 2017, 6:55 a.m.