Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | List of all members
SuffixArrayTrypticSeqan Class Reference

Class that uses SEQAN library for a suffix array. It can be used to find peptide Candidates for a MS spectrum. More...

#include <OpenMS/DATASTRUCTURES/SuffixArrayTrypticSeqan.h>

Inheritance diagram for SuffixArrayTrypticSeqan:
SuffixArraySeqan SuffixArray WeightWrapper

Public Member Functions

 SuffixArrayTrypticSeqan (const String &st, const String &filename, const WeightWrapper::WEIGHTMODE weight_mode=WeightWrapper::MONO)
 constructor for tryptic seqan array with a specially optimized implementation More...
 
bool isDigestingEnd (const char aa1, const char aa2) const
 returns if an enzyme will cut after first character More...
 
- Public Member Functions inherited from SuffixArraySeqan
 SuffixArraySeqan (const String &st, const String &filename, const WeightWrapper::WEIGHTMODE weight_mode=WeightWrapper::MONO)
 constructor More...
 
 SuffixArraySeqan (const SuffixArraySeqan &source)
 copy constructor More...
 
virtual ~SuffixArraySeqan ()
 destructor More...
 
String toString ()
 converts suffix array to a printable string More...
 
void findSpec (std::vector< std::vector< std::pair< std::pair< SignedSize, SignedSize >, double > > > &candidates, const std::vector< double > &spec)
 the function that will find all peptide candidates for a given spectrum More...
 
bool save (const String &filename)
 saves the suffix array to disc More...
 
bool open (const String &filename)
 opens the suffix array More...
 
void setTolerance (double t)
 setter for tolerance More...
 
double getTolerance () const
 getter for tolerance More...
 
void setTags (const std::vector< OpenMS::String > &tags)
 setter for tags More...
 
const std::vector
< OpenMS::String > & 
getTags ()
 getter for tags More...
 
void setUseTags (bool use_tags)
 setter for use_tags More...
 
bool getUseTags ()
 getter for use_tags More...
 
void setNumberOfModifications (Size number_of_mods)
 setter for number of modifications More...
 
Size getNumberOfModifications ()
 getter for number of modifications More...
 
void printStatistic ()
 output for statistic More...
 
- Public Member Functions inherited from SuffixArray
 SuffixArray (const String &st, const String &filename)
 constructor taking the string and the filename for writing or reading More...
 
 SuffixArray (const SuffixArray &sa)
 copy constructor More...
 
virtual ~SuffixArray ()=0
 destructor More...
 
 SuffixArray ()
 constructor 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...
 

Additional Inherited Members

- Public Types inherited from WeightWrapper
enum  WEIGHTMODE { AVERAGE = 0, MONO, SIZE_OF_WEIGHTMODE }
 
- Protected Member Functions inherited from SuffixArraySeqan
void goNextSubTree_ (TIter &it, double &m, std::stack< double > &allm, std::stack< std::map< double, SignedSize > > &mod_map)
 overwriting goNextSubTree_ from seqan index_esa_stree.h for mass update during suffix array traversal More...
 
void goNextSubTree_ (TIter &it)
 goes to the next sub tree More...
 
void goNext_ (TIter &it, double &m, std::stack< double > &allm, std::stack< std::map< double, SignedSize > > &mod_map)
 overwriting goNext from seqan index_esa_stree.h for mass update during suffix array traversal More...
 
void parseTree_ (TIter &it, std::vector< std::pair< SignedSize, SignedSize > > &out_number, std::vector< std::pair< SignedSize, SignedSize > > &edge_length, std::vector< SignedSize > &leafe_depth)
 
SignedSize findFirst_ (const std::vector< double > &spec, double &m)
 binary search for finding the index of the first element of the spectrum that matches the desired mass within the tolerance. More...
 
SignedSize findFirst_ (const std::vector< double > &spec, double &m, SignedSize start, SignedSize end)
 binary search for finding the index of the first element of the spectrum that matches the desired mass within the tolerance. It searches recursively. More...
 
- Protected Attributes inherited from SuffixArraySeqan
TIndex index_
 seqan suffix array More...
 
TIter it_
 seqan suffix array iterator More...
 
const Strings_
 reference to strings for which the suffix array is build More...
 
double masse_ [255]
 amino acid masses More...
 
SignedSize number_of_modifications_
 number of allowed modifications More...
 
std::vector< Stringtags_
 all tags More...
 
bool use_tags_
 if tags are used More...
 
double tol_
 tolerance More...
 

Detailed Description

Class that uses SEQAN library for a suffix array. It can be used to find peptide Candidates for a MS spectrum.

This class uses SEQAN suffix array. It can just be used for finding peptide Candidates for a given MS Spectrum within a certain mass tolerance. The suffix array can be saved to disc for reused so it has to be build just once.

Constructor & Destructor Documentation

SuffixArrayTrypticSeqan ( const String st,
const String filename,
const WeightWrapper::WEIGHTMODE  weight_mode = WeightWrapper::MONO 
)

constructor for tryptic seqan array with a specially optimized implementation

Parameters
stthe suffix array string, which is used to build the suffix array
filenamefilename of fasta file
weight_modeif not monoisotopic weight should be used, this parameters can be set to AVERAGE
Exceptions
InvalidValueis thrown if string st if invalid
FileNotFoundis thrown if given file is not found

Member Function Documentation

bool isDigestingEnd ( const char  aa1,
const char  aa2 
) const
virtual

returns if an enzyme will cut after first character

Parameters
aa1const char as first amino acid
aa2const char as second amino acid
Returns
bool describing if it is a digesting site

Reimplemented from SuffixArraySeqan.


OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:46 using doxygen 1.8.5