![]() |
OpenMS
|
Two-way mapping from ms-run-path to protID|pepID-identifier. More...
#include <OpenMS/METADATA/IdentifierMSRunMapper.h>
Public Member Functions | |
| IdentifierMSRunMapper ()=default | |
| IdentifierMSRunMapper (const std::vector< ProteinIdentification > &prot_ids) | |
| Construct mapping from a vector of ProteinIdentifications. | |
| void | create (const std::vector< ProteinIdentification > &prot_ids) |
| Create/update mapping from a vector of ProteinIdentifications. | |
| String | getPrimaryMSRunPath (const PeptideIdentification &pepid) const |
| Get the primary MS run path for a PeptideIdentification (using id_merge_index metadata) | |
| bool | hasIdentifier (const String &identifier) const |
| Check if the mapping contains an entry for the given identifier. | |
| const String & | getIdentifier (const StringList &ms_run_paths) const |
| Get the identifier for a given MS run path list (throws if not found) | |
| bool | empty () const |
| Check if the mapping is empty. | |
| Size | size () const |
| Get the number of identifier mappings. | |
| const StringList & | getMSRunPaths (const String &identifier) const |
| Get the MS run paths for a given identifier (returns empty list if not found) | |
| std::vector< String > | getIdentifiers () const |
| Get all identifiers in this mapping. | |
| bool | hasRunPath (const StringList &ms_run_paths) const |
| Check if the mapping contains an entry for the given MS run paths. | |
| bool | tryGetIdentifier (const StringList &ms_run_paths, String &identifier) const |
| Try to get identifier for a given MS run path list (returns false if not found) | |
Private Attributes | |
| std::map< String, StringList > | identifier_to_msrunpath_ |
| std::map< StringList, String > | runpath_to_identifier_ |
Static Private Attributes | |
| static const StringList | empty_stringlist_ |
| Empty list returned by getMSRunPaths when identifier not found. | |
Two-way mapping from ms-run-path to protID|pepID-identifier.
This class encapsulates the mapping between protein identification identifiers and their associated MS run paths. It is used to resolve the correct source file for peptide identifications, especially in merged identification results.
Usage example:
|
default |
|
explicit |
Construct mapping from a vector of ProteinIdentifications.
| void create | ( | const std::vector< ProteinIdentification > & | prot_ids | ) |
Create/update mapping from a vector of ProteinIdentifications.
| bool empty | ( | ) | const |
Check if the mapping is empty.
| const String & getIdentifier | ( | const StringList & | ms_run_paths | ) | const |
Get the identifier for a given MS run path list (throws if not found)
| std::vector< String > getIdentifiers | ( | ) | const |
Get all identifiers in this mapping.
| const StringList & getMSRunPaths | ( | const String & | identifier | ) | const |
Get the MS run paths for a given identifier (returns empty list if not found)
| String getPrimaryMSRunPath | ( | const PeptideIdentification & | pepid | ) | const |
Get the primary MS run path for a PeptideIdentification (using id_merge_index metadata)
| bool hasIdentifier | ( | const String & | identifier | ) | const |
Check if the mapping contains an entry for the given identifier.
| bool hasRunPath | ( | const StringList & | ms_run_paths | ) | const |
Check if the mapping contains an entry for the given MS run paths.
| Size size | ( | ) | const |
Get the number of identifier mappings.
| bool tryGetIdentifier | ( | const StringList & | ms_run_paths, |
| String & | identifier | ||
| ) | const |
Try to get identifier for a given MS run path list (returns false if not found)
|
staticprivate |
Empty list returned by getMSRunPaths when identifier not found.
|
private |
|
private |