OpenMS
2.7.0
|
Representation of a set of modification definitions. More...
#include <OpenMS/CHEMISTRY/ModificationDefinitionsSet.h>
Public Member Functions | |
Constructor and Destructors | |
ModificationDefinitionsSet () | |
default constructor More... | |
ModificationDefinitionsSet (const ModificationDefinitionsSet &rhs) | |
copy constructor More... | |
ModificationDefinitionsSet (const StringList &fixed_modifications, const StringList &variable_modifications) | |
detailed constructor with StringLists More... | |
virtual | ~ModificationDefinitionsSet () |
destructor More... | |
Accessors | |
void | setMaxModifications (Size max_mod) |
sets the maximal number of modifications allowed per peptide More... | |
Size | getMaxModifications () const |
return the maximal number of modifications allowed per peptide More... | |
Size | getNumberOfModifications () const |
returns the number of modifications stored in this set More... | |
Size | getNumberOfFixedModifications () const |
returns the number of fixed modifications stored in this set More... | |
Size | getNumberOfVariableModifications () const |
returns the number of variable modifications stored in this set More... | |
void | addModification (const ModificationDefinition &mod_def) |
adds a modification definition to the set More... | |
void | setModifications (const std::set< ModificationDefinition > &mod_defs) |
sets the modification definitions More... | |
void | setModifications (const String &fixed_modifications, const String &variable_modifications) |
set the modification definitions from a string More... | |
void | setModifications (const StringList &fixed_modifications, const StringList &variable_modifications) |
same as above, but using StringList instead of comma separated strings More... | |
std::set< ModificationDefinition > | getModifications () const |
returns the stored modification definitions More... | |
const std::set< ModificationDefinition > & | getFixedModifications () const |
returns the stored fixed modification definitions More... | |
const std::set< ModificationDefinition > & | getVariableModifications () const |
returns the stored variable modification definitions More... | |
std::set< String > | getModificationNames () const |
returns only the names of the modifications stored in the set More... | |
void | getModificationNames (StringList &fixed_modifications, StringList &variable_modifications) const |
populates the output lists with the modification names (use e.g. for ProteinIdentification::SearchParameters) More... | |
std::set< String > | getFixedModificationNames () const |
returns only the names of the fixed modifications More... | |
std::set< String > | getVariableModificationNames () const |
returns only the names of the variable modifications More... | |
Assignment | |
ModificationDefinitionsSet & | operator= (const ModificationDefinitionsSet &element) |
assignment operator More... | |
Predicates | |
std::set< ModificationDefinition > | variable_mods_ |
std::set< ModificationDefinition > | fixed_mods_ |
Size | max_mods_per_peptide_ |
bool | isCompatible (const AASequence &peptide) const |
returns true if the peptide is compatible with the definitions, e.g. does not contain other modifications More... | |
bool | operator== (const ModificationDefinitionsSet &rhs) const |
equality operator More... | |
bool | operator!= (const ModificationDefinitionsSet &rhs) const |
inequality operator More... | |
void | findMatches (std::multimap< double, ModificationDefinition > &matches, double mass, const String &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY, bool consider_fixed=true, bool consider_variable=true, bool is_delta=true, double tolerance=0.01) const |
Finds modifications in the set that match a given (delta) mass. More... | |
void | inferFromPeptides (const std::vector< PeptideIdentification > &peptides) |
Infers the sets of defined modifications from the modifications present on peptide identifications. More... | |
static void | addMatches_ (std::multimap< double, ModificationDefinition > &matches, double mass, const String &residue, ResidueModification::TermSpecificity term_spec, const std::set< ModificationDefinition > &source, bool is_delta, double tolerance) |
helper function for findMatches() - finds matching modifications in source and adds them to matches More... | |
Representation of a set of modification definitions.
This class enhances the modification definitions as defined in the class ModificationDefinition into a set of definitions. This is also e.g. used as input parameters in search engines.
default constructor
ModificationDefinitionsSet | ( | const ModificationDefinitionsSet & | rhs | ) |
copy constructor
ModificationDefinitionsSet | ( | const StringList & | fixed_modifications, |
const StringList & | variable_modifications | ||
) |
detailed constructor with StringLists
|
virtual |
destructor
|
staticprotected |
helper function for findMatches() - finds matching modifications in source
and adds them to matches
void addModification | ( | const ModificationDefinition & | mod_def | ) |
adds a modification definition to the set
void findMatches | ( | std::multimap< double, ModificationDefinition > & | matches, |
double | mass, | ||
const String & | residue = "" , |
||
ResidueModification::TermSpecificity | term_spec = ResidueModification::NUMBER_OF_TERM_SPECIFICITY , |
||
bool | consider_fixed = true , |
||
bool | consider_variable = true , |
||
bool | is_delta = true , |
||
double | tolerance = 0.01 |
||
) | const |
Finds modifications in the set that match a given (delta) mass.
matches | Matching modifications (output), sorted by mass error |
mass | Query mass |
residue | Query residue |
term_spec | Query term specificity |
consider_variable | Consider the variable modifications? |
consider_fixed | Consider the fixed modifications? |
is_delta | Is mass a delta mass (mass difference)? |
tolerance | Numeric tolerance (in Da) for mass matching |
Exception::IllegalArgument | if both consider_variable and consider_fixed are false |
std::set<String> getFixedModificationNames | ( | ) | const |
returns only the names of the fixed modifications
const std::set<ModificationDefinition>& getFixedModifications | ( | ) | const |
returns the stored fixed modification definitions
Size getMaxModifications | ( | ) | const |
return the maximal number of modifications allowed per peptide
std::set<String> getModificationNames | ( | ) | const |
returns only the names of the modifications stored in the set
void getModificationNames | ( | StringList & | fixed_modifications, |
StringList & | variable_modifications | ||
) | const |
populates the output lists with the modification names (use e.g. for ProteinIdentification::SearchParameters)
std::set<ModificationDefinition> getModifications | ( | ) | const |
returns the stored modification definitions
Size getNumberOfFixedModifications | ( | ) | const |
returns the number of fixed modifications stored in this set
Size getNumberOfModifications | ( | ) | const |
returns the number of modifications stored in this set
Size getNumberOfVariableModifications | ( | ) | const |
returns the number of variable modifications stored in this set
std::set<String> getVariableModificationNames | ( | ) | const |
returns only the names of the variable modifications
const std::set<ModificationDefinition>& getVariableModifications | ( | ) | const |
returns the stored variable modification definitions
void inferFromPeptides | ( | const std::vector< PeptideIdentification > & | peptides | ) |
Infers the sets of defined modifications from the modifications present on peptide identifications.
bool isCompatible | ( | const AASequence & | peptide | ) | const |
returns true if the peptide is compatible with the definitions, e.g. does not contain other modifications
bool operator!= | ( | const ModificationDefinitionsSet & | rhs | ) | const |
inequality operator
ModificationDefinitionsSet& operator= | ( | const ModificationDefinitionsSet & | element | ) |
assignment operator
bool operator== | ( | const ModificationDefinitionsSet & | rhs | ) | const |
equality operator
void setMaxModifications | ( | Size | max_mod | ) |
sets the maximal number of modifications allowed per peptide
void setModifications | ( | const std::set< ModificationDefinition > & | mod_defs | ) |
sets the modification definitions
set the modification definitions from a string
The strings should contain a comma separated list of modifications. The names can be PSI-MOD identifier or any other unique name supported by PSI-MOD. TermSpec definitions and other specific definitions are given by the modifications themselves.
void setModifications | ( | const StringList & | fixed_modifications, |
const StringList & | variable_modifications | ||
) |
same as above, but using StringList instead of comma separated strings
|
protected |
|
protected |
|
protected |