Additional tools for MALDIquant This package is not intended for public release on CRAN.
This package is abandoned. There is no further development and no guarantee that it is still working.
install.packages("devtools")
library("devtools")
install_github("sgibb/MALDIquantTools")
- Calculate FWHM.
- Find reference peaks in each individual spectrum.
- Find monoisotopic peaks in spectra (moved to MALDIquant)
- Draw gelmaps
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]")