#include <OpenMS/DATASTRUCTURES/BigString.h>
Concatenates the strings given as FASTAEntry separating them with a unique character and storing the headers of FASTAEntry as well as the position of separator characters. So a substring can be accessed easily and the corresponding header can be found fast by using bineary search.
Public Types | |
typedef std::pair< String, String > | FASTAEntry |
Public Member Functions | |
BigString () | |
constructor | |
BigString (const BigString &bs) | |
copy constructor | |
virtual | ~BigString () |
desctructor | |
void | add (FASTAEntry const &new_entry) |
add new string to bigString | |
void | setSeparator (const char sep) |
setter for separator character by default $ | |
char | getSeparator () |
getter for separator character | |
unsigned int | size () |
returns the number of strings | |
unsigned int | length () |
length of bigString | |
void | getPeptide (FASTAEntry &entry, unsigned int start, unsigned int length) throw (Exception::InvalidValue) |
getPeptide from start position with given length this includes FASTAHeader | |
const String & | getBigString () const |
returns bigString | |
Protected Member Functions | |
unsigned int | getIndex_ (unsigned int index, unsigned int start, unsigned int end) |
private function to implement binary search | |
unsigned int | getIndex_ (unsigned int index) |
retrieves index of inserted protein by bigStringPosition | |
Protected Attributes | |
String | big_string_ |
concatenated String | |
char | separator_ |
separator sign | |
unsigned int | count_ |
number of Strings added to big_string | |
unsigned int | len_ |
length of the big_string | |
std::vector< unsigned int > | sep_indices_ |
indices of separators | |
std::vector< String > | FASTA_header_ |
vector with headers of FASTAEntry |
typedef std::pair<String,String> FASTAEntry |
BigString | ( | ) |
constructor
virtual ~BigString | ( | ) | [virtual] |
desctructor
void add | ( | FASTAEntry const & | new_entry | ) |
add new string to bigString
new_entry | FASTAEntry to be added to big_string |
void setSeparator | ( | const char | sep | ) |
setter for separator character by default $
sep | separator character |
char getSeparator | ( | ) |
getter for separator character
unsigned int size | ( | ) |
returns the number of strings
unsigned int length | ( | ) |
length of bigString
void getPeptide | ( | FASTAEntry & | entry, | |
unsigned int | start, | |||
unsigned int | length | |||
) | throw (Exception::InvalidValue) |
getPeptide from start position with given length this includes FASTAHeader
start | start index | |
length | length of desired substring |
InvalidValue | if a peptide is part of two different fasta entrys |
const String& getBigString | ( | ) | const |
returns bigString
unsigned int getIndex_ | ( | unsigned int | index, | |
unsigned int | start, | |||
unsigned int | end | |||
) | [protected] |
private function to implement binary search
index | ||
start | start index | |
end | end inxed |
unsigned int getIndex_ | ( | unsigned int | index | ) | [protected] |
retrieves index of inserted protein by bigStringPosition
index |
String big_string_ [protected] |
concatenated String
char separator_ [protected] |
separator sign
unsigned int count_ [protected] |
number of Strings added to big_string
unsigned int len_ [protected] |
length of the big_string
std::vector<unsigned int> sep_indices_ [protected] |
indices of separators
std::vector<String> FASTA_header_ [protected] |
vector with headers of FASTAEntry
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |