Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes

PeptideAndProteinQuant Class Reference

Helper class for peptide and protein quantification based on feature data annotated with IDs. More...

#include <OpenMS/ANALYSIS/QUANTITATION/PeptideAndProteinQuant.h>

Inheritance diagram for PeptideAndProteinQuant:
DefaultParamHandler

List of all members.

Classes

struct  PeptideData
 Quantitative and associated data for a peptide. More...
struct  ProteinData
 Quantitative and associated data for a protein. More...
struct  Statistics
 Statistics for processing summary. More...

Public Types

typedef std::map< UInt64,
DoubleReal
SampleAbundances
 Mapping: sample ID -> abundance.
typedef std::map< AASequence,
PeptideData
PeptideQuant
 Mapping: peptide sequence (modified) -> peptide data.
typedef std::map< String,
ProteinData
ProteinQuant
 Mapping: protein accession -> protein data.

Public Member Functions

 PeptideAndProteinQuant ()
 Constructor.
 ~PeptideAndProteinQuant ()
 Destructor.
void quantifyPeptides (FeatureMap<> &features)
 Compute peptide abundances from data in a feature map.
void quantifyPeptides (ConsensusMap &consensus)
 Compute peptide abundances from data in a consensus map.
void quantifyProteins (const ProteinIdentification &proteins=ProteinIdentification())
 Compute protein abundances.
const StatisticsgetStatistics ()
 Get summary statistics.
const PeptideQuantgetPeptideResults ()
 Get peptide abundance data.
const ProteinQuantgetProteinResults ()
 Get protein abundance data.

Private Member Functions

PeptideHit getAnnotation_ (std::vector< PeptideIdentification > &peptides)
 Get the "canonical" annotation (a single peptide hit) of a feature/consensus feature from the associated list of peptide identifications.
void quantifyFeature_ (const FeatureHandle &feature, const PeptideHit &hit)
 Gather quantitative information from a feature.
template<typename T >
void orderBest_ (const std::map< T, SampleAbundances > abundances, std::vector< T > &result)
 Order keys (charges/peptides for peptide/protein quantification) according to how many samples they allow to quantify, breaking ties by total abundance.
void quantifyPeptides_ ()
 Compute overall peptide abundances.
void normalizePeptides_ ()
 Normalize peptide abundances across samples by (multiplicative) scaling to equal medians.
String getAccession_ (const std::set< String > &pep_accessions, std::map< String, String > &accession_to_leader)
 Get the "canonical" protein accession from the list of protein accessions of a peptide.
void countPeptides_ (std::vector< PeptideIdentification > &peptides)
 Count the number of identifications (best hits only) of each peptide sequence.
void updateMembers_ ()
 Clear all data when parameters are set.

Private Attributes

Statistics stats_
 Processing statistics for output in the end.
PeptideQuant pep_quant_
 Peptide quantification data.
ProteinQuant prot_quant_
 Protein quantification data.

Detailed Description

Helper class for peptide and protein quantification based on feature data annotated with IDs.

This class is used by ProteinQuantifier. See there for further documentation.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
top int3 min: 0Calculate protein abundance from this number of proteotypic peptides (most abundant first; '0' for all)
average stringmedian median, mean, sumAveraging method used to compute protein abundances from peptide abundances
include_all stringfalse true, falseInclude results for proteins with fewer proteotypic peptides than indicated by 'top' (no effect if 'top' is 0 or 1)
filter_charge stringfalse true, falseDistinguish between charge states of a peptide. For peptides, abundances will be reported separately for each charge;
for proteins, abundances will be computed based only on the most prevalent charge of each peptide.
By default, abundances are summed over all charge states.
consensus:normalize stringfalse true, falseScale peptide abundances so that medians of all samples are equal
consensus:fix_peptides stringfalse true, falseUse the same peptides for protein quantification across all samples.
With 'top 0', all peptides that occur in every sample are considered.
Otherwise ('top N'), the N peptides that occur in the most samples (independently of each other) are selected,
breaking ties by total abundance (there is no guarantee that the best co-ocurring peptides are chosen!).

