00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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
00087
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 }
00113
00114 #endif // OPENMS_FORMAT_SEQUESTOUTFILE_H