Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | List of all members
PeptideIdentification Class Reference

Represents the peptide hits for a spectrum. More...

#include <OpenMS/METADATA/PeptideIdentification.h>

Inheritance diagram for PeptideIdentification:
MetaInfoInterface

Public Types

typedef PeptideHit HitType
 Hit type definition. More...
 

Public Member Functions

double getRT () const
 returns the RT of the MS2 spectrum More...
 
void setRT (double rt)
 sets the RT of the MS2 spectrum More...
 
bool hasRT () const
 shortcut for isnan(getRT()) More...
 
double getMZ () const
 returns the MZ of the MS2 spectrum More...
 
void setMZ (double mz)
 sets the MZ of the MS2 spectrum More...
 
bool hasMZ () const
 shortcut for isnan(getRT()) More...
 
const std::vector< PeptideHit > & getHits () const
 returns the peptide hits as const More...
 
std::vector< PeptideHit > & getHits ()
 returns the peptide hits More...
 
void insertHit (const PeptideHit &hit)
 Appends a peptide hit. More...
 
void setHits (const std::vector< PeptideHit > &hits)
 Sets the peptide hits. More...
 
double getSignificanceThreshold () const
 returns the peptide significance threshold value More...
 
void setSignificanceThreshold (double value)
 setting of the peptide significance threshold value More...
 
const StringgetScoreType () const
 returns the peptide score type More...
 
void setScoreType (const String &type)
 sets the peptide score type More...
 
bool isHigherScoreBetter () const
 returns the peptide score orientation More...
 
void setHigherScoreBetter (bool value)
 sets the peptide score orientation More...
 
const StringgetIdentifier () const
 returns the identifier More...
 
void setIdentifier (const String &id)
 sets the identifier More...
 
const StringgetBaseName () const
 returns the base name which links to underlying peak map More...
 
void setBaseName (const String &base_name)
 sets the base name which links to underlying peak map More...
 
void assignRanks ()
 Sorts the hits by score and assigns ranks according to the scores. More...
 
void sort ()
 Sorts the hits by score. More...
 
bool empty () const
 Returns if this PeptideIdentification result is empty. More...
 
constructors,destructors,assignment operator
 PeptideIdentification ()
 default constructor More...
 
virtual ~PeptideIdentification ()
 destructor More...
 
 PeptideIdentification (const PeptideIdentification &source)
 copy constructor More...
 
PeptideIdentificationoperator= (const PeptideIdentification &source)
 assignment operator More...
 
bool operator== (const PeptideIdentification &rhs) const
 Equality operator. More...
 
bool operator!= (const PeptideIdentification &rhs) const
 Inequality operator. More...
 
- Public Member Functions inherited from MetaInfoInterface
 MetaInfoInterface ()
 constructor More...
 
 MetaInfoInterface (const MetaInfoInterface &rhs)
 copy constructor More...
 
 ~MetaInfoInterface ()
 destructor More...
 
MetaInfoInterfaceoperator= (const MetaInfoInterface &rhs)
 assignment operator More...
 
