OpenMS
Loading...
Searching...
No Matches
GlycanStructure.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
13namespace OpenMS
14{
26class OPENMS_DLLAPI GlycanStructure
27{
28public:
30 struct OPENMS_DLLAPI Node
31 {
33 std::optional<Size> parent;
34 std::string linkage;
35 };
36
46 std::optional<Size> parent = std::nullopt,
47 const std::string& linkage = "");
48
50 const std::vector<Node>& getNodes() const;
53
54private:
55 std::vector<Node> nodes_;
56};
57} // namespace OpenMS
A rooted glycan tree, with the reducing-end monosaccharide at node zero.
Definition GlycanStructure.h:27
std::vector< Node > nodes_
Definition GlycanStructure.h:55
ProForma::GlycanComposition::Monosaccharide monosaccharide
Definition GlycanStructure.h:32
std::string linkage
Definition GlycanStructure.h:34
ProForma::GlycanComposition getComposition() const
Return the composition, retaining named and formula components.
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.
std::optional< Size > parent
Definition GlycanStructure.h:33
A monosaccharide and its linkage towards the reducing end.
Definition GlycanStructure.h:31
std::variant< std::string, FormulaTag > Monosaccharide
A monosaccharide component: either a name (String) or a custom formula (FormulaTag)
Definition ProForma.h:242
Glycan composition specification.
Definition ProForma.h:240
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19