18#include <unordered_map>
24 class MultiplexDeltaMassesGenerator;
139 std::vector<MultiplexDeltaMasses::LabelSet>& label_sets)
const;
230 static double matchLabelSet_(
const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
244 const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
245 double theoretical_delta_mass_at_label_set, std::vector<bool>& delta_mass_matched)
const;
262 const std::vector<MultiplexDeltaMasses>& theoretical_patterns,
263 const std::vector<std::vector<std::string>>& samples,
264 std::vector<bool>& delta_mass_matched,
int& index_label_set)
const;
283 const std::vector<std::vector<std::string>>& samples);
286 static double findNewMZ_(
double mz,
int charge,
const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
287 const std::vector<bool>& delta_mass_matched);
331 const std::vector<bool>& delta_mass_matched,
int index_label_set,
336 double mass_tolerance_ = 0.1;
338 double mz_tolerance_ = 10.0;
340 double rt_tolerance_ = 5.0;
342 bool use_blacklist_owners_ =
false;
Definition AASequence.h:96
A consensus feature spanning multiple LC-MS/MS experiments.
Definition ConsensusFeature.h:45
std::set< FeatureHandle, FeatureHandle::IndexLess > HandleSetType
Type definitions.
Definition ConsensusFeature.h:49
A container for consensus elements.
Definition ConsensusMap.h:67
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:45
generates complete list of all possible mass shifts due to isotopic labelling
Definition MultiplexDeltaMassesGenerator.h:36
std::multiset< std::string > LabelSet
set of labels associated with a mass shift
Definition MultiplexDeltaMasses.h:46
Completes peptide multiplets and resolves quant/ID conflicts within them.
Definition MultiplexResolverAlgorithm.h:71
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< double > expectedChannelMZs(const AASequence &sequence, int charge, Size &position) const
Where the peptide of sequence appears in every channel.
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, std::vector< MultiplexDeltaMasses::LabelSet > &label_sets) const
As expectedChannelMZs() above, and the labels of the peptide in every channel.
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?...
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 OwnerRelation classifyBlacklistOwner(UInt64 owner, const ConsensusFeature &consensus, const OwnerPeptides &peptides)
How the feature owner, which reserved a blacklisted peak, relates to the multiplet consensus.
OwnerRelation
How the owner of a blacklisted peak relates to a multiplet.
Definition MultiplexResolverAlgorithm.h:162
MultiplexDeltaMassesGenerator createGenerator_() const
The generator of the theoretical mass-shift patterns, as configured in the sections algorithm and lab...
static bool hasBlacklistOwners(const MSExperiment &blacklist)
static OwnerRelation classifyBlacklistOwner(UInt64 owner, const std::string &peptide, const OwnerPeptides &peptides)
How the feature owner, which reserved a blacklisted peak, relates to the peptide peptide (of an ident...
static bool matchesResidues_(const std::vector< MultiplexDeltaMasses::DeltaMass > &pattern, const AASequence &sequence, const std::vector< std::vector< std::string > > &samples)
Does every channel of pattern label exactly the residues sequence has?
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, const std::vector< std::vector< std::string > > &samples, std::vector< bool > &delta_mass_matched, int &index_label_set) const
Find the theoretical delta mass pattern matching the detected one.
OwnerPeptides ownerPeptides(const ConsensusMap &multiplets) const
The peptide of every detected channel (feature handle with a unique id) of the identified multiplets ...
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
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
static UInt64 blacklistOwner(const MSSpectrum &spectrum, Size peak_index)
The unique id of the feature that reserved peak peak_index of spectrum (UniqueIdInterface::INVALID if...
bool isReservedByOther_(const MSExperiment &blacklist, double rt, double mz, size_t charge, const ConsensusFeature &consensus, const OwnerPeptides &peptides, OwnerCheckCounts_ &counts) const
Is a peak reserved by another multiplet within the m/z tolerance of one of the first three isotopes a...
static bool isForeign(OwnerRelation relation)
Does a peak reserved by an owner of this relation belong to another multiplet? (UNIDENTIFIED,...
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...
std::unordered_map< UInt64, std::string > OwnerPeptides
Peptide (as compared by classifyBlacklistOwner()) of each detected channel of the identified multiple...
Definition MultiplexResolverAlgorithm.h:171
MultiplexResolverAlgorithm()
Constructor; registers the algorithm and labels parameter sections.
std::string peptideKey(const PeptideHit &hit, int charge) const
The peptide of hit at charge charge, as ownerPeptides() names it (the sequence without the 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.
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 OwnerPeptides *peptides=nullptr, OwnerCheckCounts_ *counts=nullptr) const
Complete an incomplete multiplet with dummy features.
static void setBlacklistOwners(MSSpectrum &spectrum, const std::vector< UInt64 > &owners)
Record owners (one unique id per peak, INVALID if none) as the owners of the peaks of spectrum.
What the owner-aware blacklist check found in resolve(), for its log.
Definition MultiplexResolverAlgorithm.h:294
Represents a single spectrum match (candidate) for a specific tandem mass spectrum (MS/MS).
Definition PeptideHit.h:52
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19