![]() |
OpenMS
|
#include <OpenMS/FORMAT/InspectOutfile.h>
Public Member Functions | |
| InspectOutfile () | |
| default constructor | |
| InspectOutfile (const InspectOutfile &inspect_outfile) | |
| copy constructor | |
| virtual | ~InspectOutfile () |
| destructor | |
| InspectOutfile & | operator= (const InspectOutfile &inspect_outfile) |
| assignment operator | |
| bool | operator== (const InspectOutfile &inspect_outfile) const |
| equality operator | |
| std::vector< Size > | load (const std::string &result_filename, PeptideIdentificationList &peptide_identifications, ProteinIdentification &protein_identification, const double p_value_threshold, const std::string &database_filename="") |
| std::vector< Size > | getWantedRecords (const std::string &result_filename, double p_value_threshold) |
| void | compressTrieDB (const std::string &database_filename, const std::string &index_filename, std::vector< Size > &wanted_records, const std::string &snd_database_filename, const std::string &snd_index_filename, bool append=false) |
| void | generateTrieDB (const std::string &source_database_filename, const std::string &database_filename, const std::string &index_filename, bool append=false, const std::string &species="") |
| void | getACAndACType (std::string line, std::string &accession, std::string &accession_type) |
| void | getPrecursorRTandMZ (const std::vector< std::pair< std::string, std::vector< std::pair< Size, Size > > > > &files_and_peptide_identification_with_scan_number, PeptideIdentificationList &ids) |
| void | getLabels (const std::string &source_database_filename, std::string &ac_label, std::string &sequence_start_label, std::string &sequence_end_label, std::string &comment_label, std::string &species_label) |
| std::vector< Size > | getSequences (const std::string &database_filename, const std::map< Size, Size > &wanted_records, std::vector< std::string > &sequences) |
| void | getExperiment (PeakMap &exp, std::string &type, const std::string &in_filename) |
| bool | getSearchEngineAndVersion (const std::string &cmd_output, ProteinIdentification &protein_identification) |
| get the search engine and its version from the output of the InsPecT executable without parameters | |
| void | readOutHeader (const std::string &filename, const std::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, Size &number_of_columns) |
| read the header of an inspect output file and retrieve various information | |
Static Protected Attributes | |
| static const Size | db_pos_length_ |
| length of 1) | |
| static const Size | trie_db_pos_length_ |
| length of 2) | |
| static const Size | protein_name_length_ |
| length of 3) | |
| static const Size | record_length_ |
| length of the whole record | |
| static const char | trie_delimiter_ |
| the sequences in the trie database are delimited by this character | |
| static const std::string | score_type_ |
| type of score | |
@brief Representation of an Inspect outfile This class serves to read in an Inspect outfile and write an idXML file
@ingroup FileIO
| InspectOutfile | ( | ) |
default constructor
| InspectOutfile | ( | const InspectOutfile & | inspect_outfile | ) |
copy constructor
|
virtual |
destructor
| void compressTrieDB | ( | const std::string & | database_filename, |
| const std::string & | index_filename, | ||
| std::vector< Size > & | wanted_records, | ||
| const std::string & | snd_database_filename, | ||
| const std::string & | snd_index_filename, | ||
| bool | append = false |
||
| ) |
generates a trie database from another one, using the wanted records only
@throw Exception::FileNotFound @throw Exception::ParseError @throw Exception::UnableToCreateFile
| void generateTrieDB | ( | const std::string & | source_database_filename, |
| const std::string & | database_filename, | ||
| const std::string & | index_filename, | ||
| bool | append = false, |
||
| const std::string & | species = "" |
||
| ) |
generates a trie database from a given one (the type of database is determined by getLabels)
| void getACAndACType | ( | std::string | line, |
| std::string & | accession, | ||
| std::string & | accession_type | ||
| ) |
retrieve the accession type and accession number from a protein description line (e.g. from FASTA line: >gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus], get ac:AAD44166.1 ac type: GenBank)
|
inline |
get the experiment from a file
| Exception::ParseError | is thrown if the file could not be parsed or the filetype could not be determined |
References FileHandler::getTypeByContent(), FileHandler::loadExperiment(), and MSExperiment::reset().
| void getLabels | ( | const std::string & | source_database_filename, |
| std::string & | ac_label, | ||
| std::string & | sequence_start_label, | ||
| std::string & | sequence_end_label, | ||
| std::string & | comment_label, | ||
| std::string & | species_label | ||
| ) |
retrieve the labels of a given database (at the moment FASTA and Swissprot)
@throw Exception::FileNotFound @throw Exception::ParseError
| void getPrecursorRTandMZ | ( | const std::vector< std::pair< std::string, std::vector< std::pair< Size, Size > > > > & | files_and_peptide_identification_with_scan_number, |
| PeptideIdentificationList & | ids | ||
| ) |
retrieve the precursor retention time and mz value
@throw Exception::ParseError
| bool getSearchEngineAndVersion | ( | const std::string & | cmd_output, |
| ProteinIdentification & | protein_identification | ||
| ) |
get the search engine and its version from the output of the InsPecT executable without parameters
returns true on success, false otherwise
| std::vector< Size > getSequences | ( | const std::string & | database_filename, |
| const std::map< Size, Size > & | wanted_records, | ||
| std::vector< std::string > & | sequences | ||
| ) |
retrieve sequences from a trie database
@throw Exception::FileNotFound
| std::vector< Size > getWantedRecords | ( | const std::string & | result_filename, |
| double | p_value_threshold | ||
| ) |
loads only results which exceeds a given P-value threshold
@param[in] result_filename The filename of the results file @param[in] p_value_threshold Only identifications exceeding this threshold are read @throw FileNotFound is thrown is the file is not found @throw FileEmpty is thrown if the given file is empty
| std::vector< Size > load | ( | const std::string & | result_filename, |
| PeptideIdentificationList & | peptide_identifications, | ||
| ProteinIdentification & | protein_identification, | ||
| const double | p_value_threshold, | ||
| const std::string & | database_filename = "" |
||
| ) |
load the results of an Inspect search
@param[out] result_filename Input parameter which is the file name of the input file @param[out] peptide_identifications Output parameter which holds the peptide identifications from the given file @param[out] protein_identification Output parameter which holds the protein identifications from the given file @param[in] p_value_threshold @param[in] database_filename @throw FileNotFound is thrown if the given file could not be found @throw ParseError is thrown if the given file could not be parsed @throw FileEmpty is thrown if the given file is empty
| InspectOutfile & operator= | ( | const InspectOutfile & | inspect_outfile | ) |
assignment operator
| bool operator== | ( | const InspectOutfile & | inspect_outfile | ) | const |
equality operator
| void readOutHeader | ( | const std::string & | filename, |
| const std::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, | ||
| Size & | number_of_columns | ||
| ) |
read the header of an inspect output file and retrieve various information
| Exception::ParseError |
|
staticprotected |
length of 1)
a record in the index file that belongs to a trie database consists of three parts 1) the protein's position in the original database 2) the protein's position in the trie database 3) the name of the protein (the line with the accession identifier)
|
staticprotected |
length of 3)
|
staticprotected |
length of the whole record
|
staticprotected |
type of score
|
staticprotected |
length of 2)
|
staticprotected |
the sequences in the trie database are delimited by this character