Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

MRMDecoy.h

Go to the documentation of this file.
00001 // --------------------------------------------------------------------------
00002 //                   OpenMS -- Open-Source Mass Spectrometry
00003 // --------------------------------------------------------------------------
00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012.
00006 //
00007 // This software is released under a three-clause BSD license:
00008 //  * Redistributions of source code must retain the above copyright
00009 //    notice, this list of conditions and the following disclaimer.
00010 //  * Redistributions in binary form must reproduce the above copyright
00011 //    notice, this list of conditions and the following disclaimer in the
00012 //    documentation and/or other materials provided with the distribution.
00013 //  * Neither the name of any author or any participating institution
00014 //    may be used to endorse or promote products derived from this software
00015 //    without specific prior written permission.
00016 // For a full list of authors, refer to the file AUTHORS.
00017 // --------------------------------------------------------------------------
00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 //
00030 // --------------------------------------------------------------------------
00031 // $Maintainer: George Rosenberger $
00032 // $Authors: George Rosenberger, Hannes Roest $
00033 // --------------------------------------------------------------------------
00034 
00035 #ifndef OPENMS_ANALYSIS_OPENSWATH_MRMDECOY_H
00036 #define OPENMS_ANALYSIS_OPENSWATH_MRMDECOY_H
00037 
00038 #include <OpenMS/ANALYSIS/TARGETED/TargetedExperiment.h>
00039 #include <OpenMS/CONCEPT/ProgressLogger.h>
00040 
00041 #include <boost/algorithm/string.hpp>
00042 #include <boost/lexical_cast.hpp>
00043 #include <boost/assign.hpp>
00044 #include <boost/random/mersenne_twister.hpp>
00045 #include <boost/random/uniform_int.hpp>
00046 #include <boost/random/variate_generator.hpp>
00047 
00048 #include <map>
00049 #include <string>
00050 #include <vector>
00051 #include <utility> // for pair
00052 
00053 // #define DEBUG_MRMDECOY
00054 
00055 namespace OpenMS
00056 {
00087   class OPENMS_DLLAPI MRMDecoy :
00088     public ProgressLogger
00089   {
00090 public:
00091     MRMDecoy() {} // empty, no members
00092 
00109     void generateDecoys(OpenMS::TargetedExperiment& exp,
00110                         OpenMS::TargetedExperiment& dec, String method, String decoy_tag,
00111                         double identity_threshold, int max_attempts, double mz_threshold, 
00112                         bool theoretical, double mz_shift, bool exclude_similar, 
00113                         double similarity_threshold, bool remove_CNterm_mods);
00114 
00122     void restrictTransitions(OpenMS::TargetedExperiment& exp, int min_transitions,
00123                              int max_transitions);
00124 
00125     typedef std::vector<OpenMS::TargetedExperiment::Protein> ProteinVectorType;
00126     typedef std::vector<OpenMS::TargetedExperiment::Peptide> PeptideVectorType;
00127     typedef std::vector<OpenMS::ReactionMonitoringTransition> TransitionVectorType;
00128 
00129     typedef std::map<String, std::map<String, double> > IonSeries;
00130     typedef std::map<String, IonSeries> IonSeriesMapType;
00131 
00132     typedef std::map<String, std::vector<const ReactionMonitoringTransition*> > PeptideTransitionMapType;
00133 
00137     std::pair<String, DoubleReal> getDecoyIon(String ionid,
00138                                               std::map<String, std::map<String, DoubleReal> >& decoy_ionseries);
00139 
00143     std::pair<String, double> getTargetIon(double ProductMZ, double mz_threshold,
00144                                            std::map<String, std::map<String, double> > target_ionseries);
00145 
00161     std::map<String, std::map<String, double> > getIonSeries(
00162       AASequence sequence, int precursor_charge, int max_isotopes = 2);
00163 
00167     std::vector<std::pair<std::string::size_type, std::string> > find_all_tryptic(
00168       std::string sequence);
00169 
00173     float AASequenceIdentity(const String& sequence, const String& decoy);
00174 
00178     bool has_CNterminal_mods(const OpenMS::TargetedExperiment::Peptide & peptide);
00179 
00183     void correctMasses(OpenMS::TargetedExperiment& exp, double mz_threshold);
00184 
00192     OpenMS::TargetedExperiment::Peptide shufflePeptide(
00193       OpenMS::TargetedExperiment::Peptide peptide, double identity_threshold, int seed = -1,
00194       int max_attempts = 10);
00195 
00201     OpenMS::TargetedExperiment::Peptide pseudoreversePeptide(
00202       OpenMS::TargetedExperiment::Peptide peptide);
00203 
00207     OpenMS::TargetedExperiment::Peptide reversePeptide(
00208       OpenMS::TargetedExperiment::Peptide peptide);
00209   };
00210 }
00211 
00212 #endif

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:42 using doxygen 1.7.1