Collect, serialise and re-register the definitions of tool-defined modifications.
More...
#include <OpenMS/FORMAT/ModificationDefinitionIO.h>
|
| static bool | isDefinition (const ResidueModification *mod) |
| | The selection predicate: a named modification whose definition must travel with the file.
|
| |
| static std::map< std::string, std::set< const ResidueModification * > > | collect (const std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids) |
| | Collect, per run identifier, the definitions the identifications reference.
|
| |
| static std::map< std::string, std::set< const ResidueModification * > > | collect (const FeatureMap &map) |
| | collect() over a FeatureMap: its runs, the identifications of every feature (subordinates included) and the unassigned ones
|
| |
| static std::map< std::string, std::set< const ResidueModification * > > | collect (const ConsensusMap &map) |
| | collect() over a ConsensusMap: its runs, the identifications of every consensus feature and the unassigned ones
|
| |
| static std::string | encode (const std::set< const ResidueModification * > &defs) |
| | Serialise defs into one ';'-joined string. Deterministic: records are sorted.
|
| |
| static void | attach (ProteinIdentification::SearchParameters &sp, const std::set< const ResidueModification * > &defs) |
| |
| static std::map< std::string, std::string > | encodeByRun (const std::vector< ProteinIdentification > &protein_ids, const std::map< std::string, std::set< const ResidueModification * > > &defs) |
| |
| static Size | registerFrom (const std::string &records) |
| |
| static Size | registerFrom (const ProteinIdentification::SearchParameters &sp) |
| | Convenience: registerFrom() on the meta value of sp, if present.
|
| |
Collect, serialise and re-register the definitions of tool-defined modifications.
The definitions travel as the Constants::UserParam::MODIFICATION_DEFINITIONS meta value on ProteinIdentification::SearchParameters, which idXML, featureXML, consensusXML and .idparquet all serialise. Writers call collect() + attach(); readers call registerFrom() before parsing any peptide sequence. isDefinition() selects what is serialised: provenance DEFINED and a non-empty Id.
◆ attach()
◆ collect() [1/3]
collect() over a ConsensusMap: its runs, the identifications of every consensus feature and the unassigned ones
◆ collect() [2/3]
collect() over a FeatureMap: its runs, the identifications of every feature (subordinates included) and the unassigned ones
◆ collect() [3/3]
Collect, per run identifier, the definitions the identifications reference.
Covers every hit's terminal and residue modifications plus each run's fixed/variable modification names. Runs referencing no definition do not appear.
◆ encode()
Serialise defs into one ';'-joined string. Deterministic: records are sorted.
◆ encodeByRun()
Per run identifier, the value attach() would store: defs unioned with what the run's SearchParameters already carry. Runs with nothing to store are absent.
◆ isDefinition()
The selection predicate: a named modification whose definition must travel with the file.
◆ registerFrom() [1/2]
Convenience: registerFrom() on the meta value of sp, if present.
- Returns
- records registered.
◆ registerFrom() [2/2]
| static Size registerFrom |
( |
const std::string & |
records | ) |
|
|
static |
Register every record in records into ModificationsDB; a malformed record is logged and skipped.
- Returns
- the number of records registered