![]() |
OpenMS
|
Helper struct to represent a Comet variable modification entry. More...
#include <OpenMS/ANALYSIS/ID/CometModification.h>
Public Member Functions | |
| CometModification ()=default | |
| Default constructor. | |
| CometModification (const ResidueModification *mod, int binary_grp, int max_mods) | |
| Constructor from ResidueModification. | |
| bool | isMergeableWith (const CometModification &other) const |
| Check if this modification can be merged with another. | |
| void | merge (const CometModification &other) |
| Merge another modification into this one. | |
| String | toCometString (Size index) const |
| Generate the Comet param file line format for the given 1-based index. | |
Static Public Member Functions | |
| static std::vector< CometModification > | mergeModifications (const std::vector< CometModification > &mods) |
| Merge a vector of CometModifications, combining compatible entries. | |
Public Attributes | |
| double | mass {0.0} |
| Modification mass difference. | |
| String | residues |
| Residue(s) this modification applies to (e.g., "K", "KR", "n", "nKR") | |
| int | binary_group {0} |
| Binary modification group (for SILAC etc.) | |
| int | max_mods_per_peptide {5} |
| Maximum number of this modification per peptide. | |
| int | term_distance {-1} |
| Terminal distance (-1 = no constraint, 0 = terminal only) | |
| int | nc_term {0} |
| Terminal specificity: 0=protein N-term, 1=protein C-term, 2=peptide N-term, 3=peptide C-term. | |
| bool | required {false} |
| Whether this modification is required. | |
Static Public Attributes | |
| static constexpr double | MASS_TOLERANCE = 1e-6 |
| Mass tolerance for comparing modification masses. | |
Helper struct to represent a Comet variable modification entry.
This struct facilitates merging of modifications with the same mass and compatible term specificity. Comet supports specifying multiple residues in a single modification entry (e.g., "KR" for lysine and arginine), which significantly improves search performance.
Merging rules based on Comet's internal logic and documentation:
When terminal and amino acid mods merge, term_distance becomes -1 and nc_term becomes 0, because the terminal specificity is encoded by 'n'/'c' in the residue string (as per Comet documentation: e.g., "42.010565 nK 0 3 -1 0 0 0.0").
|
default |
Default constructor.
| CometModification | ( | const ResidueModification * | mod, |
| int | binary_grp, | ||
| int | max_mods | ||
| ) |
Constructor from ResidueModification.
| bool isMergeableWith | ( | const CometModification & | other | ) | const |
Check if this modification can be merged with another.
| void merge | ( | const CometModification & | other | ) |
Merge another modification into this one.
|
static |
Merge a vector of CometModifications, combining compatible entries.
Generate the Comet param file line format for the given 1-based index.
| int binary_group {0} |
Binary modification group (for SILAC etc.)
| double mass {0.0} |
Modification mass difference.
|
staticconstexpr |
Mass tolerance for comparing modification masses.
| int max_mods_per_peptide {5} |
Maximum number of this modification per peptide.
| int nc_term {0} |
Terminal specificity: 0=protein N-term, 1=protein C-term, 2=peptide N-term, 3=peptide C-term.
| bool required {false} |
Whether this modification is required.
| String residues |
Residue(s) this modification applies to (e.g., "K", "KR", "n", "nKR")
| int term_distance {-1} |
Terminal distance (-1 = no constraint, 0 = terminal only)