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

InspectOutfile.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_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 } //namespace OpenMS
00113 
00114 #endif // OPENMS_FORMAT_INSPECTOUTFILE_H

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