Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SuffixArrayPeptideFinder Class Reference

wrapper for easy use of sufArray More...

#include <OpenMS/DATASTRUCTURES/SuffixArrayPeptideFinder.h>

Inheritance diagram for SuffixArrayPeptideFinder:
WeightWrapper

Public Types

typedef std::pair< String, StringFASTAEntry
 
- Public Types inherited from WeightWrapper
enum  WEIGHTMODE { AVERAGE = 0, MONO, SIZE_OF_WEIGHTMODE }
 

Public Member Functions

 SuffixArrayPeptideFinder (const String &filename, const String &method, const WeightWrapper::WEIGHTMODE weight_mode=WeightWrapper::MONO)
 constructor More...
 
 SuffixArrayPeptideFinder (const SuffixArrayPeptideFinder &source)
 copy constructor More...
 
virtual ~SuffixArrayPeptideFinder ()
 destructor More...
 
void getCandidates (std::vector< std::vector< std::pair< FASTAEntry, String > > > &candidates, const std::vector< double > &spec)
 finds all candidates for given spectrum in the suffix array More...
 
void getCandidates (std::vector< std::vector< std::pair< FASTAEntry, String > > > &candidates, const String &DTA_file)
 finds all candidate for given DTA file More...
 
void setTolerance (const double t)
 allowed tolerance for mass match More...
 
double getTolerance () const
 allowed tolerance for mass match More...
 
void setNumberOfModifications (Size number_of_mods) const
 setter for number of modifications More...
 
Size getNumberOfModifications () const
 getter for number of modifications More...
 
void setTags (const std::vector< String > &tags)
 setter for tags More...
 
const std::vector< String > & getTags ()
 getter for tags More...
 
void setUseTags (bool use_tags)
 setter for use_tags More...
 
bool getUseTags ()
 getter for use_tags More...
 
void setModificationOutputMethod (const String &s)
 set modification output method (valid are: "mass", "stringUnchecked", "stringChecked") More...
 
String getModificationOutputMethod ()
 getter for modification output method More...
 
- Public Member Functions inherited from WeightWrapper
 WeightWrapper ()
 constructor More...
 
 WeightWrapper (const WEIGHTMODE weight_mode)
 constructor More...
 
virtual ~WeightWrapper ()
 destructor More...
 
 WeightWrapper (const WeightWrapper &source)
 copy constructor More...
 
void setWeightMode (const WEIGHTMODE mode)
 Sets the weight mode (MONO or AVERAGE) More...
 
WEIGHTMODE getWeightMode () const
 Gets the weight mode (MONO or AVERAGE) More...
 
double getWeight (const AASequence &aa) const
 returns the weight of either mono or average value More...
 
double getWeight (const EmpiricalFormula &ef) const
 returns the weight of either mono or average value More...
 
double getWeight (const Residue &r, Residue::ResidueType res_type=Residue::Full) const
 returns the weight of either mono or average value More...
 

Protected Member Functions

String vToString_ (std::vector< String > v)
 

Protected Attributes

BigString big_string_
 bigString object holding all peptides of fasta file More...
 
SuffixArraysa_
 pointer to suffixarray More...
 
String modification_output_method_
 output method for modifications More...
 

Detailed Description

wrapper for easy use of sufArray

Member Typedef Documentation

typedef std::pair<String, String> FASTAEntry

Constructor & Destructor Documentation

SuffixArrayPeptideFinder ( const String filename,
const String method,
const WeightWrapper::WEIGHTMODE  weight_mode = WeightWrapper::MONO 
)

constructor

Parameters
filenameFASTA File name
methodName of the method used (trypticCompressed, seqan, trypticSeqan)
weight_modeif not monoisotopic weight should be used, this parameters can be set to AVERAGE
Exceptions
FileNotFoundis thrown if the filename is not found
ParseErroris thrown if a error in parsing of the fasta file occurs
InvalidValueis thrown if an unknown method is supplied

copy constructor

virtual ~SuffixArrayPeptideFinder ( )
virtual

destructor

Member Function Documentation

void getCandidates ( std::vector< std::vector< std::pair< FASTAEntry, String > > > &  candidates,
const std::vector< double > &  spec 
)

finds all candidates for given spectrum in the suffix array

Parameters
specvector holding the mass values to query
candidatesOutput holding the candidates for input masses (one vector per mass) FASTAEntry contains the FASTA header and the peptide sequence The String contains the modification (if any) in the format specified by getModificationOutputMethod()
See also
sufArray.h
void getCandidates ( std::vector< std::vector< std::pair< FASTAEntry, String > > > &  candidates,
const String DTA_file 
)

finds all candidate for given DTA file

Parameters
DTA_fileDTA file location
candidatesOutput parameters which holds the candidates suitable for the mass given in the dta file FASTAEntry contains the FASTA header and the peptide sequence The String contains the modification (if any) in the format specified by getModificationOutputMethod()
Exceptions
FileNotFoundif DTA file does not exists
ParseErroris thrown if the dta file could not be parsed
See also
sufArray.h
String getModificationOutputMethod ( )

getter for modification output method

Returns
String
Size getNumberOfModifications ( ) const

getter for number of modifications

Returns
number of modifications
const std::vector<String>& getTags ( )

getter for tags

Returns
const reference to vector of strings
double getTolerance ( ) const

allowed tolerance for mass match

Returns
Tolerance in u
bool getUseTags ( )

getter for use_tags

Returns
bool indicating whether tags are used or not
void setModificationOutputMethod ( const String s)

set modification output method (valid are: "mass", "stringUnchecked", "stringChecked")

Parameters
sdescribing how modifications should be given back
Exceptions
InvalidValueis thrown if method s is not known
void setNumberOfModifications ( Size  number_of_mods) const

setter for number of modifications

Parameters
number_of_mods
void setTags ( const std::vector< String > &  tags)

setter for tags

Parameters
tagsreference to vector of strings with tags
Note
sets use_tags = true
void setTolerance ( const double  t)

allowed tolerance for mass match

Parameters
tTolerance in u
void setUseTags ( bool  use_tags)

setter for use_tags

Parameters
use_tagsindicating whether tags should be used or not
String vToString_ ( std::vector< String v)
protected

Member Data Documentation

BigString big_string_
protected

bigString object holding all peptides of fasta file

String modification_output_method_
protected

output method for modifications

SuffixArray* sa_
protected

pointer to suffixarray


OpenMS / TOPP release 2.0.0 Documentation generated on Fri May 29 2015 17:20:44 using doxygen 1.8.9.1