![]() |
OpenMS
|
Generate positive-mode glycan and singly glycosylated peptide fragments. More...
#include <OpenMS/CHEMISTRY/TheoreticalGlycanSpectrumGenerator.h>
Classes | |
| struct | Fragment |
| One interpretation of a fragment, including its charge and attachment. More... | |
| struct | Options |
| Generation settings; all size and charge ranges are inclusive. More... | |
| struct | PeptideRetention |
| Independent choices of glycan material retained by a backbone ion. More... | |
Public Types | |
| enum class | IonType { DIAGNOSTIC , B , C , Y , Z , PEPTIDE } |
| Glycan series and peptide backbone fragments are kept distinct. More... | |
| enum class | FragmentationMethod { HCD , ETD , ETHCD } |
| EThcD combines b/y and c/z ions with intact glycan retention. More... | |
| using | Composition = ProForma::GlycanComposition |
Public Member Functions | |
| TheoreticalGlycanSpectrumGenerator () | |
| Construct with default options. | |
| TheoreticalGlycanSpectrumGenerator (const Options &options) | |
| Construct with validated options. | |
| void | setOptions (const Options &options) |
| Set options; throws InvalidParameter for invalid ranges, loss formulas or rules. | |
| const Options & | getOptions () const |
| Return the current options. | |
| std::vector< Fragment > | getFragments (const Composition &composition) const |
| Generate diagnostic and bounded composition B/Y (optionally C/Z) ions. | |
| std::vector< Fragment > | getFragments (const GlycanStructure &structure) const |
| Generate structural B/Y/C/Z and internal B fragments from a tree. | |
| std::vector< Fragment > | getGlycopeptideFragments (const AASequence &peptide, const Composition &composition, Size attachment_position, FragmentationMethod method) const |
| Generate glycan and peptide fragments for one localized glycan. | |
| std::vector< Fragment > | getGlycopeptideFragments (const AASequence &peptide, const GlycanStructure &structure, Size attachment_position, FragmentationMethod method) const |
| As above, using topology for glycan fragments. | |
Static Public Member Functions | |
| static MSSpectrum | toSpectrum (const std::vector< Fragment > &fragments) |
| Convert fragment interpretations to a fresh annotated MS2 spectrum. | |
Private Member Functions | |
| std::vector< Fragment > | generate_ (const Composition &composition, const GlycanStructure *structure, const AASequence *peptide, Size site, FragmentationMethod method) const |
Private Attributes | |
| Options | options_ |
Generate positive-mode glycan and singly glycosylated peptide fragments.
Composition fragments are explicitly labelled as such: their compositions are possibilities, not claims about topology. Structural fragments are connected subtrees. A B fragment carries a root cleavage and, for internal fragments, additional branch cleavages. Y fragments retain the reducing end. Node indices identify cleaved bonds by their non-reducing-side node (zero is the attachment).
Residue formulas exclude water: B = residue sum, C = B + H2O, Y = reducing end + retained residues, Z = Y - H2O per branch cleavage. Free glycans use H2O as the reducing end; glycopeptides use the peptide. Positive charges add protons. Intensities are uniformly 1, not predicted.
mzPAF does not define glycan series. getAnnotation() therefore uses its named compound syntax, keeping topology/composition and attachment in the name. Resource limits fail explicitly rather than returning a truncated spectrum.
| struct OpenMS::TheoreticalGlycanSpectrumGenerator::Options |
Generation settings; all size and charge ranges are inclusive.
| Class Members | ||
|---|---|---|
| bool | add_b_ions = true | |
| bool | add_c_ions = false | |
| bool | add_diagnostic_ions = true | |
| bool | add_internal_fragments = true | |
| bool | add_y_ions = true | |
| bool | add_z_ions = false | |
| bool | allow_structural = true | False selects the composition fallback even for a tree. |
| Int | max_charge = 2 | |
| Size | max_cleavages = 2 | Includes the root cleavage of B/internal fragments. |
| Size | max_composition_size = 3 | Y0 is included separately when Y is enabled. |
| Size | max_fragments = 10000 | Includes charge states, losses and peptide fragments. |
| Int | max_oxonium_charge = 1 | |
| Size | max_states = 100000 | Also bounds enumeration work, including rejected candidates. |
| Int | min_charge = 1 | |
| Size | min_composition_size = 1 | Retained residues for both composition B and Y. |
| Int | min_oxonium_charge = 1 | |
| vector< EmpiricalFormula > | neutral_losses | Single losses, not a combinatorial loss ladder. |
| map< char, PeptideRetention > | peptide_retention | Optional overrides for b/y/c/z. |
| map< string, vector< EmpiricalFormula > > | specific_neutral_losses | Applied only if that residue is retained. |
| struct OpenMS::TheoreticalGlycanSpectrumGenerator::PeptideRetention |
Independent choices of glycan material retained by a backbone ion.
| Class Members | ||
|---|---|---|
| bool | intact = false | Include the complete glycan. |
| bool | stripped = true | Include the peptide with no glycan. |
| vector< Composition > | stubs | Explicit retained compositions, each a subset of the input. |
|
strong |
|
strong |
Construct with default options.
|
explicit |
Construct with validated options.
|
private |
| std::vector< Fragment > getFragments | ( | const Composition & | composition | ) | const |
Generate diagnostic and bounded composition B/Y (optionally C/Z) ions.
| [in] | composition | ProForma composition, with nonnegative counts |
| Exception::ElementNotFound | if a named monosaccharide is unknown to MonosaccharideDB |
| Exception::InvalidParameter | for invalid chemistry or exhausted resource limits |
| std::vector< Fragment > getFragments | ( | const GlycanStructure & | structure | ) | const |
Generate structural B/Y/C/Z and internal B fragments from a tree.
| [in] | structure | Rooted glycan tree |
| std::vector< Fragment > getGlycopeptideFragments | ( | const AASequence & | peptide, |
| const Composition & | composition, | ||
| Size | attachment_position, | ||
| FragmentationMethod | method | ||
| ) | const |
Generate glycan and peptide fragments for one localized glycan.
The peptide must exclude the glycan modification; other peptide modifications are preserved. HCD defaults to b/y ions stripped or with one HexNAc (if present). ETD defaults to c/z ions with the full glycan. EThcD generates b/y/c/z ions with the full glycan; per-series overrides can add stripped/stub ions. Backbone ions named peptide:zN use the radical z+1 form (Residue::Zp1Ion) for both ETD and EThcD; this is distinct from the glycan Z series. Only backbone fragments containing the attachment receive retained glycan mass. Explicit stubs allow, for example, HexNAc+Fuc retention without assuming a core topology from a composition. ETD omits glycan cleavage ions by default.
| [in] | peptide | Peptide without its glycan modification |
| [in] | composition | Glycan composition |
| [in] | attachment_position | Zero-based residue index in the peptide |
| [in] | method | Fragmentation method |
| Exception::ElementNotFound | if a named monosaccharide is unknown to MonosaccharideDB |
| Exception::InvalidParameter | for an empty glycan, invalid site, or impossible stub |
| std::vector< Fragment > getGlycopeptideFragments | ( | const AASequence & | peptide, |
| const GlycanStructure & | structure, | ||
| Size | attachment_position, | ||
| FragmentationMethod | method | ||
| ) | const |
As above, using topology for glycan fragments.
| const Options & getOptions | ( | ) | const |
Return the current options.
| void setOptions | ( | const Options & | options | ) |
Set options; throws InvalidParameter for invalid ranges, loss formulas or rules.
|
static |
Convert fragment interpretations to a fresh annotated MS2 spectrum.
| [in] | fragments | Fragments to convert |
|
private |