OpenMS  2.6.0
IsobaricChannelExtractor.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Chris Bielow $
32 // $Authors: Stephan Aiche, Chris Bielow $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
38 #include <OpenMS/KERNEL/Peak2D.h>
41 
42 namespace OpenMS
43 {
44  class IsobaricQuantitationMethod;
45  class ConsensusMap;
46  class ConsensusFeature;
47 
69  class OPENMS_DLLAPI IsobaricChannelExtractor :
70  public DefaultParamHandler
71  {
72 public:
78  explicit IsobaricChannelExtractor(const IsobaricQuantitationMethod* const quant_method);
79 
82 
85 
92  void extractChannels(const PeakMap& ms_exp_data, ConsensusMap& consensus_map);
93 
94 private:
102  struct PuritySate_
103  {
108 
113 
119  PuritySate_(const PeakMap& targetExp);
120 
126  void advanceFollowUp(const double rt);
127 
133  bool followUpValid(const double rt);
134  };
135 
138 
141 
144 
147 
150 
153 
156 
159 
162 
165 
167  void registerChannelsInOutputMap_(ConsensusMap& consensus_map);
168 
175  bool isValidPrecursor_(const Precursor& precursor) const;
176 
183  bool hasLowIntensityReporter_(const ConsensusFeature& cf) const;
184 
192  double computePrecursorPurity_(const PeakMap::ConstIterator& ms2_spec, const PuritySate_& pState) const;
193 
201  double computeSingleScanPrecursorPurity_(const PeakMap::ConstIterator& ms2_spec, const PeakMap::SpectrumType& precursor_spec) const;
202 
210  {
211  for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
212  {
213  if (!it->getActivationMethods().empty()) return Precursor::NamesOfActivationMethod[*(it->getActivationMethods().begin())];
214  }
215  return "";
216  }
217 
218 
219 protected:
221  void setDefaultParams_();
222 
224  void updateMembers_() override;
225  };
226 } // namespace
227 
DefaultParamHandler.h
ConsensusXMLFile.h
OpenMS::UniqueIdInterface::ensureUniqueId
Size ensureUniqueId()
Assigns a valid unique id, but only if the present one is invalid. Returns 1 if the unique id was cha...
Definition: UniqueIdInterface.h:154
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:144
OpenMS::IsobaricQuantifier
Given the extracted channel intensities the IsobaricQuantifier corrects and normalizes the intensitie...
Definition: IsobaricQuantifier.h:51
OpenMS::ItraqEightPlexQuantitationMethod
iTRAQ 8 plex quantitation to be used with the IsobaricQuantitation.
Definition: ItraqEightPlexQuantitationMethod.h:48
OpenMS::ItraqFourPlexQuantitationMethod
iTRAQ 4 plex quantitation to be used with the IsobaricQuantitation.
Definition: ItraqFourPlexQuantitationMethod.h:46
OpenMS::IsobaricQuantitationMethod::getMethodName
virtual const String & getMethodName() const =0
Returns a unique name for the quantitation method.
double
OpenMS::ConsensusXMLFile::store
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
OpenMS::IsobaricChannelExtractor::reporter_mass_shift_
Peak2D::CoordinateType reporter_mass_shift_
Allowed deviation between the expected and observed reporter ion m/z.
Definition: IsobaricChannelExtractor.h:143
OpenMS::IsobaricChannelExtractor::getActivationMethod_
String getActivationMethod_(const PeakMap::SpectrumType &s) const
Get the first (of potentially many) activation methods (HCD,CID,...) of this spectrum.
Definition: IsobaricChannelExtractor.h:209
OpenMS::IsobaricChannelExtractor::quant_method_
const IsobaricQuantitationMethod * quant_method_
The used quantitation method (itraq4plex, tmt6plex,..).
Definition: IsobaricChannelExtractor.h:137
OpenMS::MzMLFile
File adapter for MzML files.
Definition: MzMLFile.h:55
OpenMS::String
A more convenient string class.
Definition: String.h:59
OpenMS::IsobaricChannelExtractor::min_precursor_intensity_
Peak2D::IntensityType min_precursor_intensity_
Minimum intensity of the precursor to be considered for quantitation.
Definition: IsobaricChannelExtractor.h:146
MzMLFile.h
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::SpectrumSettings::getPrecursors
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
OpenMS::IsobaricChannelExtractor::PuritySate_::hasFollowUpScan
bool hasFollowUpScan
Indicates if a follow up scan was found.
Definition: IsobaricChannelExtractor.h:110
OpenMS::Constants::c
const double c
OpenMS::TMTElevenPlexQuantitationMethod::getMethodName
const String & getMethodName() const override
Methods to implement from IsobaricQuantitationMethod.
OpenMS::TMTSixPlexQuantitationMethod
TMT 6plex quantitation to be used with the IsobaricQuantitation.
Definition: TMTSixPlexQuantitationMethod.h:48
OpenMS::IsobaricChannelExtractor
Extracts individual channels from MS/MS spectra for isobaric labeling experiments.
Definition: IsobaricChannelExtractor.h:69
OpenMS::TMTSixPlexQuantitationMethod::getMethodName
const String & getMethodName() const override
Methods to implement from IsobaricQuantitationMethod.
IsobaricChannelExtractor.h
ItraqEightPlexQuantitationMethod.h
TMTSixteenPlexQuantitationMethod.h
TMTElevenPlexQuantitationMethod.h
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
TMTTenPlexQuantitationMethod.h
OpenMS::IsobaricChannelExtractor::PuritySate_
Small struct to capture the current state of the purity computation.
Definition: IsobaricChannelExtractor.h:102
OpenMS::TMTTenPlexQuantitationMethod::getMethodName
const String & getMethodName() const override
Methods to implement from IsobaricQuantitationMethod.
OpenMS::Precursor
Precursor meta information.
Definition: Precursor.h:57
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Peak2D.h
OpenMS::MzMLFile::load
void load(const String &filename, PeakMap &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
MSQuantifications.h
OpenMS::IsobaricQuantitationMethod
Abstract base class describing an isobaric quantitation method in terms of the used channels and an i...
Definition: IsobaricQuantitationMethod.h:54
OpenMS::IsobaricChannelExtractor::remove_low_intensity_quantifications_
bool remove_low_intensity_quantifications_
Flag if complete quantification should be discarded if a single reporter ion has an intensity below t...
Definition: IsobaricChannelExtractor.h:155
OpenMS::IsobaricChannelExtractor::PuritySate_::baseExperiment
const PeakMap & baseExperiment
reference to the experiment to analyze
Definition: IsobaricChannelExtractor.h:112
OpenMS::ItraqEightPlexQuantitationMethod::getMethodName
const String & getMethodName() const override
Methods to implement from IsobaricQuantitationMethod.
OpenMS::IsobaricChannelExtractor::interpolate_precursor_purity_
bool interpolate_precursor_purity_
Flag if precursor purity will solely be computed based on the precursor scan (false),...
Definition: IsobaricChannelExtractor.h:164
OpenMS::TMTSixteenPlexQuantitationMethod::getMethodName
const String & getMethodName() const override
Methods to implement from IsobaricQuantitationMethod.
OpenMS::ConsensusFeature
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
OpenMS::DefaultParamHandler::setParameters
void setParameters(const Param &param)
Sets the parameters.
OpenMS::IsobaricChannelExtractor::PuritySate_::precursorScan
PeakMap::ConstIterator precursorScan
Iterator pointing to the potential MS1 precursor scan.
Definition: IsobaricChannelExtractor.h:105
OpenMS::DefaultParamHandler::getParameters
const Param & getParameters() const
Non-mutable access to the parameters.
OpenMS::IsobaricChannelExtractor::max_precursor_isotope_deviation_
double max_precursor_isotope_deviation_
Max. allowed deviation between theoretical and observed isotopic peaks of the precursor peak in the i...
Definition: IsobaricChannelExtractor.h:161
OpenMS::IsobaricChannelExtractor::PuritySate_::followUpScan
PeakMap::ConstIterator followUpScan
Iterator pointing to the potential follow up MS1 scan.
Definition: IsobaricChannelExtractor.h:107
OpenMS::TMTSixteenPlexQuantitationMethod
TMT 16plex quantitation to be used with the IsobaricQuantitation.
Definition: TMTSixteenPlexQuantitationMethod.h:48
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:80
TMTSixPlexQuantitationMethod.h
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
IsobaricQuantifier.h
OpenMS::IsobaricChannelExtractor::min_reporter_intensity_
Peak2D::IntensityType min_reporter_intensity_
Minimum reporter ion intensity to be considered for quantitation.
Definition: IsobaricChannelExtractor.h:152
MSExperiment.h
OpenMS::TMTTenPlexQuantitationMethod
TMT 10plex quantitation to be used with the IsobaricQuantitation.
Definition: TMTTenPlexQuantitationMethod.h:48
OpenMS::ConsensusMap::getColumnHeaders
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
ItraqFourPlexQuantitationMethod.h
OpenMS::ItraqFourPlexQuantitationMethod::getMethodName
const String & getMethodName() const override
Methods to implement from IsobaricQuantitationMethod.
float
OpenMS::DataProcessing::QUANTITATION
Quantitation.
Definition: DataProcessing.h:72
MzQuantMLFile.h
OpenMS::Precursor::NamesOfActivationMethod
static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD]
Names of activation methods.
Definition: Precursor.h:95
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::MSExperiment::ConstIterator
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:113
OpenMS::IsobaricChannelExtractor::selected_activation_
String selected_activation_
Used to select only specific types of spectra for the channel extraction.
Definition: IsobaricChannelExtractor.h:140
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
StandardTypes.h
OpenMS::TMTElevenPlexQuantitationMethod
TMT 11plex quantitation to be used with the IsobaricQuantitation.
Definition: TMTElevenPlexQuantitationMethod.h:48
File.h
OpenMS::IsobaricChannelExtractor::keep_unannotated_precursor_
bool keep_unannotated_precursor_
Flag if precursor with missing intensity value or missing precursor spectrum should be included or no...
Definition: IsobaricChannelExtractor.h:149
OpenMS::IsobaricChannelExtractor::min_precursor_purity_
double min_precursor_purity_
Minimum precursor purity to accept the spectrum for quantitation.
Definition: IsobaricChannelExtractor.h:158
OpenMS::ProgressLogger::setLogType
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
TOPPBase.h
OpenMS::ConsensusXMLFile
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:62
IsobaricQuantitationMethod.h