README.md

MALDIquantTools

Description

Additional tools for MALDIquant This package is not intended for public release on CRAN.

Install

install.packages("devtools")
library("devtools")
install_github("MALDIquantTools", "sgibb")

Features

Gelmap Example

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

## 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, xlab="mass [Da]")

gelmap



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