Note:

Member Typedef Documentation

typedef std::map<AASequence, PeptideData> PeptideQuant

Mapping: peptide sequence (modified) -> peptide data.

typedef std::map<String, ProteinData> ProteinQuant

Mapping: protein accession -> protein data.

typedef std::map<UInt64, DoubleReal> SampleAbundances

Mapping: sample ID -> abundance.


Constructor & Destructor Documentation

Constructor.

~PeptideAndProteinQuant (  )  [inline]

Destructor.


Member Function Documentation

void countPeptides_ ( std::vector< PeptideIdentification > &  peptides  )  [private]

Count the number of identifications (best hits only) of each peptide sequence.

The peptide hits in peptides are sorted by score in the process.

String getAccession_ ( const std::set< String > &  pep_accessions,
std::map< String, String > &  accession_to_leader 
) [private]

Get the "canonical" protein accession from the list of protein accessions of a peptide.

Parameters:
pep_accessions Protein accessions of a peptide
accession_to_leader Captures information about indistinguishable proteins (maps accession to accession of group leader)

If there is no information about indistinguishable proteins (from protXML) available, a canonical accession exists only for proteotypic peptides - it's the single accession for the respective peptide.

Otherwise, a peptide has a canonical accession if it maps only to proteins of one indistinguishable group. In this case, the canonical accession is that of the group leader.

If there is no canonical accession, the empty string is returned.

PeptideHit getAnnotation_ ( std::vector< PeptideIdentification > &  peptides  )  [private]

Get the "canonical" annotation (a single peptide hit) of a feature/consensus feature from the associated list of peptide identifications.

Only the best-scoring peptide hit of each ID in peptides is taken into account. The hits of each ID must already be sorted! If there's more than one ID and the best hits are not identical by sequence, or if there's no peptide ID, an empty peptide hit (for "ambiguous/no annotation") is returned. Protein accessions from identical peptide hits are accumulated.

const PeptideQuant& getPeptideResults (  ) 

Get peptide abundance data.

const ProteinQuant& getProteinResults (  ) 

Get protein abundance data.

const Statistics& getStatistics (  ) 

Get summary statistics.

void normalizePeptides_ (  )  [private]

Normalize peptide abundances across samples by (multiplicative) scaling to equal medians.

void orderBest_ ( const std::map< T, SampleAbundances abundances,
std::vector< T > &  result 
) [inline, private]

Order keys (charges/peptides for peptide/protein quantification) according to how many samples they allow to quantify, breaking ties by total abundance.

The keys of abundances are stored ordered in result, best first.

void quantifyFeature_ ( const FeatureHandle feature,
const PeptideHit hit 
) [private]

Gather quantitative information from a feature.

Store quantitative information from feature in member pep_quant_, based on the peptide annotation in hit. If hit is empty ("ambiguous/no annotation"), nothing is stored.

void quantifyPeptides ( ConsensusMap consensus  ) 

Compute peptide abundances from data in a consensus map.

Parameters should be set before using this method, as setting parameters will clear all results.

void quantifyPeptides ( FeatureMap<> &  features  ) 

Compute peptide abundances from data in a feature map.

Parameters should be set before using this method, as setting parameters will clear all results.

void quantifyPeptides_ (  )  [private]

Compute overall peptide abundances.

Based on quantitative data for individual charge states (derived from annotated features) in member pep_quant_, compute overall abundances for all peptides and store them also in pep_quant_.

void quantifyProteins ( const ProteinIdentification proteins = ProteinIdentification()  ) 

Compute protein abundances.

Peptide abundances must be computed first with quantifyPeptides. Optional information about groups of indistinguishable proteins (from ProteinProphet) can be supplied via proteins.

void updateMembers_ (  )  [private, virtual]

Clear all data when parameters are set.

Reimplemented from DefaultParamHandler.


Member Data Documentation

Peptide quantification data.

Protein quantification data.

Statistics stats_ [private]

Processing statistics for output in the end.


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1