OpenMS  2.5.0
MetaboTargetedAssay.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: Oliver Alka $
32 // $Authors: Oliver Alka $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
38 #include <map> //insert
39 
42 
43 #include <OpenMS/ANALYSIS/ID/SiriusMSConverter.h> //SiriusMSFile
44 
46 
47 namespace OpenMS
48 {
54  class OPENMS_DLLAPI MetaboTargetedAssay
55  {
56  public:
57 
63  double precursor_int;
68  std::vector<ReactionMonitoringTransition> potential_rmts;
69 
75  {
76  std::pair <SiriusMSFile::CompoundInfo, MSSpectrum> compoundspectrumpair;
77  };
78 
79 
101  static std::vector<MetaboTargetedAssay> extractMetaboTargetedAssay(const MSExperiment& spectra,
102  const FeatureMapping::FeatureToMs2Indices& feature_ms2_index,
103  const double& precursor_rt_tol,
104  const double& precursor_mz_distance,
105  const double& cosine_sim_threshold,
106  const double& transition_threshold,
107  const double& min_fragment_mz,
108  const double& max_fragment_mz,
109  const bool& method_consensus_spectrum,
110  const bool& exclude_ms2_precursor,
111  const unsigned int& file_counter);
112 
129  static std::vector<MetaboTargetedAssay> extractMetaboTargetedAssayFragmentAnnotation(const std::vector< CompoundSpectrumPair >& v_cmp_spec,
130  const double& transition_threshold,
131  const double& min_fragment_mz,
132  const double& max_fragment_mz,
133  const bool& use_exact_mass,
134  const bool& exclude_ms2_precursor,
135  const unsigned int& file_counter);
136 
137  protected:
138 
143  static bool intensityLess_(Peak1D a, Peak1D b);
144 
145 };
146 
147 } // namespace OpenMS
TargetedExperiment.h
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::MetaboTargetedAssay::transition_quality_score
double transition_quality_score
Definition: MetaboTargetedAssay.h:64
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::MetaboTargetedAssay::potential_rmts
std::vector< ReactionMonitoringTransition > potential_rmts
Definition: MetaboTargetedAssay.h:68
ReactionMonitoringTransition.h
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Exception.h
OpenMS::MetaboTargetedAssay::CompoundSpectrumPair::compoundspectrumpair
std::pair< SiriusMSFile::CompoundInfo, MSSpectrum > compoundspectrumpair
Definition: MetaboTargetedAssay.h:76
OpenMS::MetaboTargetedAssay
This class provides methods for the extraction of targeted assays for metabolomics.
Definition: MetaboTargetedAssay.h:54
SiriusMSConverter.h
OpenMS::MetaboTargetedAssay::potential_cmp
TargetedExperiment::Compound potential_cmp
Definition: MetaboTargetedAssay.h:67
OpenMS::TargetedExperimentHelper::Compound
Represents a compound (small molecule)
Definition: TargetedExperimentHelper.h:333
OpenMS::MetaboTargetedAssay::compound_adduct
String compound_adduct
Definition: MetaboTargetedAssay.h:66
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
OpenMS::FeatureMapping::FeatureToMs2Indices
Definition: FeatureMapping.h:48
OpenMS::MetaboTargetedAssay::precursor_int
double precursor_int
MetaboTargetedAssay is able to store a precursor and its metadata as well as a reference to a compoun...
Definition: MetaboTargetedAssay.h:63
StandardTypes.h
OpenMS::MetaboTargetedAssay::compound_name
String compound_name
Definition: MetaboTargetedAssay.h:65
OpenMS::MetaboTargetedAssay::CompoundSpectrumPair
CompoundSpectrumPair stores a pair of CompoundInfo and MSSpectrum.
Definition: MetaboTargetedAssay.h:74