Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to handle the memory management of the sam record object for read bases. More...
#include <read_bases.h>
Public Member Functions | |
ReadBases (const std::shared_ptr< bam1_t > &sam_record) | |
creates a ReadBases object that points to htslib memory already allocated More... | |
ReadBases (const ReadBases &other) | |
creates a deep copy of a ReadBases object More... | |
ReadBases (ReadBases &&other) noexcept | |
moves a ReadBases object, transferring ownership of the underlying htslib memory More... | |
ReadBases & | operator= (const ReadBases &other) |
creates a deep copy of a ReadBases object More... | |
ReadBases & | operator= (ReadBases &&other) noexcept |
moves a ReadBases object, transferring ownership of the underlying htslib memory More... | |
~ReadBases ()=default | |
default destruction is sufficient, since our shared_ptr will handle deallocation More... | |
Base | operator[] (const uint32_t index) const |
use freely as you would an array. More... | |
uint32_t | size () const |
std::string | to_string () const |
number of base qualities in the container More... | |
Utility class to handle the memory management of the sam record object for read bases.
This class uses Base to represent the bases A,C,G,T,N so we can get byte by byte correspondence with the underlying compressed memory model.
|
explicit |
creates a ReadBases object that points to htslib memory already allocated
sam_record | a shared pointer to an htslib raw sam record pointer for this object to take shared ownership |
gamgee::ReadBases::ReadBases | ( | const ReadBases & | other | ) |
creates a deep copy of a ReadBases object
|
noexcept |
moves a ReadBases object, transferring ownership of the underlying htslib memory
|
default |
default destruction is sufficient, since our shared_ptr will handle deallocation
creates a deep copy of a ReadBases object
< shared_ptr assignment will take care of deallocating old sam record if necessary
moves a ReadBases object, transferring ownership of the underlying htslib memory
< shared_ptr assignment will take care of deallocating old sam record if necessary
Base gamgee::ReadBases::operator[] | ( | const uint32_t | index | ) | const |
use freely as you would an array.
access an individual base by index
|
inline |
string gamgee::ReadBases::to_string | ( | ) | const |
number of base qualities in the container
returns a string representation of the bases in this read