OpenMS
Loading...
Searching...
No Matches
ProteinRunReferences Class Reference

Checks that every peptide identification references an existing protein identification run. More...

#include <OpenMS/METADATA/ProteinRunReferences.h>

Static Public Member Functions

static std::string missingRunMessage (const std::string &identifier)
 The error message for a peptide identification whose identifier names no protein identification run.
 
static void check (const std::vector< ProteinIdentification > &runs, const std::string &identifier)
 Throws Exception::InvalidParameter (with missingRunMessage()) if the identifier names none of the runs.
 
static void check (const std::vector< ProteinIdentification > &runs, const PeptideIdentificationList &peptides)
 Throws Exception::InvalidParameter if a peptide identification names no protein identification run.
 
static void check (const std::vector< ProteinIdentification > &runs, const std::vector< const PeptideIdentification * > &peptides)
 Same as above, for peptide identifications given by pointers.
 
static void check (const FeatureMap &map)
 Same as above, for the peptide identifications of all features (including subordinates) and the unassigned ones.
 
static void check (const ConsensusMap &map)
 Same as above, for the peptide identifications of all consensus features and the unassigned ones.
 
static void checkProteinAccessions (const FeatureMap &map)
 Throws Exception::ElementNotFound if a peptide evidence names a protein that is no protein hit of its run.
 
static void checkProteinAccessions (const ConsensusMap &map)
 Same as above, for the peptide identifications of all consensus features and the unassigned ones.
 

Detailed Description

Checks that every peptide identification references an existing protein identification run.

Every PeptideIdentification needs the ProteinIdentification run (the search run) whose identifier it names (PeptideIdentification::getIdentifier() == ProteinIdentification::getIdentifier()). The run may have no protein hits and no database (e.g. peptidomics or de novo results). File writers and loaders enforce this contract with the checks below, so peptide identifications are never silently dropped or re-assigned.

Member Function Documentation

◆ check() [1/5]

static void check ( const ConsensusMap &  map)
static

Same as above, for the peptide identifications of all consensus features and the unassigned ones.

◆ check() [2/5]

static void check ( const FeatureMap &  map)
static

Same as above, for the peptide identifications of all features (including subordinates) and the unassigned ones.

◆ check() [3/5]

static void check ( const std::vector< ProteinIdentification > &  runs,
const PeptideIdentificationList &  peptides 
)
static

Throws Exception::InvalidParameter if a peptide identification names no protein identification run.

The message (see missingRunMessage()) names the identifier of the first such peptide identification.

◆ check() [4/5]

static void check ( const std::vector< ProteinIdentification > &  runs,
const std::string &  identifier 
)
static

Throws Exception::InvalidParameter (with missingRunMessage()) if the identifier names none of the runs.

◆ check() [5/5]

static void check ( const std::vector< ProteinIdentification > &  runs,
const std::vector< const PeptideIdentification * > &  peptides 
)
static

Same as above, for peptide identifications given by pointers.

◆ checkProteinAccessions() [1/2]

static void checkProteinAccessions ( const ConsensusMap &  map)
static

Same as above, for the peptide identifications of all consensus features and the unassigned ones.

◆ checkProteinAccessions() [2/2]

static void checkProteinAccessions ( const FeatureMap &  map)
static

Throws Exception::ElementNotFound if a peptide evidence names a protein that is no protein hit of its run.

featureXML and consensusXML reference the proteins of a peptide hit's evidences among the protein hits of the peptide identification's run (empty accessions are not written). Checks the peptide identifications of all features (including subordinates) and the unassigned ones, and includes check(): a peptide identification without its run throws Exception::InvalidParameter (with missingRunMessage()).

◆ missingRunMessage()

static std::string missingRunMessage ( const std::string &  identifier)
static

The error message for a peptide identification whose identifier names no protein identification run.