plotSpectra {flagme}R Documentation

plotSpectra

Description

Plot the mass spectra from the profile matrix

Usage

plotSpectra(object, sample, spectraID, normalize = TRUE, ...)

Arguments

object

an object of class "peaksDataset" where to keep the mass spectra; both abundance (y) than m/z (x)

sample

character, the sample from were to plot the mass spectra

spectraID

numerical, a vector containing the index of the spectra to be plotted.

normalize

logical, if TRUE normalize the intensity of the mass peak to 100, the most abundant is 100 are scaled consequetially

...

other parameter passed to the plot() function

Details

Plot the deconvoluted mass spectra from the profile matrix

Author(s)

riccardo.romoli@unifi.it

Examples

gcmsPath <- paste(find.package("gcspikelite"), "data", sep="/")
cdfFiles <- dir(gcmsPath,"CDF", full=TRUE)
# read data, peak detection results
pd <- peaksDataset(cdfFiles[1:3], mz=seq(50,550), rtrange=c(7.5,10.5))
pd <- addXCMSPeaks(files=cdfFiles[1:3], object=pd, peakPicking=c('mF'),
                   snthresh=3, fwhm=10,  step=0.1, steps=2, mzdiff=0.5,
                   sleep=0)
## align two chromatogram
pA <- peaksAlignment(pd@peaksdata[[1]], pd@peaksdata[[2]],
                     pd@peaksrt[[1]], pd@peaksrt[[2]], D=50,
                     metric=3, compress=FALSE, type=2, penality=0.2)
pA@v$match
## plot the mass spectra
par(mfrow=c(2,1))
plotSpectra(object=pd, sample=cdfFiles[1], spectraID=10)
plotSpectra(object=pd, sample=cdfFiles[2], spectraID=12)

[Package flagme version 1.38.1 Index]