OpenMS
Loading...
Searching...
No Matches
MultiplexResolverAlgorithm.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Lars Nilse, Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15
16#include <map>
17#include <string>
18#include <vector>
19
20namespace OpenMS
21{
22 class MultiplexDeltaMassesGenerator;
23
56 {
57 public:
60
79 void resolve(const ConsensusMap& map_in, ConsensusMap& map_out, ConsensusMap& map_conflicts,
80 const MSExperiment& blacklist = MSExperiment()) const;
81
82 protected:
84 static double deltaMassFromMapIndex_(const ConsensusFeature::HandleSetType& feature_handles, unsigned idx);
85
94 static double matchLabelSet_(const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
95 const MultiplexDeltaMasses::LabelSet& label_set, int& index_label_set);
96
106 bool matchDeltaMasses_(const ConsensusFeature& consensus, const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
107 double theoretical_delta_mass_at_label_set, std::vector<bool>& delta_mass_matched) const;
108
120 const std::vector<MultiplexDeltaMasses>& theoretical_patterns,
121 std::vector<bool>& delta_mass_matched, int& index_label_set) const;
122
124 static double findNewMZ_(double mz, int charge, const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
125 const std::vector<bool>& delta_mass_matched);
126
128 bool isBlacklisted_(const MSExperiment& blacklist, double rt, double mz, size_t charge, const ConsensusFeature& consensus) const;
129
140 ConsensusFeature completeConsensus_(const ConsensusFeature& consensus, const std::vector<MultiplexDeltaMasses::DeltaMass>& pattern,
141 const std::vector<bool>& delta_mass_matched, int index_label_set,
142 const MSExperiment& blacklist) const;
143
145 double mass_tolerance_ = 0.1;
147 double mz_tolerance_ = 10.0;
149 double rt_tolerance_ = 5.0;
150
151 void updateMembers_() override;
152 };
153} // namespace OpenMS
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
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:56
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.
int findMatchingPattern_(const ConsensusFeature &consensus, 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?
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.
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.
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 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...
MultiplexResolverAlgorithm()
Constructor; registers the algorithm and labels parameter sections.
bool matchDeltaMasses_(const ConsensusFeature &consensus, 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.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19