![]() |
OpenMS
|
Completes peptide multiplets and resolves quant/ID conflicts within them. More...
#include <OpenMS/FEATUREFINDER/MultiplexResolverAlgorithm.h>
Public Member Functions | |
| MultiplexResolverAlgorithm () | |
Constructor; registers the algorithm and labels parameter sections. | |
| void | resolve (const ConsensusMap &map_in, ConsensusMap &map_out, ConsensusMap &map_conflicts, const MSExperiment &blacklist=MSExperiment()) const |
Split the annotated multiplets of map_in into resolved and conflicting ones. | |
| std::vector< bool > | checkIdentifications (const ConsensusFeature &consensus) const |
Which peptide identifications of consensus agree with its detected mass shifts? | |
| std::vector< double > | expectedChannelMZs (const AASequence &sequence, int charge, Size &position) const |
Where the peptide of sequence appears in every channel. | |
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. | |
Protected Member Functions | |
| MultiplexDeltaMassesGenerator | createGenerator_ () const |
The generator of the theoretical mass-shift patterns, as configured in the sections algorithm and labels. | |
| bool | matchDeltaMasses_ (const ConsensusFeature &consensus, double detected_delta_mass_at_label_set, const std::vector< MultiplexDeltaMasses::DeltaMass > &pattern, double theoretical_delta_mass_at_label_set, std::vector< bool > &delta_mass_matched) const |
| Check whether all delta masses of the detected pattern match one of the theoretical pattern. | |
| int | findMatchingPattern_ (const ConsensusFeature &consensus, double detected_delta_mass_at_label_set, const AASequence &sequence, const MultiplexDeltaMasses::LabelSet &label_set, const std::vector< MultiplexDeltaMasses > &theoretical_patterns, std::vector< bool > &delta_mass_matched, int &index_label_set) const |
| Find the theoretical delta mass pattern matching the detected one. | |
| bool | isBlacklisted_ (const MSExperiment &blacklist, double rt, double mz, size_t charge, const ConsensusFeature &consensus) const |
| Is one of the first three isotopes of a (dummy) feature at this position blacklisted? | |
| ConsensusFeature | completeConsensus_ (const ConsensusFeature &consensus, const std::vector< MultiplexDeltaMasses::DeltaMass > &pattern, const std::vector< bool > &delta_mass_matched, int index_label_set, const MSExperiment &blacklist) const |
| Complete an incomplete multiplet with dummy features. | |
| void | updateMembers_ () override |
| This method is used to update extra member variables at the end of the setParameters() method. | |
Protected Member Functions inherited from DefaultParamHandler | |
| void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. | |
Static Protected Member Functions | |
| static double | deltaMassFromMapIndex_ (const ConsensusFeature::HandleSetType &feature_handles, unsigned idx) |
Relative delta mass between the first feature handle and the handle with map index idx (NaN if absent) | |
| static double | matchLabelSet_ (const std::vector< MultiplexDeltaMasses::DeltaMass > &pattern, const MultiplexDeltaMasses::LabelSet &label_set, int &index_label_set) |
Mass shift of the theoretical pattern whose label set equals label_set. | |
| static bool | matchesResidues_ (const std::vector< MultiplexDeltaMasses::DeltaMass > &pattern, const AASequence &sequence) |
Does every channel of pattern label as many residues as sequence has? | |
| static double | findNewMZ_ (double mz, int charge, const std::vector< MultiplexDeltaMasses::DeltaMass > &pattern, const std::vector< bool > &delta_mass_matched) |
m/z of the lightest peptide of the complete multiplet, given the incomplete one at mz | |
Protected Attributes | |
| double | mass_tolerance_ = 0.1 |
| Mass tolerance in Da for matching detected to theoretical mass shifts. | |
| double | mz_tolerance_ = 10.0 |
| m/z tolerance in ppm for the blacklist check | |
| double | rt_tolerance_ = 5.0 |
| RT tolerance in seconds for the blacklist check. | |
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. | |
Completes peptide multiplets and resolves quant/ID conflicts within them.
Tools such as FeatureFinderMultiplexAlgorithm detect peptide feature multiplets (pairs, triplets, ...) in MS1-labeled data (SILAC, Dimethyl, ...). Once the multiplets carry peptide sequences (e.g. via IDMapper), this class consolidates quantitative and sequence information in two steps:
Only the first peptide identification of a consensus feature is taken into account, so the map should have been reduced to one identification per feature (IDConflictResolverAlgorithm::resolve()) first. checkIdentifications() tells beforehand which of several identifications agree with a multiplet, so that the reduction can prefer one of those over a better-scoring one that would make the multiplet a conflict. Multiplets without sequence annotation are written to the conflict map unchanged.
The identifications must carry the map index of the feature handle they were mapped to in the meta value map_index (IDMapper with annotate_ids_with_subelements). When a multiplet is completed, the new map index of the identified feature is recorded in the meta value map_index of the first peptide hit.
Parameters: section algorithm holds the label specification and tolerances, section labels the mass shift of every known label (see MultiplexDeltaMassesGenerator).
| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| algorithm:labels | string | [][Lys8,Arg10] | Labels used for labelling the samples. [...] specifies the labels for a single sample. For example [][Lys8,Arg10] ... SILAC [][Lys4,Arg6][Lys8,Arg10] ... triple-SILAC [Dimethyl0][Dimethyl6] ... Dimethyl [Dimethyl0][Dimethyl4][Dimethyl8] ... triple Dimethyl [ICPL0][ICPL4][ICPL6][ICPL10] ... ICPL |
|
| algorithm:max_nr_labelled_aas | int | 0 | min: 0 | Maximum number of labelled amino acids per peptide, minus one. The algorithm searches for peptides with up to (this value + 1) labelled amino acids. For SILAC with trypsin digestion, this parameter corresponds to the maximum number of missed cleavages. |
| algorithm:mass_tolerance | float | 0.1 | Mass tolerance in Da for matching the mass shifts in the detected peptide multiplet to the theoretical mass shift pattern. | |
| algorithm:mz_tolerance | float | 10.0 | min: 0.0 | m/z tolerance in ppm for checking if dummy feature vicinity was blacklisted. |
| algorithm:rt_tolerance | float | 5.0 | min: 0.0 | Retention time tolerance in seconds for checking if dummy feature vicinity was blacklisted. |
| labels:Arg6 | float | 6.0201290268 | min: 0.0 | Label:13C(6) | C(-6) 13C(6) | unimod @#188 |
| labels:Arg10 | float | 10.008268599999999 | min: 0.0 | Label:13C(6)15N(4) | C(-6) 13C(6) N(-4) 15N(4) | unimod @#267 |
| labels:Lys4 | float | 4.0251069836 | min: 0.0 | Label:2H(4) | H(-4) 2H(4) | unimod @#481 |
| labels:Lys6 | float | 6.0201290268 | min: 0.0 | Label:13C(6) | C(-6) 13C(6) | unimod @#188 |
| labels:Lys8 | float | 8.0141988132 | min: 0.0 | Label:13C(6)15N(2) | C(-6) 13C(6) N(-2) 15N(2) | unimod @#259 |
| labels:Leu3 | float | 3.01883 | min: 0.0 | Label:2H(3) | H(-3) 2H(3) | unimod @#262 |
| labels:Dimethyl0 | float | 28.031300000000002 | min: 0.0 | Dimethyl | H(4) C(2) | unimod @#36 |
| labels:Dimethyl4 | float | 32.056407 | min: 0.0 | Dimethyl:2H(4) | 2H(4) C(2) | unimod @#199 |
| labels:Dimethyl6 | float | 34.063116999999998 | min: 0.0 | Dimethyl:2H(4)13C(2) | 2H(4) 13C(2) | unimod @#510 |
| labels:Dimethyl8 | float | 36.075670000000002 | min: 0.0 | Dimethyl:2H(6)13C(2) | H(-2) 2H(6) 13C(2) | unimod @#330 |
| labels:ICPL0 | float | 105.021463999999995 | min: 0.0 | ICPL | H(3) C(6) N O | unimod @#365 |
| labels:ICPL4 | float | 109.046571 | min: 0.0 | ICPL:2H(4) | H(-1) 2H(4) C(6) N O | unimod @#687 |
| labels:ICPL6 | float | 111.041593000000006 | min: 0.0 | ICPL:13C(6) | H(3) 13C(6) N O | unimod @#364 |
| labels:ICPL10 | float | 115.066699999999997 | min: 0.0 | ICPL:13C(6)2H(4) | H(-1) 2H(4) 13C(6) N O | unimod @#866 |
Constructor; registers the algorithm and labels parameter sections.
| std::vector< bool > checkIdentifications | ( | const ConsensusFeature & | consensus | ) | const |
Which peptide identifications of consensus agree with its detected mass shifts?
This is the check resolve() applies to the (first) identification of a multiplet, for every identification: the label set of its first peptide hit has to occur in a theoretical pattern whose mass shifts explain every detected feature, relative to the feature named by the identification's map_index. Use it to choose, among several identifications mapped onto one multiplet, one that does not turn the multiplet into a conflict.
consensus, in order. Identifications without hits, without map_index, or whose map_index names no feature handle are not consistent.
|
protected |
Complete an incomplete multiplet with dummy features.
| [in] | consensus | Possibly incomplete multiplet |
| [in] | pattern | Matching theoretical pattern |
| [in] | delta_mass_matched | Which delta masses of the pattern were matched |
| [in] | index_label_set | Index within the pattern at which the label set was matched |
| [in] | blacklist | Blacklisted spectral peaks (may be empty) |
|
protected |
The generator of the theoretical mass-shift patterns, as configured in the sections algorithm and labels.
|
staticprotected |
Relative delta mass between the first feature handle and the handle with map index idx (NaN if absent)
| std::vector< double > expectedChannelMZs | ( | const AASequence & | sequence, |
| int | charge, | ||
| Size & | position | ||
| ) | const |
Where the peptide of sequence appears in every channel.
The theoretical pattern of the peptide is the one whose label set at some position equals the labels of sequence and whose channels label as many residues as it has (see matchesResidues_()). Its mass shifts, relative to the position of sequence, give the m/z of the peptide at charge charge in every channel.
| [in] | sequence | Identified peptidoform, with its labels |
| [in] | charge | Charge state (non-zero) |
| [out] | position | Position (channel) of sequence itself within the returned m/z values |
sequence
|
protected |
Find the theoretical delta mass pattern matching the detected one.
| [in] | consensus | Detected pattern |
| [in] | detected_delta_mass_at_label_set | Detected mass shift of the identified feature (relative to the first feature) |
| [in] | sequence | Sequence annotated to the detected pattern |
| [in] | label_set | Label set extracted from sequence |
| [in] | theoretical_patterns | All theoretical patterns |
| [out] | delta_mass_matched | Which delta masses of the matching pattern were matched |
| [out] | index_label_set | Index within the matching pattern at which the label set was matched |
|
staticprotected |
m/z of the lightest peptide of the complete multiplet, given the incomplete one at mz
|
protected |
Is one of the first three isotopes of a (dummy) feature at this position blacklisted?
|
protected |
Check whether all delta masses of the detected pattern match one of the theoretical pattern.
| [in] | consensus | Detected pattern |
| [in] | detected_delta_mass_at_label_set | Detected mass shift of the identified feature (relative to the first feature) |
| [in] | pattern | Theoretical pattern |
| [in] | theoretical_delta_mass_at_label_set | Theoretical mass shift at which the label set was matched |
| [out] | delta_mass_matched | Which delta masses of the theoretical pattern were matched |
|
staticprotected |
Does every channel of pattern label as many residues as sequence has?
Metabolic labels (SILAC Lys/Arg, Leu3) sit on every residue of their kind, so in a pattern that fits the peptide, each channel carries one Lys label per K, one Arg label per R and one Leu label per L - counted for the residue kinds the channel labels at all. This tells the pattern of an unlabelled identification, whose label set ("no_label") occurs in every pattern, e.g. a light singlet of a K-terminal peptide must not be completed with Arg-shifted channels. Other labels (Dimethyl, ICPL, plain mass shifts) are not counted.
|
staticprotected |
Mass shift of the theoretical pattern whose label set equals label_set.
| [in] | pattern | Theoretical pattern |
| [in] | label_set | Label set of the detected pattern |
| [out] | index_label_set | Index within the pattern at which the label set was matched |
| void resolve | ( | const ConsensusMap & | map_in, |
| ConsensusMap & | map_out, | ||
| ConsensusMap & | map_conflicts, | ||
| const MSExperiment & | blacklist = MSExperiment() |
||
| ) | const |
Split the annotated multiplets of map_in into resolved and conflicting ones.
map_out and map_conflicts inherit the meta data of map_in (column headers, protein identifications, unassigned peptide identifications, data processing) and receive the consensus features that could resp. could not be matched to a theoretical mass-shift pattern. Both output maps get fresh unique ids for their features, and the column header sizes of map_out are set to its number of features.
| [in] | map_in | Multiplets with (at most one) peptide identification each |
| [out] | map_out | Complete, consistent multiplets; cleared first |
| [out] | map_conflicts | Multiplets without identification or with conflicting quant/ID information; cleared first |
| [in] | blacklist | Spectral peaks blacklisted during feature detection (FeatureFinderMultiplexAlgorithm::getBlacklist()). Used to decide whether a dummy feature is absent (intensity 0) or not quantifiable (NaN). May be empty. |
| Exception::MissingInformation | if an identified feature lacks the map_index meta value |
| Exception::InvalidValue | if the map_index does not name a feature handle of the consensus feature |
|
overrideprotectedvirtual |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
|
protected |
Mass tolerance in Da for matching detected to theoretical mass shifts.
|
protected |
m/z tolerance in ppm for the blacklist check
|
protected |
RT tolerance in seconds for the blacklist check.