| calculateFragments-methods {MSnbase} | R Documentation |
These method calculates a-, b-, c-, x-, y- and z-ions produced by fragmentation.
sequence |
|
object |
Object of class |
tolerance |
|
method |
|
type |
|
z |
|
modifications |
named |
neutralLoss |
|
verbose |
|
signature(sequence = "character", object = "missing", ...)Calculates the theoretical fragments for a peptide sequence.
Returns a data.frame with the columns c("mz", "ion", "type",
"pos", "z", "seq").
signature(sequence = "character", object = "Spectrum2", ...)Calculates and matches the theoretical fragments for a peptide
sequence and a "Spectrum2" object.
The ... arguments are passed to the internal functions.
Currently tolerance, method and relative are
supported.
You could change the tolerance (default 0.1) and
decide whether this tolerance should be applied relative to the target m/z
(relative = TRUE) or absolute (default relative = FALSE)
to match the theoretical fragment MZ with the MZ of the spectrum. When
(relative = TRUE) the mass tolerance window is set to target mz
+/- (target mz * tolerance) and target mz +/- tolerance otherwise.
In cases of multiple matches use method to select the peak with
the highest intensity (method = "highest", default) respectively
closest MZ (method = "closes"). If method = "all" is set
all possible matches in the current tolerance range are reported.
Returns the same data.frame as above but the mz column
represents the matched MZ values of the spectrum. Additionally there
is a column error that contains the difference between the observed
MZ (from the spectrum) to the theoretical fragment MZ.
Sebastian Gibb <mail@sebastiangibb.de>
## find path to a mzXML file
file <- dir(system.file(package = "MSnbase", dir = "extdata"),
full.name = TRUE, pattern = "mzXML$")
## create basic MSnExp
msexp <- readMSData(file, centroided = FALSE)
## centroid them
msexp <- pickPeaks(msexp)
## calculate fragments for ACE with default modification
calculateFragments("ACE", modifications=c(C=57.02146))
## calculate fragments for ACE with an addition N-terminal modification
calculateFragments("ACE", modifications=c(C=57.02146, Nterm=229.1629))
## calculate fragments for ACE without any modifications
calculateFragments("ACE", modifications=NULL)
calculateFragments("VESITARHGEVLQLRPK",
type=c("a", "b", "c", "x", "y", "z"),
z=1:2)
calculateFragments("VESITARHGEVLQLRPK", msexp[[1]])
## neutral loss
defaultNeutralLoss()
## disable water loss on the C terminal
defaultNeutralLoss(disableWaterLoss="Cterm")
## real example
calculateFragments("PQR")
calculateFragments("PQR",
neutralLoss=defaultNeutralLoss(disableWaterLoss="Cterm"))
calculateFragments("PQR",
neutralLoss=defaultNeutralLoss(disableAmmoniaLoss="Q"))
## disable neutral loss completely
calculateFragments("PQR", neutralLoss=NULL)