![]() |
OpenMS
|
Channel ratios of MS1-labeled (SILAC, Dimethyl, ...) data, aggregated as medians of ratios. More...
#include <MS1LabeledWorkflow/MS1LabeledRatioQuantifier.h>
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 ¶m) |
| 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. | |
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:
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.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:
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 peptidefraction_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.
| 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. |
| const std::map< AASequence, std::vector< MS1LabeledRatioQuantifier::ChannelRatio > > & getPeptideRatios | ( | ) | const |
Peptide ratios of the last run(), by peptide identity.
References MS1LabeledRatioQuantifier::peptide_ratios_.
| 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_.
|
staticprotected |
Median of values (which is sorted in the process); NaN if empty.
Referenced by MS1LabeledRatioQuantifier::run().
| void run | ( | ConsensusMap & | consensus, |
| const ExperimentalDesign & | design, | ||
| ProteinIdentification & | proteins | ||
| ) |
Compute the ratios of consensus and annotate features and protein groups with them.
| [in,out] | consensus | Linked multiplets, one column per (run, channel); features are annotated with their evidence ratios |
| [in] | design | The experimental design; supplies the fraction group of every run |
| [in,out] | proteins | The inferred identification run whose indistinguishable groups are annotated |
References ProteinIdentification::ProteinGroup::accessions, File::basename(), MS1LabeledRatioQuantifier::ChannelRatio::channel, MS1LabeledRatioQuantifier::ChannelRatio::count, PeptideHit::extractProteinAccessionsSet(), MS1LabeledRatioQuantifier::ChannelRatio::fraction_group, ConsensusMap::getColumnHeaders(), ConsensusMap::getExperimentType(), ProteinIdentification::ProteinGroup::getFloatDataArrays(), ProteinIdentification::getIndistinguishableProteins(), ProteinIdentification::ProteinGroup::getIntegerDataArrays(), ExperimentalDesign::getMSFileSection(), PeptideHit::getSequence(), ConsensusMap::getUnassignedPeptideIdentifications(), Param::getValue(), MS1LabeledRatioQuantifier::median_(), MS1LabeledRatioQuantifier::ChannelRatio::normalized_ratio, OPENMS_LOG_INFO, DefaultParamHandler::param_, MS1LabeledRatioQuantifier::peptide_ratios_, MS1LabeledRatioQuantifier::protein_group_ratios_, MS1LabeledRatioQuantifier::ChannelRatio::ratio, MS1LabeledRatioQuantifier::run(), MetaInfoDescription::setName(), and ParamValue::toBool().
Referenced by MS1LabeledRatioQuantifier::run().
|
protected |
Referenced by MS1LabeledRatioQuantifier::getPeptideRatios(), and MS1LabeledRatioQuantifier::run().
|
protected |
Referenced by MS1LabeledRatioQuantifier::getProteinGroupRatios(), and MS1LabeledRatioQuantifier::run().