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