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

SequestOutfile.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: Andreas Bertsch $
00032 // $Authors: Martin Langwisch $
00033 // --------------------------------------------------------------------------
00034 
00035 #ifndef OPENMS_FORMAT_SEQUESTOUTFILE_H
00036 #define OPENMS_FORMAT_SEQUESTOUTFILE_H
00037 
00038 #include <OpenMS/CONCEPT/Exception.h>
00039 #include <OpenMS/DATASTRUCTURES/String.h>
00040 #include <OpenMS/METADATA/PeptideIdentification.h>
00041 
00042 #include <map>
00043 #include <vector>
00044 #include <cmath>
00045 
00046 namespace OpenMS
00047 {
00048   class ProteinIdentification;
00049   class DateTime;
00050 
00062   class OPENMS_DLLAPI SequestOutfile
00063   {
00064 public:
00066     SequestOutfile();
00067 
00069     SequestOutfile(const SequestOutfile & sequest_outfile);
00070 
00072     virtual ~SequestOutfile();
00073 
00075     SequestOutfile & operator=(const SequestOutfile & sequest_outfile);
00076 
00078     bool operator==(const SequestOutfile & sequest_outfile) const;
00079 
00098     void load(const String & result_filename, std::vector<PeptideIdentification> & peptide_identifications, ProteinIdentification & protein_identification, const DoubleReal p_value_threshold, std::vector<DoubleReal> & pvalues, const String & database = "", const bool ignore_proteins_per_peptide = false);
00099 
00100 // /// retrieve the p-values from the out files
00101 //          void getPValuesFromOutFiles(vector< pair < String, vector< DoubleReal > > >& filenames_and_pvalues) throw (Exception::FileNotFound, Exception::ParseError);
00102 
00104     bool getColumns(const String & line, std::vector<String> & substrings, Size number_of_columns, Size reference_column);
00105 
00114     void getSequences(const String & database_filename, const std::map<String, Size> & ac_position_map, std::vector<String> & sequences, std::vector<std::pair<String, Size> > & found, std::map<String, Size> & not_found);
00115 
00118     void getACAndACType(String line, String & accession, String & accession_type);
00119 
00125     void readOutHeader(const String & result_filename, DateTime & datetime, DoubleReal & precursor_mz_value, Int & charge, Size & precursor_mass_type, Size & ion_mass_type, Size & displayed_peptides, String & sequest, String & sequest_version, String & database_type, Int & number_column, Int & rank_sp_column, Int & id_column, Int & mh_column, Int & delta_cn_column, Int & xcorr_column, Int & sp_column, Int & sf_column, Int & ions_column, Int & reference_column, Int & peptide_column, Int & score_column, Size & number_of_columns);
00126 
00127 private:
00128 
00129     static DoubleReal const_weights_[];
00130     static DoubleReal xcorr_weights_[];
00131     static DoubleReal delta_cn_weights_[];
00132     static DoubleReal rank_sp_weights_[];
00133     static DoubleReal delta_mass_weights_[];
00134     static Size max_pep_lens_[];
00135     static Size num_frags_[];
00136   };
00137 
00138 } //namespace OpenMS
00139 
00140 #endif // OPENMS_FORMAT_SEQUESTOUTFILE_H

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