calculateFragments | R Documentation |
These method calculates a-, b-, c-, x-, y- and z-ions produced by fragmentation.
Available methods
The default method with signature sequence = "character"
and
object = "missing"
calculates the theoretical fragments for a
peptide sequence. It returns a data.frame
with the columns
mz
, ion
, type
, pos
, z
and seq
.
Additional method can be defined that will adapt their behaviour
based on spectra defined in object
. See for example the MSnbase
package that implements a method for objects of class
Spectrum2
.
## S4 method for signature 'character,missing'
calculateFragments(
sequence,
type = c("b", "y"),
z = 1,
modifications = c(C = 57.02146),
neutralLoss = defaultNeutralLoss(),
verbose = TRUE
)
sequence |
character() providing a peptide sequence. |
type |
|
z |
|
modifications |
A named |
neutralLoss |
There is a helper function `defaultNeutralLoss()` that returns the correct list. It has two arguments `disableWaterLoss` and `disableAmmoniaLoss` to remove single neutral loss options. See the example section for use cases. |
verbose |
|
The methods with oject = "missing"
returns a
data.frame
.
Sebastian Gibb mail@sebastiangibb.de
## 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)
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.