OpenMS
Loading...
Searching...
No Matches
CometModification.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: Copilot $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
15#include <vector>
16#include <cmath>
17#include <iomanip>
18#include <sstream>
19
20namespace OpenMS
21{
22
42struct OPENMS_DLLAPI CometModification
43{
45 static constexpr double MASS_TOLERANCE = 1e-6;
46
47 double mass{0.0};
49 int binary_group{0};
50 int max_mods_per_peptide{5};
51 int term_distance{-1};
52 int nc_term{0};
53 bool required{false};
54
56 CometModification() = default;
57
59 CometModification(const ResidueModification* mod, int binary_grp, int max_mods);
60
62 bool isMergeableWith(const CometModification& other) const;
63
65 void merge(const CometModification& other);
66
69
71 static std::vector<CometModification> mergeModifications(const std::vector<CometModification>& mods);
72};
73
74} // namespace OpenMS
Representation of a modification on an amino acid residue.
Definition ResidueModification.h:55
A more convenient string class.
Definition String.h:34
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
Helper struct to represent a Comet variable modification entry.
Definition CometModification.h:43
void merge(const CometModification &other)
Merge another modification into this one.
CometModification(const ResidueModification *mod, int binary_grp, int max_mods)
Constructor from ResidueModification.
String toCometString(Size index) const
Generate the Comet param file line format for the given 1-based index.
CometModification()=default
Default constructor.
bool isMergeableWith(const CometModification &other) const
Check if this modification can be merged with another.
static std::vector< CometModification > mergeModifications(const std::vector< CometModification > &mods)
Merge a vector of CometModifications, combining compatible entries.
String residues
Residue(s) this modification applies to (e.g., "K", "KR", "n", "nKR")
Definition CometModification.h:48