PeptideSpectrum: Plot Annotated Peptide Fragmentation Mass Spectrum

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/PeptideSpectrum.R

Description

Identify the b- and y-ions or c- and z-ions in a peptide fragmentation mass spectrum given the sequence. Generate a plot and table identifying the fragment ions.

Usage

1
2
PeptideSpectrum(expt, theory, t = 0.4, b = 5, label = "", xlim = c(100, 1500), 
                supress = FALSE)

Arguments

expt

data frame containing the experimental MS/MS peak list with the m/z values in the first column and corresponding intensities in the second

theory

data frame of theoretical fragment ions generated by FragmentPeptide

t

numeric value specifying the m/z tolerance for matching theoretical fragment ions to experimental peaks

b

numeric value specifying the baseline threshold for peak identification. Expressed as a percent of the maximum intensity.

label

character string to label the spectrum.

xlim

numeric vector of length 2, defining the beginning and ending values of the x-axis.

supress

logical specifying whether or not to supress the peak annotations.

Details

A graphics window of width = 10 and height = 5.5 seems to work well. A crude attempt is made to prevent overlapping peak annotations. If this is unsuccessful, use supress = TRUE and then add the annotations using the text function. If two or more peak identifications are made within the set tolerance, all identifications will be printed, overlapping, on the plot.

Value

Generates an annotated spectrum and a data frame showing the matches between the experimental peaks and the theoretical fragment ions. The column names refer to the experimental m/z value (expt_mz), the experimental peak intensity (expt_int) and the error between the experimental and theoretical m/z values (error). The other column names are the same as for FragmentPeptide.

Author(s)

Nathan G. Dodder

See Also

FragmentPeptide

Examples

1
2
3
4
5
## plot spectrum of peptide NIDALSGMEGR
t <- FragmentPeptide("NIDALSGMEGR")   # generate theoretical fragment ions
dev.new(width = 10, height = 5.5)
PeptideSpectrum(example.spectrum.peptide, t, label = "CID", xlim = c(100, 1200))
mtext("Peptide fragmentation mass spectrum", line = 1)

Example output

Loading required package: grid
   expt_mz expt_intensity      ms1seq    ms1z1  ms1z2   ms1z3    ms2seq ms2type
1   228.12             11 NIDALSGMEGR 1162.552 581.78 388.189        NI  [b2]1+
2   232.20              8 NIDALSGMEGR 1162.552 581.78 388.189        GR  [y2]1+
3   343.08             16 NIDALSGMEGR 1162.552 581.78 388.189       NID  [b3]1+
4   414.48             12 NIDALSGMEGR 1162.552 581.78 388.189      NIDA  [b4]1+
5   492.12              6 NIDALSGMEGR 1162.552 581.78 388.189      MEGR  [y4]1+
6   549.48             43 NIDALSGMEGR 1162.552 581.78 388.189     GMEGR  [y5]1+
7   636.48             94 NIDALSGMEGR 1162.552 581.78 388.189    SGMEGR  [y6]1+
8   749.52             36 NIDALSGMEGR 1162.552 581.78 388.189   LSGMEGR  [y7]1+
9   820.56             74 NIDALSGMEGR 1162.552 581.78 388.189  ALSGMEGR  [y8]1+
10  935.52            100 NIDALSGMEGR 1162.552 581.78 388.189 DALSGMEGR  [y9]1+
     ms2mz  error
1  228.134 -0.014
2  232.140  0.060
3  343.161 -0.081
4  414.198  0.282
5  492.223 -0.103
6  549.245  0.235
7  636.277  0.203
8  749.361  0.159
9  820.398  0.162
10 935.425  0.095

OrgMassSpecR documentation built on May 2, 2019, 6:48 p.m.