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

Channel ratios of MS1-labeled (SILAC, Dimethyl, ...) data, aggregated as medians of ratios. More...

#include <MS1LabeledWorkflow/MS1LabeledRatioQuantifier.h>

Inheritance diagram for MS1LabeledRatioQuantifier:
DefaultParamHandler

Classes

struct  ChannelRatio
 One channel ratio of one peptide or protein group, at (fraction group, channel) grain. More...
 

Public Member Functions

 MS1LabeledRatioQuantifier ()
 
void run (ConsensusMap &consensus, const ExperimentalDesign &design, ProteinIdentification &proteins)
 Compute the ratios of consensus and annotate features and protein groups with them.
 
const std::map< AASequence, std::vector< ChannelRatio > > & getPeptideRatios () const
 Peptide ratios of the last run(), by peptide identity.
 
const std::map< std::string, std::vector< ChannelRatio > > & getProteinGroupRatios () const
 Protein group ratios of the last run(), by the group's leading accession.
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const std::string &name)
 Constructor with name that is displayed in error messages.
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor.
 
virtual ~DefaultParamHandler ()
 Destructor.
 
DefaultParamHandler & operator= (const DefaultParamHandler &rhs)
 Assignment operator.
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator.
 
void setParameters (const Param &param)
 Sets the parameters.
 
const Param & getParameters () const
 Non-mutable access to the parameters.
 
const Param & getDefaults () const
 Non-mutable access to the default parameters.
 
const std::string & getName () const
 Non-mutable access to the name.
 
void setName (const std::string &name)
 Mutable access to the name.
 
const std::vector< std::string > & getSubsections () const
 Non-mutable access to the registered subsections.
 

Static Protected Member Functions

static double median_ (std::vector< double > &values)
 Median of values (which is sorted in the process); NaN if empty.
 

Protected Attributes

std::map< AASequence, std::vector< ChannelRatio > > peptide_ratios_
 
std::map< std::string, std::vector< ChannelRatio > > protein_group_ratios_
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters.
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes!
 
std::vector< std::string > subsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes!
 
std::string error_name_
 Name that is displayed in error messages during the parameter checking.
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;.
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;.
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::string &key_prefix="")
 Writes all parameters to meta values.
 
- Protected Member Functions inherited from DefaultParamHandler
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method.
 
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor.
 

Detailed Description

Channel ratios of MS1-labeled (SILAC, Dimethyl, ...) data, aggregated as medians of ratios.

A labeled experiment measures its channels in one run, so the quantity of interest is their ratio, and the ratio of a peptide multiplet is measured far better than either of its channel intensities: both channels see the same elution, the same ionization and the same instrument state. This class therefore aggregates ratios, the way MaxQuant does, rather than dividing aggregated intensities:

  • evidence ratio: per multiplet and run, the intensity of a channel divided by the intensity of the reference channel (channel 1, the light one, by default). Only positive intensities take part: a channel completed with a zero-intensity dummy feature (the peptide is absent) or a not-quantifiable one contributes no ratio, since neither 0 nor infinity is a measurement of a ratio. The reference channel is reported as the 1.0 it is by construction, so that every annotation covers the complete set of channels (light, medium and heavy of a triplex, say) – but only where another channel was measured against it, since a multiplet seen in the reference channel alone is no measurement of a ratio either.
  • peptide ratio: the median of the evidence ratios of one peptide within one fraction group (a fraction group is one labeled sample, measured in one or several fractions).
  • protein group ratio: the median of the peptide ratios of the group's peptides, again per fraction group, reported only when at least min_ratio_count peptides contribute (MaxQuant's "min. ratio count"). The threshold applies separately to each comparison. The reference/reference value is included only alongside a passing comparison in that fraction group. The number of contributing peptides is reported alongside.
  • normalized ratio (normalize, on by default): every ratio divided by the median peptide ratio of its (fraction group, channel), i.e. the assumption that most peptides do not change. Medians are equivariant under that division, so normalizing the peptide ratios and re-aggregating gives the same protein ratios as dividing the protein ratios directly. With normalize off, no normalized values are written at all.

A ratio is therefore not the ratio of the abundances that PeptideAndProteinQuant reports: that one is a ratio of per-channel aggregates, which is a different statistic (it weights peptides by their intensity, and a single intense peptide can dominate it). Both are useful and both are reported by MaxQuant; this class provides the ratio-of-ratios one.

Ratios are annotated where they belong:

  • on every consensus feature, as the parallel meta values MS1Label:evidence_ratio_run (StringList), MS1Label:evidence_ratio_channel (IntList) and MS1Label:evidence_ratio (DoubleList) for its own evidence ratios, and MS1Label:peptide_ratio_fraction_group, MS1Label:peptide_ratio_channel, MS1Label:peptide_ratio, MS1Label:peptide_ratio_normalized and MS1Label:peptide_ratio_count for the ratios of its peptide
  • on every indistinguishable protein group, as the parallel data arrays fraction_group_level_ratio_fraction_group, fraction_group_level_ratio_label and fraction_group_level_ratio_count (integer) plus fraction_group_level_ratio and fraction_group_level_ratio_normalized (float), next to the abundance arrays that PeptideAndProteinQuant writes. A second run() replaces them.

A peptide counts for the group that covers every protein it references; peptides shared between groups count for none (a razor assignment, if wanted, rewrites the references during inference).

Part of the MS1LabeledWorkflow tool rather than of the library: the aggregation rules it implements are those of that workflow, and its parameters are the tool's ratios section.


Class Documentation

◆ OpenMS::MS1LabeledRatioQuantifier::ChannelRatio

struct OpenMS::MS1LabeledRatioQuantifier::ChannelRatio

One channel ratio of one peptide or protein group, at (fraction group, channel) grain.

Class Members
unsigned channel = 0 Channel in the numerator (1-based label of the experimental design; the denominator is the reference channel)
Size count = 0 Number of contributing ratios (evidences for a peptide, peptides for a protein group)
unsigned fraction_group = 0 Fraction group the ratio was measured in (1-based)
double normalized_ratio = 0.0 ratio divided by the median peptide ratio of this (fraction group, channel)
double ratio = 0.0 Median of the contributing ratios.

Constructor & Destructor Documentation

◆ MS1LabeledRatioQuantifier()

Member Function Documentation

◆ getPeptideRatios()

const std::map< AASequence, std::vector< MS1LabeledRatioQuantifier::ChannelRatio > > & getPeptideRatios ( ) const

Peptide ratios of the last run(), by peptide identity.

References MS1LabeledRatioQuantifier::peptide_ratios_.

◆ getProteinGroupRatios()

const std::map< std::string, std::vector< MS1LabeledRatioQuantifier::ChannelRatio > > & getProteinGroupRatios ( ) const

Protein group ratios of the last run(), by the group's leading accession.

References MS1LabeledRatioQuantifier::protein_group_ratios_.

◆ median_()

double median_ ( std::vector< double > &  values)
staticprotected

Median of values (which is sorted in the process); NaN if empty.

Referenced by MS1LabeledRatioQuantifier::run().

◆ run()

void run ( ConsensusMap &  consensus,
const ExperimentalDesign &  design,
ProteinIdentification &  proteins 
)

Member Data Documentation

◆ peptide_ratios_

std::map<AASequence, std::vector<ChannelRatio> > peptide_ratios_
protected

◆ protein_group_ratios_

std::map<std::string, std::vector<ChannelRatio> > protein_group_ratios_
protected