Main Page Modules Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Examples
bioinfo::fasta_seq Class Template Reference
fasta_seq : represents a sequence type (seqtype) and a string identifier corresponding to the header in a fasta_seq file.
More...
#include <fasta_seq.h>
Collaboration diagram for bioinfo::fasta_seq:
[legend]List of all members.
Public Methods |
| fasta_seq () |
| default constructor allocates space for a point to seqtype. More...
|
| fasta_seq (const std::string &) |
| ~fasta_seq () |
| default make sure you clean up.
|
void | write (const std::string &) const |
const std::string& | get_header () const |
void | set_header (std::string *str) |
const seqtype& | get_seq () const |
| if you want to make this compatible with char* will have to return const seqtype*. More...
|
seqtype& | get_seq () |
void | read (const std::string &) |
Detailed Description
template<typename seqtype = std::string> class bioinfo::fasta_seq
fasta_seq : represents a sequence type (seqtype) and a string identifier corresponding to the header in a fasta_seq file.
The two stored pieces of information: the header and the sequence, are stored as pointers.
Design comments: 2 pointers are store resulting in added memory overhead. The benifit is that the sequence type can be created else where and efficiently stored in the fasta_seq object. the assumption is there will not be an extrodinary number of fasta_seq objects in memory. It is assumed that the sequence string dominates the memory space Riddle me this, can you come up with a good way to not have to commit to making the seqtype a pointer?
Constructor & Destructor Documentation
template<typename seqtype> |
bioinfo::fasta_seq< seqtype >::fasta_seq<seqtype> (
|
)
|
|
|
default constructor allocates space for a point to seqtype.
-
See also:
-
fasta_seq(const std::string&)
|
template<typename seqtype = std::string> |
bioinfo::fasta_seq<seqtype>::fasta_seq<seqtype> (
|
const std::string & )
|
|
Member Function Documentation
template<typename seqtype = std::string> |
const std::string & bioinfo::fasta_seq<seqtype>::get_header (
|
) const [inline]
|
|
|
-
Returns:
-
string containing fasta header
|
template<typename seqtype = std::string> |
seqtype & bioinfo::fasta_seq<seqtype>::get_seq (
|
) [inline]
|
|
|
-
Returns:
-
non-constant reference to sequence
-
See also:
-
const seqtype& get_seq() const;
|
template<typename seqtype = std::string> |
const seqtype & bioinfo::fasta_seq<seqtype>::get_seq (
|
) const [inline]
|
|
|
if you want to make this compatible with char* will have to return const seqtype*.
-
Returns:
-
constant reference to sequence
-
See also:
-
seqtype& get_seq();
|
template<typename seqtype> |
void bioinfo::fasta_seq< seqtype >::read (
|
const std::string & filename )
|
|
|
-
Parameters:
-
const
|
std::string& : filename containing fasta sequence |
|
template<typename seqtype = std::string> |
void bioinfo::fasta_seq<seqtype>::set_header (
|
std::string * str ) [inline]
|
|
|
-
Parameters:
-
std::string
|
* : assign header to this string pointer fasta_seq object will take ownership of string |
|
template<typename seqtype> |
void bioinfo::fasta_seq< seqtype >::write (
|
const std::string & filename ) const
|
|
|
-
Parameters:
-
const
|
std::string& : output filename for fasta_seq file |
|
The documentation for this class was generated from the following files: