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
gelmap(x, col = gray((255:1)/255), rowLabels, dendrogram,
  dendrogramRatio = 1/5, xlab = "mass", cex.axis = 0.75, ...)

Arguments

x

an 'intensityMatrix'.

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

intensityMatrix

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
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]")

sgibb/MALDIquantTools documentation built on Oct. 18, 2019, 8:02 p.m.