13#include <OpenMS/config.h>
21 class ProteinIdentification;
22 class PeptideIdentification;
59 void create(
const std::vector<ProteinIdentification>& prot_ids);
Two-way mapping from ms-run-path to protID|pepID-identifier.
Definition IdentifierMSRunMapper.h:51
bool hasRunPath(const StringList &ms_run_paths) const
Check if the mapping contains an entry for the given MS run paths.
void create(const std::vector< ProteinIdentification > &prot_ids)
Create/update mapping from a vector of ProteinIdentifications.
bool hasIdentifier(const String &identifier) const
Check if the mapping contains an entry for the given identifier.
IdentifierMSRunMapper()=default
const StringList & getMSRunPaths(const String &identifier) const
Get the MS run paths for a given identifier (returns empty list if not found)
bool empty() const
Check if the mapping is empty.
std::map< StringList, String > runpath_to_identifier_
Definition IdentifierMSRunMapper.h:91
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)
String getPrimaryMSRunPath(const PeptideIdentification &pepid) const
Get the primary MS run path for a PeptideIdentification (using id_merge_index metadata)
const String & getIdentifier(const StringList &ms_run_paths) const
Get the identifier for a given MS run path list (throws if not found)
static const StringList empty_stringlist_
Empty list returned by getMSRunPaths when identifier not found.
Definition IdentifierMSRunMapper.h:89
IdentifierMSRunMapper(const std::vector< ProteinIdentification > &prot_ids)
Construct mapping from a vector of ProteinIdentifications.
Size size() const
Get the number of identifier mappings.
std::vector< String > getIdentifiers() const
Get all identifiers in this mapping.
std::map< String, StringList > identifier_to_msrunpath_
Definition IdentifierMSRunMapper.h:90
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:66
A more convenient string class.
Definition String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19