Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Protected Attributes

InspectOutfile Class Reference
[File IO]

Representation of an Inspect outfile. More...

#include <OpenMS/FORMAT/InspectOutfile.h>

List of all members.

Public Member Functions

 InspectOutfile ()
 default constructor
 InspectOutfile (const InspectOutfile &inspect_outfile)
 copy constructor
virtual ~InspectOutfile ()
 destructor
InspectOutfileoperator= (const InspectOutfile &inspect_outfile)
 assignment operator
bool operator== (const InspectOutfile &inspect_outfile) const
 equality operator
std::vector< Sizeload (const String &result_filename, std::vector< PeptideIdentification > &peptide_identifications, ProteinIdentification &protein_identification, const DoubleReal p_value_threshold, const String &database_filename="")
std::vector< SizegetWantedRecords (const String &result_filename, DoubleReal p_value_threshold)
void compressTrieDB (const String &database_filename, const String &index_filename, std::vector< Size > &wanted_records, const String &snd_database_filename, const String &snd_index_filename, bool append=false)
void generateTrieDB (const String &source_database_filename, const String &database_filename, const String &index_filename, bool append=false, const String species="")
void getACAndACType (String line, String &accession, String &accession_type)
void getPrecursorRTandMZ (const std::vector< std::pair< String, std::vector< std::pair< Size, Size > > > > &files_and_peptide_identification_with_scan_number, std::vector< PeptideIdentification > &ids)
void getLabels (const String &source_database_filename, String &ac_label, String &sequence_start_label, String &sequence_end_label, String &comment_label, String &species_label)
std::vector< SizegetSequences (const String &database_filename, const std::map< Size, Size > &wanted_records, std::vector< String > &sequences)
template<typename PeakT >
void getExperiment (MSExperiment< PeakT > &exp, String &type, const String &in_filename)
bool getSearchEngineAndVersion (const String &cmd_output, ProteinIdentification &protein_identification)
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, Size &number_of_columns)

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 String score_type_
 type of score

Detailed Description

Representation of an Inspect outfile.

This class serves to read in an Inspect outfile and write an idXML file

Todo:
Handle Modifications (Andreas)

Constructor & Destructor Documentation

InspectOutfile (  ) 

default constructor

InspectOutfile ( const InspectOutfile inspect_outfile  ) 

copy constructor

virtual ~InspectOutfile (  )  [virtual]

destructor


Member Function Documentation

void compressTrieDB ( const String database_filename,
const String index_filename,
std::vector< Size > &  wanted_records,
const String snd_database_filename,
const String snd_index_filename,
bool  append = false 
)

generates a trie database from another one, using the wanted records only

Exceptions:
Exception::FileNotFound 
Exception::ParseError 
Exception::UnableToCreateFile 
void generateTrieDB ( const String source_database_filename,
const String database_filename,
const String index_filename,
bool  append = false,
const String  species = "" 
)

generates a trie database from a given one (the type of database is determined by getLabels)

Exceptions:
Exception::FileNotFound 
Exception::UnableToCreateFile 
void getACAndACType ( String  line,
String accession,
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)

void getExperiment ( MSExperiment< PeakT > &  exp,
String type,
const String in_filename 
) [inline]

get the experiment from a file

Exceptions:
Exception::ParseError is thrown if the file could not be parsed or the filetype could not be determined

References FileHandler::getTypeByContent(), FileHandler::loadExperiment(), MSExperiment< PeakT, ChromatogramPeakT >::reset(), FileTypes::typeToName(), and FileTypes::UNKNOWN.

void getLabels ( const String source_database_filename,
String ac_label,
String sequence_start_label,
String sequence_end_label,
String comment_label,
String species_label 
)

retrieve the labes of a given database (at the moment FASTA and Swissprot)

Exceptions:
Exception::FileNotFound 
Exception::ParseError 
void getPrecursorRTandMZ ( const std::vector< std::pair< String, std::vector< std::pair< Size, Size > > > > &  files_and_peptide_identification_with_scan_number,
std::vector< PeptideIdentification > &  ids 
)

retrieve the precursor retention time and mz value

Exceptions:
Exception::ParseError 
bool getSearchEngineAndVersion ( const 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 String database_filename,
const std::map< Size, Size > &  wanted_records,
std::vector< String > &  sequences 
)

retrieve sequences from a trie database

Exceptions:
Exception::FileNotFound 
std::vector<Size> getWantedRecords ( const String result_filename,
DoubleReal  p_value_threshold 
)

loads only results which exceeds a given P-value threshold

Parameters:
result_filename The filename of the results file
p_value_threshold Only identifications exceeding this threshold are read
Exceptions:
FileNotFound is thrown is the file is not found
FileEmpty is thrown if the given file is empty
std::vector<Size> load ( const String result_filename,
std::vector< PeptideIdentification > &  peptide_identifications,
ProteinIdentification protein_identification,
const DoubleReal  p_value_threshold,
const String database_filename = "" 
)

load the results of an Inspect search

Parameters:
result_filename Input parameter which is the file name of the input file
peptide_identifications Output parameter which holds the peptide identifications from the given file
protein_identification Output parameter which holds the protein identifications from the given file
p_value_threshold 
database_filename 
Exceptions:
FileNotFound is thrown if the given file could not be found
ParseError is thrown if the given file could not be parsed
FileEmptry 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 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,
Size number_of_columns 
)

read the header of an inspect output file and retrieve various informations

Exceptions:
Exception::ParseError 

Member Data Documentation

const Size db_pos_length_ [static, protected]

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 proteins's position in the trie database 3) the name of the protein (the line with the accession identifier)

const Size protein_name_length_ [static, protected]

length of 3)

const Size record_length_ [static, protected]

length of the whole record

const String score_type_ [static, protected]

type of score

const Size trie_db_pos_length_ [static, protected]

length of 2)

const char trie_delimiter_ [static, protected]

the sequences in the trie database are delimited by this character


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1