Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MRMDecoy.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-2015.
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: George Rosenberger $
32 // $Authors: George Rosenberger, Hannes Roest $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_MRMDECOY_H
36 #define OPENMS_ANALYSIS_OPENSWATH_MRMDECOY_H
37 
40 
41 #include <boost/algorithm/string.hpp>
42 #include <boost/lexical_cast.hpp>
43 #include <boost/assign.hpp>
44 #include <boost/random/mersenne_twister.hpp>
45 #include <boost/random/uniform_int.hpp>
46 #include <boost/random/variate_generator.hpp>
47 #include <boost/unordered_map.hpp>
48 
49 #include <string>
50 #include <vector>
51 #include <map>
52 #include <utility> // for pair
53 
54 // #define DEBUG_MRMDECOY
55 
56 namespace OpenMS
57 {
88  class OPENMS_DLLAPI MRMDecoy :
89  public ProgressLogger
90  {
91 public:
92  MRMDecoy() {} // empty, no members
93 
109  void generateDecoys(OpenMS::TargetedExperiment& exp,
110  OpenMS::TargetedExperiment& dec, String method, String decoy_tag,
111  double identity_threshold, int max_attempts, double mz_threshold,
112  bool theoretical, double mz_shift, bool exclude_similar,
113  double similarity_threshold, bool remove_CNterm_mods,
114  double precursor_mass_shift, bool enable_losses, bool remove_unannotated);
122  void restrictTransitions(OpenMS::TargetedExperiment& exp, int min_transitions,
123  int max_transitions);
124 
125  typedef std::vector<OpenMS::TargetedExperiment::Protein> ProteinVectorType;
126  typedef std::vector<OpenMS::TargetedExperiment::Peptide> PeptideVectorType;
127  typedef std::vector<OpenMS::ReactionMonitoringTransition> TransitionVectorType;
128 
129  typedef boost::unordered_map<String, boost::unordered_map<String, double> > IonSeries;
130  typedef boost::unordered_map<String, IonSeries> IonSeriesMapType;
131 
132  typedef std::map<String, std::vector<const ReactionMonitoringTransition*> > PeptideTransitionMapType;
133 
137  std::pair<String, double> getDecoyIon(String ionid,
138  boost::unordered_map<String, boost::unordered_map<String, double> >& decoy_ionseries);
139 
143  std::pair<String, double> getTargetIon(double ProductMZ, double mz_threshold,
144  boost::unordered_map<String, boost::unordered_map<String, double> > target_ionseries,
145  bool enable_losses);
161  boost::unordered_map<String, boost::unordered_map<String, double> > getIonSeries(
162  AASequence sequence, int precursor_charge);
163 
167  std::vector<std::pair<std::string::size_type, std::string> > find_all_tryptic(
168  std::string sequence);
169 
173  float AASequenceIdentity(const String& sequence, const String& decoy);
174 
178  bool has_CNterminal_mods(const OpenMS::TargetedExperiment::Peptide & peptide);
179 
183  void correctMasses(OpenMS::TargetedExperiment& exp, double mz_threshold, bool enable_losses);
184 
193  OpenMS::TargetedExperiment::Peptide peptide, double identity_threshold, int seed = -1,
194  int max_attempts = 10);
195 
201  OpenMS::TargetedExperiment::Peptide pseudoreversePeptide(
203 
209  };
210 }
211 
212 #endif
A more convenient string class.
Definition: String.h:57
std::vector< OpenMS::ReactionMonitoringTransition > TransitionVectorType
Definition: MRMDecoy.h:127
std::vector< OpenMS::TargetedExperiment::Peptide > PeptideVectorType
Definition: MRMDecoy.h:126
Representation of a peptide/protein sequence.
Definition: AASequence.h:70
MRMDecoy()
Definition: MRMDecoy.h:92
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
std::vector< OpenMS::TargetedExperiment::Protein > ProteinVectorType
Definition: MRMDecoy.h:125
This class generates a TargetedExperiment object with decoys based on a TargetedExperiment object...
Definition: MRMDecoy.h:88
boost::unordered_map< String, IonSeries > IonSeriesMapType
Definition: MRMDecoy.h:130
std::map< String, std::vector< const ReactionMonitoringTransition * > > PeptideTransitionMapType
Definition: MRMDecoy.h:132
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
boost::unordered_map< String, boost::unordered_map< String, double > > IonSeries
Definition: MRMDecoy.h:129
Definition: TargetedExperimentHelper.h:211

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Aug 25 2015 05:53:49 using doxygen 1.8.9.1