OpenMS
MultiplexFiltering.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Lars Nilse $
6 // $Authors: Lars Nilse $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
19 
20 #include <vector>
21 #include <algorithm>
22 #include <iostream>
23 
24 #include <boost/serialization/strong_typedef.hpp>
25 
26 namespace OpenMS
27 {
47  class OPENMS_DLLAPI MultiplexFiltering :
48  public ProgressLogger
49  {
50 public:
62  typedef std::vector<std::map<int, int> > White2Original;
63 
80  MultiplexFiltering(const MSExperiment& exp_centroided, const std::vector<MultiplexIsotopicPeakPattern>& patterns, int isotopes_per_peptide_min,
81  int isotopes_per_peptide_max, double intensity_cutoff, double rt_band, double mz_tolerance, bool mz_tolerance_unit,
82  double peptide_similarity, double averagine_similarity, double averagine_similarity_scaling, String averagine_type="peptide");
87 
92 
93 protected:
102 
113  int checkForSignificantPeak_(double mz, double mz_tolerance, MSExperiment::ConstIterator& it_rt, double intensity_first_peak) const;
114 
130  bool filterPeakPositions_(double mz, const MSExperiment::ConstIterator& it_rt_begin, const MSExperiment::ConstIterator& it_rt_band_begin, const MSExperiment::ConstIterator& it_rt_band_end, const MultiplexIsotopicPeakPattern& pattern, MultiplexFilteredPeak& peak) const;
131 
140 
151  void blacklistPeak_(const MultiplexFilteredPeak& peak, unsigned pattern_idx);
152 
165 
179 
184 
188  std::vector<std::vector<int> > blacklist_;
189 
196 
201 
205  std::vector<MultiplexIsotopicPeakPattern> patterns_;
206 
211 
216 
221 
225  double rt_band_;
226 
231 
236 
241 
246 
251 
257 
258  };
259 
260 }
261 
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:79
data structure storing a single peak that passed all filters
Definition: MultiplexFilteredPeak.h:44
base class for filtering centroided and profile data for peak patterns
Definition: MultiplexFiltering.h:49
bool filterPeptideCorrelation_(const MultiplexIsotopicPeakPattern &pattern, const MultiplexFilteredPeak &peak) const
check if corresponding satellite peaks of different peptides show a good correlation
MSExperiment exp_centroided_white_
"white" centroided experimental data
Definition: MultiplexFiltering.h:195
double rt_band_
RT range used for filtering.
Definition: MultiplexFiltering.h:225
MSExperiment exp_centroided_
centroided experimental data
Definition: MultiplexFiltering.h:183
double peptide_similarity_
peptide similarity
Definition: MultiplexFiltering.h:240
double averagine_similarity_
averagine similarity
Definition: MultiplexFiltering.h:245
int checkForSignificantPeak_(double mz, double mz_tolerance, MSExperiment::ConstIterator &it_rt, double intensity_first_peak) const
check for significant peak
size_t isotopes_per_peptide_max_
maximum number of isotopic peaks per peptide
Definition: MultiplexFiltering.h:215
White2Original exp_centroided_mapping_
mapping of peak indices from a 'white' experiment exp_centroided_white_ to its original experiment ex...
Definition: MultiplexFiltering.h:200
double averagine_similarity_scaling_
averagine similarity scaling
Definition: MultiplexFiltering.h:250
bool filterAveragineModel_(const MultiplexIsotopicPeakPattern &pattern, const MultiplexFilteredPeak &peak) const
check if the satellite peaks conform with the averagine model
std::vector< MultiplexIsotopicPeakPattern > patterns_
list of peak patterns
Definition: MultiplexFiltering.h:205
MSExperiment getBlacklist()
returns the blacklisted, centroided peaks
std::vector< std::map< int, int > > White2Original
index mapping from a 'white' experiment to its original experiment
Definition: MultiplexFiltering.h:62
double mz_tolerance_
m/z shift tolerance
Definition: MultiplexFiltering.h:230
void blacklistPeak_(const MultiplexFilteredPeak &peak, unsigned pattern_idx)
blacklist this peak
size_t isotopes_per_peptide_min_
minimum number of isotopic peaks per peptide
Definition: MultiplexFiltering.h:210
String averagine_type_
type of averagine to use
Definition: MultiplexFiltering.h:256
void blacklistPeak_(const MultiplexFilteredPeak &peak)
blacklist this peak
bool filterPeakPositions_(double mz, const MSExperiment::ConstIterator &it_rt_begin, const MSExperiment::ConstIterator &it_rt_band_begin, const MSExperiment::ConstIterator &it_rt_band_end, const MultiplexIsotopicPeakPattern &pattern, MultiplexFilteredPeak &peak) const
check if there are enough peaks in the RT band to form the pattern
bool mz_tolerance_unit_in_ppm_
unit for m/z shift tolerance (ppm - true, Da - false)
Definition: MultiplexFiltering.h:235
double intensity_cutoff_
intensity cutoff
Definition: MultiplexFiltering.h:220
std::vector< std::vector< int > > blacklist_
auxiliary structs for blacklisting
Definition: MultiplexFiltering.h:188
MultiplexFiltering(const MSExperiment &exp_centroided, const std::vector< MultiplexIsotopicPeakPattern > &patterns, int isotopes_per_peptide_min, int isotopes_per_peptide_max, double intensity_cutoff, double rt_band, double mz_tolerance, bool mz_tolerance_unit, double peptide_similarity, double averagine_similarity, double averagine_similarity_scaling, String averagine_type="peptide")
constructor
void updateWhiteMSExperiment_()
construct an MS experiment from exp_centroided_ containing peaks which have not been previously black...
MSExperiment & getCentroidedExperiment()
returns the intensity-filtered, centroided spectral data
data structure for pattern of isotopic peaks
Definition: MultiplexIsotopicPeakPattern.h:29
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19