OpenMS
Loading...
Searching...
No Matches
SwathMapMassCorrection.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: Hannes Roest$
6// $Authors: Hannes Roest$
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <vector>
12
15
16namespace OpenMS
17{
18
26 class OPENMS_DLLAPI SwathMapMassCorrection :
28 {
29
30public:
31
33
35
37 ~SwathMapMassCorrection() override = default;
39
41 void updateMembers_() override;
42
59 void correctMZ(const std::map<std::string, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType *>& transition_group_map,
60 const OpenSwath::LightTargetedExperiment & targeted_exp,
61 std::vector< OpenSwath::SwathMap > & swath_maps, const bool pasef);
62
87 void correctIM(const std::map<std::string, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType *> & transition_group_map,
88 const OpenSwath::LightTargetedExperiment & targeted_exp,
89 const std::vector< OpenSwath::SwathMap > & swath_maps,
90 const bool pasef,
91 TransformationDescription & im_trafo);
92
103 std::vector<OpenSwath::SwathMap> findSwathMapsPasef(const OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType& transition_group,
104 const std::vector< OpenSwath::SwathMap > & swath_maps);
105
125 static double estimateWindow(
126 std::vector<double> residuals,
127 double quantile = 0.99,
128 bool full_width = true,
129 double padding_factor = 1.0
130 );
131
133 double getFragmentMzWindow() const;
134
136 void setFragmentMzWindow(double fragmentMzWindow);
137
139 double getFragmentImWindow() const;
140
142 void setFragmentImWindow(double fragmentImWindow);
143
145 double getPrecursorMzWindow() const;
146
148 void setPrecursorMzWindow(double precursorMzWindow);
149
151 double getPrecursorImWindow() const;
152
154 void setPrecursorImWindow(double precursorImWindow);
155
156 private:
163 std::string debug_im_file_;
164 std::string debug_mz_file_;
165
167 double mz_estimation_padding_factor_ = 1.0;
168 double im_estimation_padding_factor_ = 1.0;
169 double mz_estimation_percentile_ = 99.0;
170 double im_estimation_percentile_ = 99.0;
171 double fragment_mz_window_ = -1;
172 double fragment_im_window_ = -1;
173 double precursor_mz_window_ = -1;
174 double precursor_im_window_ = -1;
175 };
176}
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
The representation of a group of transitions in a targeted proteomics experiment.
Definition MRMTransitionGroup.h:41
A class containing correction functions for Swath MS maps.
Definition SwathMapMassCorrection.h:28
void setPrecursorImWindow(double precursorImWindow)
Set the estimated precursor ion mobility extraction window.
void correctIM(const std::map< std::string, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType * > &transition_group_map, const OpenSwath::LightTargetedExperiment &targeted_exp, const std::vector< OpenSwath::SwathMap > &swath_maps, const bool pasef, TransformationDescription &im_trafo)
Correct the ion mobility values of a SWATH map based on the RT-normalization peptides.
std::string mz_correction_function_
Definition SwathMapMassCorrection.h:161
bool mz_extraction_window_ppm_
Definition SwathMapMassCorrection.h:158
void setFragmentMzWindow(double fragmentMzWindow)
Set the estimated fragment m/z extraction window (ppm_.
std::string debug_mz_file_
Definition SwathMapMassCorrection.h:164
static double estimateWindow(std::vector< double > residuals, double quantile=0.99, bool full_width=true, double padding_factor=1.0)
Estimate an extraction window from absolute residuals.
double getPrecursorMzWindow() const
Retrieve the estimated precursor m/z extraction window (ppm)
double getFragmentMzWindow() const
Retrieve the estimated fragment m/z extraction window (ppm)
double getFragmentImWindow() const
Retrieve the estimated fragment ion mobility extraction window.
double im_extraction_window_
Definition SwathMapMassCorrection.h:160
void setFragmentImWindow(double fragmentImWindow)
Set the estimated fragment ion mobility extraction window.
std::string debug_im_file_
Definition SwathMapMassCorrection.h:163
~SwathMapMassCorrection() override=default
Destructor.
double mz_extraction_window_
Definition SwathMapMassCorrection.h:157
bool ms1_im_
Definition SwathMapMassCorrection.h:159
void updateMembers_() override
Synchronize members with param class.
SwathMapMassCorrection()
Constructor.
std::string im_correction_function_
Definition SwathMapMassCorrection.h:162
std::vector< OpenSwath::SwathMap > findSwathMapsPasef(const OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType &transition_group, const std::vector< OpenSwath::SwathMap > &swath_maps)
Computes the SwathMaps for PASEF data in which windows can have the same m/z but differ by ion mobili...
void correctMZ(const std::map< std::string, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType * > &transition_group_map, const OpenSwath::LightTargetedExperiment &targeted_exp, std::vector< OpenSwath::SwathMap > &swath_maps, const bool pasef)
Correct the m/z values of a SWATH map based on the RT-normalization peptides.
double getPrecursorImWindow() const
Retrieve the estimated precursor ion mobility extraction window.
void setPrecursorMzWindow(double precursorMzWindow)
Set the estimated precursor m/z extraction window (ppm)
Generic description of a coordinate transformation.
Definition TransformationDescription.h:38
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition TransitionExperiment.h:369