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_INSPECTOUTFILE_H
00028 #define OPENMS_FORMAT_INSPECTOUTFILE_H
00029
00030 #include <OpenMS/CONCEPT/Exception.h>
00031 #include <OpenMS/DATASTRUCTURES/String.h>
00032 #include <OpenMS/KERNEL/MSExperiment.h>
00033 #include <OpenMS/METADATA/ProteinIdentification.h>
00034 #include <OpenMS/METADATA/PeptideIdentification.h>
00035
00036 namespace OpenMS
00037 {
00047 class InspectOutfile
00048 {
00049 public:
00051 InspectOutfile();
00052
00054 InspectOutfile(const InspectOutfile& inspect_outfile);
00055
00057 virtual ~InspectOutfile();
00058
00060 InspectOutfile& operator=(const InspectOutfile& inspect_outfile);
00061
00063 bool operator==(const InspectOutfile& inspect_outfile) const;
00064
00066 std::vector< UInt > load(const String& result_filename, std::vector< PeptideIdentification >& peptide_identifications, ProteinIdentification& protein_identification, const Real p_value_threshold, const String& database_filename = "") throw (Exception::FileNotFound, Exception::ParseError, Exception::IllegalArgument, Exception::FileEmpty);
00067
00068 std::vector< UInt > getWantedRecords(const String& result_filename, Real p_value_threshold) throw (Exception::FileNotFound, Exception::FileEmpty, Exception::IllegalArgument);
00069
00071 void compressTrieDB(const String& database_filename, const String& index_filename, std::vector< UInt >& wanted_records, const String& snd_database_filename, const String& snd_index_filename, bool append = false) throw (Exception::FileNotFound, Exception::ParseError, Exception::UnableToCreateFile);
00072
00074 void generateTrieDB(const String& source_database_filename, const String& database_filename, const String& index_filename, bool append = false, const String species = "") throw (Exception::FileNotFound, Exception::UnableToCreateFile);
00075
00076
00079 void getACAndACType(String line, String& accession, String& accession_type);
00080
00082 void getPrecursorRTandMZ(const std::vector< std::pair< String, std::vector< std::pair< UInt, UInt > > > >& files_and_peptide_identification_with_scan_number, std::vector< PeptideIdentification >& ids) throw(Exception::ParseError);
00083
00085 void getLabels(const String& source_database_filename, String& ac_label, String& sequence_start_label, String& sequence_end_label, String& comment_label, String& species_label) throw (Exception::FileNotFound, Exception::ParseError);
00086
00088 std::vector< UInt > getSequences(const String& database_filename, const std::map< UInt, UInt >& wanted_records, std::vector< String >& sequences) throw (Exception::FileNotFound);
00089
00091 template< typename PeakT > void getExperiment(MSExperiment< PeakT >& exp, String& type, const String& in_filename) throw(Exception::ParseError);
00092
00094 void getSearchEngineAndVersion(const String& inspect_output_without_parameters_filename, ProteinIdentification& protein_identification) throw (Exception::FileNotFound);
00095
00097 void readOutHeader(const String& filename, const String& header_line, Int& spectrum_file_column, Int& scan_column, Int& peptide_column, Int& protein_column, Int& charge_column, Int& MQ_score_column, Int& p_value_column, Int& record_number_column, Int& DB_file_pos_column, Int& spec_file_pos_column, UInt& number_of_columns) throw (Exception::ParseError);
00098
00099 protected:
00104 static const UInt db_pos_length_;
00105 static const UInt trie_db_pos_length_;
00106 static const UInt protein_name_length_;
00107 static const UInt record_length_;
00108 static const char trie_delimiter_;
00109 static const String score_type_;
00110 };
00111
00112 }
00113
00114 #endif // OPENMS_FORMAT_INSPECTOUTFILE_H