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

BigString Class Reference

concatenates Proteins given as FASTAEntry to one big string separated by a unique character (by default $) More...

#include <OpenMS/DATASTRUCTURES/BigString.h>

List of all members.

Public Types

typedef std::pair< String, StringFASTAEntry

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
Size size ()
 returns the number of strings
Size length ()
 length of bigString
void getPeptide (FASTAEntry &entry, Size start, Size length)
 getPeptide from start position with given length this includes FASTAHeader
const StringgetBigString () const
 returns bigString

Protected Member Functions

Size getIndex_ (Size index, Size start, Size end)
 private function to implement binary search
Size getIndex_ (Size index)
 retrieves index of inserted protein by bigStringPosition

Protected Attributes

String big_string_
 concatenated String
char separator_
 separator sign
Size count_
 number of Strings added to big_string
Size len_
 length of the big_string
std::vector< Sizesep_indices_
 indices of separators
std::vector< StringFASTA_header_
 vector with headers of FASTAEntry

Detailed Description

concatenates Proteins given as FASTAEntry to one big string separated by a unique character (by default $)

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.


Member Typedef Documentation

typedef std::pair<String, String> FASTAEntry

Constructor & Destructor Documentation

BigString (  ) 

constructor

BigString ( const BigString bs  ) 

copy constructor

virtual ~BigString (  )  [virtual]

desctructor


Member Function Documentation

void add ( FASTAEntry const &  new_entry  ) 

add new string to bigString

Parameters:
new_entry FASTAEntry to be added to big_string
const String& getBigString (  )  const

returns bigString

Returns:
const reference to bigString
Size getIndex_ ( Size  index,
Size  start,
Size  end 
) [protected]

private function to implement binary search

Parameters:
index 
start start index
end end inxed
Returns:
int with index
Size getIndex_ ( Size  index  )  [protected]

retrieves index of inserted protein by bigStringPosition

Parameters:
index 
Returns:
int with index
void getPeptide ( FASTAEntry entry,
Size  start,
Size  length 
)

getPeptide from start position with given length this includes FASTAHeader

Parameters:
entry contains the entry of the given range after calling
start start index
length length of desired substring
Returns:
FASTAEntry describing the protein
Exceptions:
InvalidValue if a peptide is part of two different fasta entrys
char getSeparator (  ) 

getter for separator character

Returns:
separator character
Size length (  ) 

length of bigString

Returns:
int with length of the created bigString
void setSeparator ( const char  sep  ) 

setter for separator character by default $

Parameters:
sep separator character
Size size (  ) 

returns the number of strings

Returns:
int with number of strings

Member Data Documentation

String big_string_ [protected]

concatenated String

Size count_ [protected]

number of Strings added to big_string

std::vector<String> FASTA_header_ [protected]

vector with headers of FASTAEntry

Size len_ [protected]

length of the big_string

std::vector<Size> sep_indices_ [protected]

indices of separators

char separator_ [protected]

separator sign


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