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

SequestOutfile.h (Maintainer: Martin Langwisch)

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // --------------------------------------------------------------------------
00005 //                   OpenMS Mass Spectrometry Framework
00006 // --------------------------------------------------------------------------
00007 //  Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert
00008 //
00009 //  This library is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU Lesser General Public
00011 //  License as published by the Free Software Foundation; either
00012 //  version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //  This library is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 //  Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with this library; if not, write to the Free Software
00021 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //
00023 // --------------------------------------------------------------------------
00024 // $Maintainer: Martin Langwisch $
00025 // --------------------------------------------------------------------------
00026 
00027 #ifndef OPENMS_FORMAT_SEQUESTOUTFILE_H
00028 #define OPENMS_FORMAT_SEQUESTOUTFILE_H
00029 
00030 #include <OpenMS/CONCEPT/Exception.h>
00031 #include <OpenMS/DATASTRUCTURES/Date.h>
00032 #include <OpenMS/DATASTRUCTURES/String.h>
00033 #include <OpenMS/METADATA/ProteinIdentification.h>
00034 #include <OpenMS/METADATA/PeptideIdentification.h>
00035 #include <OpenMS/MATH/STATISTICS/BasicStatistics.h>
00036 
00037 #include <map>
00038 #include <vector>
00039 #include <cmath>
00040 
00041 namespace OpenMS
00042 {
00053   class SequestOutfile
00054   {
00055     public:
00057       SequestOutfile();
00058 
00060       SequestOutfile(const SequestOutfile& sequest_outfile);
00061 
00063       virtual ~SequestOutfile();
00064 
00066       SequestOutfile& operator=(const SequestOutfile& sequest_outfile);
00067 
00069       bool operator==(const SequestOutfile& sequest_outfile) const;
00070       
00084       void load(const String& result_filename, std::vector<PeptideIdentification>& peptide_identifications, ProteinIdentification& protein_identification, const Real p_value_threshold, std::vector<Real>& pvalues, const String& database = "") throw (Exception::FileNotFound, Exception::ParseError, Exception::IllegalArgument);
00085 
00086 //      /// retrieve the p-values from the out files
00087 //      void getPValuesFromOutFiles(vector< pair < String, vector< Real > > >& filenames_and_pvalues) throw (Exception::FileNotFound, Exception::ParseError);
00088 
00090       bool getColumns(const String& line, std::vector<String>& substrings, UInt number_of_columns, UInt reference_column);
00091 
00093       void getSequences(const String& database_filename, const std::map<String, UInt>& ac_position_map, std::vector<String>& sequences, std::vector<std::pair<String, UInt> >& found, std::map<String, UInt>& not_found) throw (Exception::FileNotFound);
00094 
00097       void getACAndACType(String line, String& accession, String& accession_type);
00098 
00100       void readOutHeader(const String& result_filename, DateTime& datetime, Real& precursor_mz_value, Int& charge, UInt& precursor_mass_type, UInt& ion_mass_type, UInt& 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, UInt& number_of_columns) throw(Exception::FileNotFound, Exception::ParseError);
00101       
00102     private:
00103       static Real const_weights_[];
00104       static Real xcorr_weights_[];
00105       static Real delta_cn_weights_[];
00106       static Real rank_sp_weights_[];
00107       static Real delta_mass_weights_[];
00108       static UInt max_pep_lens_[];
00109       static UInt num_frags_[];
00110    };
00111   
00112 } //namespace OpenMS
00113 
00114 #endif // OPENMS_FORMAT_SEQUESTOUTFILE_H

Generated Tue Apr 1 15:36:37 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1