|
| void | getAllSearchModifications (std::vector< std::string > &modifications) const |
| | Returns the IDs of all cross-linker modifications that are usable for identification searches (i.e. carry a PSI-MOD accession).
|
| |
| | ModificationsDB (std::vector< std::unique_ptr< ModificationDataProvider > > providers) |
| | Construct from data providers (no file I/O performed by this constructor).
|
| |
| virtual | ~ModificationsDB () |
| | Destructor (public so non-singleton instances created via provider constructor can be destroyed)
|
| |
| Size | getNumberOfModifications () const |
| | Returns the number of modifications read from the unimod.xml file.
|
| |
| const ResidueModification * | getModification (Size index) const |
| | Returns the modification with the given index. note: out-of-bounds check is only performed in debug mode.
|
| |
| void | searchModifications (std::set< const ResidueModification * > &mods, const std::string &mod_name, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| | Collects all modifications which have the given name as synonym.
|
| |
| const ResidueModification * | searchModification (const ResidueModification &mod_in) const |
| | Returns a pointer to an exact match of the given modification if present in the DB.
|
| |
| const ResidueModification * | searchModificationsFast (const std::string &mod_name, bool &multiple_matches, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| | Returns the modification which has the given name as synonym (fast version)
|
| |
| const ResidueModification * | getModification (const std::string &mod_name, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| | Returns the modification with the given name.
|
| |
| bool | has (const std::string &modification) const |
| | Returns true if the modification exists.
|
| |
| const ResidueModification * | addModification (std::unique_ptr< ResidueModification > new_mod) const |
| | Add a new modification to ModificationsDB. If the modification already exists (based on its fullID) it is not added.
|
| |
| const ResidueModification * | addModification (const ResidueModification &new_mod) const |
| | Add a new modification to ModificationsDB. If the modification already exists (based on its fullID) it is not added. A copy will be made on the heap and added to the ModificationsDB otherwise.
|
| |
| Size | findModificationIndex (const std::string &mod_name) const |
| | Returns the index of the modification in the mods_ vector; a unique name must be given.
|
| |
| void | searchModificationsByDiffMonoMass (std::vector< std::string > &mods, double mass, double max_error, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| | Collects all modifications with delta mass inside a tolerance window.
|
| |
| void | searchModificationsByDiffMonoMass (std::vector< const ResidueModification * > &mods, double mass, double max_error, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| |
| void | searchModificationsByDiffMonoMassSorted (std::vector< std::string > &mods, double mass, double max_error, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| | Collects all modifications with delta mass inside a tolerance window and adds them sorted by mass difference.
|
| |
| void | searchModificationsByDiffMonoMassSorted (std::vector< const ResidueModification * > &mods, double mass, double max_error, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| |
| const ResidueModification * | getBestModificationByDiffMonoMass (double mass, double max_error, const std::string &residue="", ResidueModification::TermSpecificity term_spec=ResidueModification::NUMBER_OF_TERM_SPECIFICITY) const |
| | Returns the best matching modification for the given delta mass and residue.
|
| |
| void | getAllSearchModifications (std::vector< std::string > &modifications) const |
| | Collects all modifications that can be used for identification searches.
|
| |
| void | writeTSV (const std::string &filename) const |
| | Writes tab separated entries: FullId,FullName,Origin,AA,TerminusSpecificity,DiffMonoMass (including header) to TSV file.
|
| |
Process-wide singleton database of cross-linking modifications.
CrossLinksDB is a specialization of ModificationsDB that loads cross-linker definitions from the PSI XLMOD ontology (CHEMISTRY/XLMOD.obo, shipped with OpenMS) instead of the general-purpose UniMod/PSI-MOD modifications. It exposes the same lookup, iteration, and matching interface as the base class but its underlying pool contains only entries flagged as cross-links by the OBO provider.
Singleton model
Like ModificationsDB, CrossLinksDB is a singleton: there is at most one instance per process. Obtain it via getInstance — the constructors, destructor, and assignment operator are intentionally private so callers cannot create additional copies. Loading of the XLMOD ontology happens once on the first call to getInstance.
Typical use
std::vector<String> ids;
db->getAllSearchModifications(ids);
static const CrossLinksDB * getInstance()
Returns the process-wide singleton instance.
Definition CrossLinksDB.h:70
Representation of a modification on an amino acid residue.
Definition ResidueModification.h:55
Currently in OpenMS this database is used by MzIdentMLHandler when serialising cross-link identifications, by the pyOpenMS chemistry bindings, and by tests; new cross-link search algorithms should pull their candidate modification list from here rather than from the general ModificationsDB.
- See also
- ModificationsDB