Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MRMFeatureFinderScoring.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-2016.
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: Hannes Roest $
32 // $Authors: Hannes Roest $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_MRMFEATUREFINDERSCORING_H
36 #define OPENMS_ANALYSIS_OPENSWATH_MRMFEATUREFINDERSCORING_H
37 
38 #define USE_SP_INTERFACE
39 
40 // Actual scoring
42 
45 
46 // Kernel classes
54 
55 #include <boost/shared_ptr.hpp>
56 #include <boost/make_shared.hpp>
57 #include <boost/unordered_map.hpp>
58 
59 #ifdef _OPENMP
60 #include <omp.h>
61 #endif
62 
63 bool SortDoubleDoublePairFirst(const std::pair<double, double>& left, const std::pair<double, double>& right);
64 
65 namespace OpenMS
66 {
67 
90  class OPENMS_DLLAPI MRMFeatureFinderScoring :
91  public DefaultParamHandler,
92  public ProgressLogger
93  {
94 
95 public:
97 
98 
99  // All the filters expect MSSpectrum<PeakT>, thus we give it an "MSSpectrum"
100  // but filled with Chromatogram Peaks.
101 
102  // this is the type in which we store the chromatograms for this analysis
109  // a transition group holds the MSSpectra with the Chromatogram peaks from above
111  typedef std::map<String, MRMTransitionGroupType> TransitionGroupMapType;
113 
116 
119 
121 
122 
135  void pickExperiment(MSExperiment<Peak1D> & chromatograms, FeatureMap& output, TargetedExperiment& transition_exp,
137 
152  void pickExperiment(OpenSwath::SpectrumAccessPtr input, FeatureMap& output, OpenSwath::LightTargetedExperiment& transition_exp,
153  TransformationDescription trafo, OpenSwath::SpectrumAccessPtr swath_map, TransitionGroupMapType& transition_group_map);
154 
162  void prepareProteinPeptideMaps_(OpenSwath::LightTargetedExperiment& transition_exp);
164 
172  void splitTransitionGroupsDetection_(MRMTransitionGroupType& transition_group, MRMTransitionGroupType& transition_group_detection);
173 
183  void splitTransitionGroupsIdentification_(MRMTransitionGroupType& transition_group, MRMTransitionGroupType& transition_group_identification, MRMTransitionGroupType& transition_group_identification_decoy);
184 
200  OpenSwath_Scores scoreIdentification_(MRMTransitionGroupType& transition_group_identification, OpenSwathScoring& scorer, const size_t feature_idx, const std::vector<std::string> native_ids_detection, const double sn_win_len_, const unsigned int sn_bin_count_, bool write_log_messages, OpenSwath::SpectrumAccessPtr swath_map);
201 
218  void scorePeakgroups(MRMTransitionGroupType& transition_group, TransformationDescription & trafo,
219  OpenSwath::SpectrumAccessPtr swath_map, FeatureMap& output);
220 
223  void setStrictFlag(bool f)
224  {
225  strict_ = f;
226  }
227 
238  {
239  ms1_map_ = ms1_map;
240  }
241 
257  void mapExperimentToTransitionList(OpenSwath::SpectrumAccessPtr input, OpenSwath::LightTargetedExperiment& transition_exp,
258  TransitionGroupMapType& transition_group_map, TransformationDescription trafo, double rt_extraction_window);
259 private:
260 
262  void updateMembers_();
263 
264  // parameters
269  bool strict_;
270 
271  // scoring parameters
277 
278  // members
279  std::map<OpenMS::String, const PeptideType*> PeptideRefMap_;
283 
284  // data
286 
287  };
288 }
289 
290 #undef run_identifier
291 #endif // OPENMS_ANALYSIS_OPENSWATH_MRMFEATUREFINDERSCORING_H
292 
double spacing_for_spectra_resampling_
Definition: MRMFeatureFinderScoring.h:274
OpenSwath::LightPeptide PeptideType
Definition: MRMFeatureFinderScoring.h:106
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:90
Scoring of an elution peak using an exponentially modified gaussian distribution model.
Definition: EmgScoring.h:60
MRMTransitionGroup< MSSpectrum< ChromatogramPeak >, TransitionType > MRMTransitionGroupType
Definition: MRMFeatureFinderScoring.h:110
OpenMS::DIAScoring diascoring_
Definition: MRMFeatureFinderScoring.h:281
double uis_threshold_peak_area_
Definition: MRMFeatureFinderScoring.h:276
A container for features.
Definition: FeatureMap.h:94
OpenSwath::LightTransition TransitionType
Definition: MRMFeatureFinderScoring.h:104
A class that calls the scoring routines.
Definition: OpenSwathScoring.h:420
The MRMFeatureFinder finds and scores peaks of transitions that co-elute.
Definition: MRMFeatureFinderScoring.h:90
bool write_convex_hull_
Definition: MRMFeatureFinderScoring.h:268
int add_up_spectra_
Definition: MRMFeatureFinderScoring.h:273
std::map< String, MRMTransitionGroupType > TransitionGroupMapType
Definition: MRMFeatureFinderScoring.h:111
double rt_extraction_window_
Definition: MRMFeatureFinderScoring.h:265
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
void setMS1Map(OpenSwath::SpectrumAccessPtr ms1_map)
Add an MS1 map containing spectra.
Definition: MRMFeatureFinderScoring.h:237
OpenMS::EmgScoring emgscoring_
Definition: MRMFeatureFinderScoring.h:282
The representation of a transition group that has information about the individual chromatograms as w...
Definition: MRMTransitionGroup.h:56
int stop_report_after_feature_
Definition: MRMFeatureFinderScoring.h:267
OpenSwath::LightProtein ProteinType
Definition: MRMFeatureFinderScoring.h:107
Definition: TransitionExperiment.h:133
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
OpenSwath::SpectrumAccessPtr ms1_map_
Definition: MRMFeatureFinderScoring.h:285
Scoring of an spectrum at the peak apex of an chromatographic elution peak.
Definition: DIAScoring.h:82
double quantification_cutoff_
Definition: MRMFeatureFinderScoring.h:266
std::map< OpenMS::String, const PeptideType * > PeptideRefMap_
Definition: MRMFeatureFinderScoring.h:279
void setStrictFlag(bool f)
Set the flag for strict mapping.
Definition: MRMFeatureFinderScoring.h:223
Definition: TransitionExperiment.h:47
A structure to store which scores should be used by the Algorithm.
Definition: OpenSwathScoring.h:57
A structure to hold the different scores computed by OpenSWATH.
Definition: OpenSwathScoring.h:97
OpenSwath::LightTargetedExperiment TargetedExpType
Definition: MRMFeatureFinderScoring.h:105
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
This class stores an prediction of an SRM/MRM transition.
Definition: TargetedExperiment.h:53
bool SortDoubleDoublePairFirst(const std::pair< double, double > &left, const std::pair< double, double > &right)
double uis_threshold_sn_
Definition: MRMFeatureFinderScoring.h:275
OpenSwath::LightModification ModificationType
Definition: MRMFeatureFinderScoring.h:108
double rt_normalization_factor_
Definition: MRMFeatureFinderScoring.h:272
Generic description of a coordinate transformation.
Definition: TransformationDescription.h:58
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Definition: TransitionExperiment.h:151
Definition: TransitionExperiment.h:157
OpenSwath_Scores_Usage su_
Definition: MRMFeatureFinderScoring.h:280
MSSpectrum< ChromatogramPeak > RichPeakChromatogram
Type definitions.
Definition: MRMFeatureFinderScoring.h:103
bool strict_
Definition: MRMFeatureFinderScoring.h:269
Definition: TransitionExperiment.h:127

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:39:48 using doxygen 1.8.8