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-2013.
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 
48 #include <map>
49 #include <string>
50 #include <vector>
51 #include <utility> // for pair
52 
53 // #define DEBUG_MRMDECOY
54 
55 namespace OpenMS
56 {
87  class OPENMS_DLLAPI MRMDecoy :
88  public ProgressLogger
89  {
90 public:
91  MRMDecoy() {} // empty, no members
92 
108  void generateDecoys(OpenMS::TargetedExperiment& exp,
109  OpenMS::TargetedExperiment& dec, String method, String decoy_tag,
110  double identity_threshold, int max_attempts, double mz_threshold,
111  bool theoretical, double mz_shift, bool exclude_similar,
112  double similarity_threshold, bool remove_CNterm_mods, double precursor_mass_shift);
113 
121  void restrictTransitions(OpenMS::TargetedExperiment& exp, int min_transitions,
122  int max_transitions);
123 
124  typedef std::vector<OpenMS::TargetedExperiment::Protein> ProteinVectorType;
125  typedef std::vector<OpenMS::TargetedExperiment::Peptide> PeptideVectorType;
126  typedef std::vector<OpenMS::ReactionMonitoringTransition> TransitionVectorType;
127 
128  typedef std::map<String, std::map<String, double> > IonSeries;
129  typedef std::map<String, IonSeries> IonSeriesMapType;
130 
131  typedef std::map<String, std::vector<const ReactionMonitoringTransition*> > PeptideTransitionMapType;
132 
136  std::pair<String, DoubleReal> getDecoyIon(String ionid,
137  std::map<String, std::map<String, DoubleReal> >& decoy_ionseries);
138 
142  std::pair<String, double> getTargetIon(double ProductMZ, double mz_threshold,
143  std::map<String, std::map<String, double> > target_ionseries);
144 
160  std::map<String, std::map<String, double> > getIonSeries(
161  AASequence sequence, int precursor_charge, int max_isotopes = 2);
162 
166  std::vector<std::pair<std::string::size_type, std::string> > find_all_tryptic(
167  std::string sequence);
168 
172  float AASequenceIdentity(const String& sequence, const String& decoy);
173 
177  bool has_CNterminal_mods(const OpenMS::TargetedExperiment::Peptide & peptide);
178 
182  void correctMasses(OpenMS::TargetedExperiment& exp, double mz_threshold);
183 
192  OpenMS::TargetedExperiment::Peptide peptide, double identity_threshold, int seed = -1,
193  int max_attempts = 10);
194 
200  OpenMS::TargetedExperiment::Peptide pseudoreversePeptide(
202 
208  };
209 }
210 
211 #endif
A more convenient string class.
Definition: String.h:56
std::vector< OpenMS::ReactionMonitoringTransition > TransitionVectorType
Definition: MRMDecoy.h:126
std::vector< OpenMS::TargetedExperiment::Peptide > PeptideVectorType
Definition: MRMDecoy.h:125
Representation of a peptide/protein sequence.
Definition: AASequence.h:84
MRMDecoy()
Definition: MRMDecoy.h:91
std::vector< OpenMS::TargetedExperiment::Protein > ProteinVectorType
Definition: MRMDecoy.h:124
This class generates a TargetedExperiment object with decoys based on a TargetedExperiment object...
Definition: MRMDecoy.h:87
std::map< String, std::vector< const ReactionMonitoringTransition * > > PeptideTransitionMapType
Definition: MRMDecoy.h:131
Base class for all classes that want to report their progess.
Definition: ProgressLogger.h:56
This class stores an prediction of an SRM/MRM transition.
Definition: TargetedExperiment.h:53
std::map< String, IonSeries > IonSeriesMapType
Definition: MRMDecoy.h:129
std::map< String, std::map< String, double > > IonSeries
Definition: MRMDecoy.h:128
Definition: TargetedExperimentHelper.h:211

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:17 using doxygen 1.8.5