![]() |
OpenMS
|
A rooted glycan tree, with the reducing-end monosaccharide at node zero. More...
#include <OpenMS/CHEMISTRY/GlycanStructure.h>
Classes | |
| struct | Node |
| A monosaccharide and its linkage towards the reducing end. More... | |
Public Member Functions | |
| Size | addMonosaccharide (const ProForma::GlycanComposition::Monosaccharide &monosaccharide, std::optional< Size > parent=std::nullopt, const std::string &linkage="") |
| Add the root or a child and return its stable index. | |
| const std::vector< Node > & | getNodes () const |
| Return the nodes in insertion order. | |
| ProForma::GlycanComposition | getComposition () const |
| Return the composition, retaining named and formula components. | |
Private Attributes | |
| std::vector< Node > | nodes_ |
A rooted glycan tree, with the reducing-end monosaccharide at node zero.
Nodes have stable, zero-based indices. Each new node is attached to an existing parent, so disconnected graphs and cycles cannot be constructed. Linkage labels (for example "beta1-4") are optional metadata; glycosidic fragment masses do not depend on them. Monosaccharide formulas describe residues (water excluded), as in ProForma. This is not a WURCS parser or a GNOme resolver.
| struct OpenMS::GlycanStructure::Node |
A monosaccharide and its linkage towards the reducing end.
| Class Members | ||
|---|---|---|
| string | linkage | |
| Monosaccharide | monosaccharide | |
| optional< Size > | parent | |
| Size addMonosaccharide | ( | const ProForma::GlycanComposition::Monosaccharide & | monosaccharide, |
| std::optional< Size > | parent = std::nullopt, |
||
| const std::string & | linkage = "" |
||
| ) |
Add the root or a child and return its stable index.
| [in] | monosaccharide | Named residue or neutral, positive empirical formula |
| [in] | parent | No value for the root; an existing node index otherwise |
| [in] | linkage | Optional linkage description |
| Exception::InvalidParameter | for an invalid parent or charged/empty formula |
| Exception::ElementNotFound | for an unknown monosaccharide |
| ProForma::GlycanComposition getComposition | ( | ) | const |
Return the composition, retaining named and formula components.
| const std::vector< Node > & getNodes | ( | ) | const |
Return the nodes in insertion order.
|
private |