Helper class for peptide and protein quantification based on feature data annotated with IDs. More...
#include <OpenMS/ANALYSIS/QUANTITATION/PeptideAndProteinQuant.h>
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, double > | SampleAbundances |
Mapping: sample ID -> abundance. More... | |
typedef std::map< AASequence, PeptideData > | PeptideQuant |
Mapping: peptide sequence (modified) -> peptide data. More... | |
typedef std::map< String, ProteinData > | ProteinQuant |
Mapping: protein accession -> protein data. More... | |
Public Member Functions | |
PeptideAndProteinQuant () | |
Constructor. More... | |
~PeptideAndProteinQuant () | |
Destructor. More... | |
void | quantifyPeptides (FeatureMap &features) |
Compute peptide abundances from data in a feature map. More... | |
void | quantifyPeptides (ConsensusMap &consensus) |
Compute peptide abundances from data in a consensus map. More... | |
void | quantifyPeptides (std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides) |
Compute peptide abundances from identification data (spectral counting) More... | |
void | quantifyProteins (const ProteinIdentification &proteins=ProteinIdentification()) |
Compute protein abundances. More... | |
const Statistics & | getStatistics () |
Get summary statistics. More... | |
const PeptideQuant & | getPeptideResults () |
Get peptide abundance data. More... | |
const ProteinQuant & | getProteinResults () |
Get protein abundance data. More... | |
![]() | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
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. More... | |
void | quantifyFeature_ (const FeatureHandle &feature, const PeptideHit &hit) |
Gather quantitative information from a feature. More... | |
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. More... | |
void | quantifyPeptides_ () |
Compute overall peptide abundances. More... | |
void | normalizePeptides_ () |
Normalize peptide abundances across samples by (multiplicative) scaling to equal medians. More... | |
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. More... | |
void | countPeptides_ (std::vector< PeptideIdentification > &peptides) |
Count the number of identifications (best hits only) of each peptide sequence. More... | |
void | updateMembers_ () |
Clear all data when parameters are set. More... | |
Private Attributes | |
Statistics | stats_ |
Processing statistics for output in the end. More... | |
PeptideQuant | pep_quant_ |
Peptide quantification data. More... | |
ProteinQuant | prot_quant_ |
Protein quantification data. More... | |
Additional Inherited Members | |
![]() | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
![]() | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
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.
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, double> SampleAbundances |
Mapping: sample ID -> abundance.
Constructor.
|
inline |
Destructor.
|
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.
|
private |
Get the "canonical" protein accession from the list of protein accessions of a peptide.
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.
|
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.
|
private |
Normalize peptide abundances across samples by (multiplicative) scaling to equal medians.
|
inlineprivate |
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.
|
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 | ( | 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 | ( | 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 | ( | std::vector< ProteinIdentification > & | proteins, |
std::vector< PeptideIdentification > & | peptides | ||
) |
Compute peptide abundances from identification data (spectral counting)
Parameters should be set before using this method, as setting parameters will clear all results.
|
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
.
|
privatevirtual |
Clear all data when parameters are set.
Reimplemented from DefaultParamHandler.
|
private |
Peptide quantification data.
|
private |
Protein quantification data.
|
private |
Processing statistics for output in the end.
OpenMS / TOPP release 2.0.0 | Documentation generated on Wed Mar 30 2016 12:49:29 using doxygen 1.8.11 |