bool operator== (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
bool operator!= (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
const DataValuegetMetaValue (const String &name) const
 returns the value corresponding to a string More...
 
const DataValuegetMetaValue (UInt index) const
 returns the value corresponding to an index More...
 
bool metaValueExists (const String &name) const
 returns if this MetaInfo is set More...
 
bool metaValueExists (UInt index) const
 returns if this MetaInfo is set More...
 
void setMetaValue (const String &name, const DataValue &value)
 sets the DataValue corresponding to a name More...
 
void setMetaValue (UInt index, const DataValue &value)
 sets the DataValue corresponding to an index More...
 
void removeMetaValue (const String &name)
 Removes the DataValue corresponding to name if it exists. More...
 
void removeMetaValue (UInt index)
 Removes the DataValue corresponding to index if it exists. More...
 
void getKeys (std::vector< String > &keys) const
 fills the given vector with a list of all keys for which a value is set More...
 
void getKeys (std::vector< UInt > &keys) const
 fills the given vector with a list of all keys for which a value is set More...
 
bool isMetaEmpty () const
 returns if the MetaInfo is empty More...
 
void clearMetaInfo ()
 removes all meta values More...
 

Helper methods for linking peptide and protein hits

String id_
 Identifier by which ProteinIdentification and PeptideIdentification are matched. More...
 
std::vector< PeptideHithits_
 A list containing the peptide hits. More...
 
double significance_threshold_
 the peptide significance threshold More...
 
String score_type_
 The score type (Mascot, Sequest, e-value, p-value) More...
 
bool higher_score_better_
 The score orientation. More...
 
String base_name_
 
double mz_
 
double rt_
 
const DataValuegetMetaValue (const String &name) const
 
void setMetaValue (const String &name, const DataValue &value)
 re-implemented from MetaValueInterface as a precaution against deprecated usage of "RT" and "MZ" values More...
 
static std::vector< PeptideHitgetReferencingHits (const std::vector< PeptideHit > &, const std::set< String > &accession)
 returns all peptide hits which reference to a given protein accession (aka filter by protein accession) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MetaInfoInterface
static MetaInfoRegistrymetaRegistry ()
 returns a reference to the MetaInfoRegistry More...
 
- Protected Member Functions inherited from MetaInfoInterface
void createIfNotExists_ ()
 creates the MetaInfo object if it does not exist More...
 
- Protected Attributes inherited from MetaInfoInterface
MetaInfometa_
 pointer to the MetaInfo object. 0 by default More...
 

Detailed Description

Represents the peptide hits for a spectrum.

This class is closely related to ProteinIdentification, which stores the protein hits and the general information about the identification run. More than one PeptideIdentification can belong to one ProteinIdentification. The general information about a PeptideIdentification has to be looked up in the corresponding ProteinIndentification, using the unique identifier that links the two.

When loading PeptideHit instances from a File, the retention time and mass-to-charge ratio of the precursor spectrum can be accessed using getRT() and getMZ(). This information can be used to map the peptide hits to an MSExperiment, a FeatureMap or a ConsensusMap using the IDMapper class.

Member Typedef Documentation

Hit type definition.

Constructor & Destructor Documentation

default constructor

virtual ~PeptideIdentification ( )
virtual

destructor

copy constructor

Member Function Documentation

void assignRanks ( )

Sorts the hits by score and assigns ranks according to the scores.

Referenced by TOPPRNPxl::main_(), and SimpleSearchEngine::postProcessHits_().

bool empty ( ) const

Returns if this PeptideIdentification result is empty.

const String& getBaseName ( ) const

returns the base name which links to underlying peak map

const std::vector<PeptideHit>& getHits ( ) const
std::vector<PeptideHit>& getHits ( )

returns the peptide hits

const String& getIdentifier ( ) const

returns the identifier

const DataValue& getMetaValue ( const String name) const

remove the two helper functions below a some point, when we are sure that we did not miss or merge in deprecated code! re-implemented from MetaValueInterface as a precaution against deprecated usage of "RT" and "MZ" values

double getMZ ( ) const

returns the MZ of the MS2 spectrum

static std::vector<PeptideHit> getReferencingHits ( const std::vector< PeptideHit > &  ,
const std::set< String > &  accession 
)
static

returns all peptide hits which reference to a given protein accession (aka filter by protein accession)

double getRT ( ) const

returns the RT of the MS2 spectrum

const String& getScoreType ( ) const

returns the peptide score type

double getSignificanceThreshold ( ) const

returns the peptide significance threshold value

bool hasMZ ( ) const

shortcut for isnan(getRT())

bool hasRT ( ) const

shortcut for isnan(getRT())

void insertHit ( const PeptideHit hit)

Appends a peptide hit.

bool isHigherScoreBetter ( ) const

returns the peptide score orientation

bool operator!= ( const PeptideIdentification rhs) const

Inequality operator.

PeptideIdentification& operator= ( const PeptideIdentification source)

assignment operator

bool operator== ( const PeptideIdentification rhs) const

Equality operator.

void setBaseName ( const String base_name)

sets the base name which links to underlying peak map

void setHigherScoreBetter ( bool  value)

sets the peptide score orientation

Referenced by TOPPRNPxl::main_(), and SimpleSearchEngine::postProcessHits_().

void setHits ( const std::vector< PeptideHit > &  hits)

Sets the peptide hits.

Referenced by TOPPRNPxl::main_(), and SimpleSearchEngine::postProcessHits_().

void setIdentifier ( const String id)

sets the identifier

void setMetaValue ( const String name,
const DataValue value 
)

re-implemented from MetaValueInterface as a precaution against deprecated usage of "RT" and "MZ" values

void setMZ ( double  mz)

sets the MZ of the MS2 spectrum

Referenced by TOPPRNPxl::main_(), and SimpleSearchEngine::postProcessHits_().

void setRT ( double  rt)

sets the RT of the MS2 spectrum

Referenced by TOPPRNPxl::main_(), and SimpleSearchEngine::postProcessHits_().

void setScoreType ( const String type)

sets the peptide score type

Referenced by SimpleSearchEngine::postProcessHits_().

void setSignificanceThreshold ( double  value)

setting of the peptide significance threshold value

void sort ( )

Sorts the hits by score.

Sorting takes the score orientation (higher_score_better_) into account, i.e. after sorting, the best-scoring hit is the first.

Member Data Documentation

String base_name_
protected
bool higher_score_better_
protected

The score orientation.

std::vector<PeptideHit> hits_
protected

A list containing the peptide hits.

String id_
protected

Identifier by which ProteinIdentification and PeptideIdentification are matched.

double mz_
protected
double rt_
protected
String score_type_
protected

The score type (Mascot, Sequest, e-value, p-value)

double significance_threshold_
protected

the peptide significance threshold


OpenMS / TOPP release 2.0.0 Documentation generated on Sat May 16 2015 16:14:01 using doxygen 1.8.9.1