plotSpectra: plotSpectra

Description Usage Arguments Details Author(s) Examples

View source: R/plotSpectra.R

Description

Plot the mass spectra from the profile matrix

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)

flagme documentation built on Nov. 8, 2020, 5:24 p.m.