Gamgee
You miserable little maggot. I'll stove your head in!
|
utility functions for the gamgee library More...
Classes | |
struct | HtsFileDeleter |
a functor object to delete an htsFile pointer More... | |
struct | SamBodyDeleter |
a functor object to delete a bam1_t pointer More... | |
struct | SamHeaderDeleter |
a functor object to delete a bam_hdr_t pointer More... | |
struct | VariantBodyDeleter |
a functor object to delete a bcf1_t pointer More... | |
struct | VariantHeaderDeleter |
a functor object to delete a bcf_hdr_t pointer More... | |
Functions | |
shared_ptr< bam1_t > | make_shared_sam (bam1_t *sam_ptr) |
wraps a pre-allocated bam1_t in a shared_ptr with correct deleter More... | |
shared_ptr< bam_hdr_t > | make_shared_sam_header (bam_hdr_t *sam_header_ptr) |
wraps a pre-allocated bam_hdr_t in a shared_ptr with correct deleter More... | |
shared_ptr< bcf1_t > | make_shared_variant (bcf1_t *bcf_ptr) |
wraps a pre-allocated bcf1_t in a shared_ptr with correct deleter More... | |
shared_ptr< bcf_hdr_t > | make_shared_variant_header (bcf_hdr_t *bcf_hdr_ptr) |
wraps a pre-allocated bcf_hdr_t in a shared_ptr with correct deleter More... | |
bam1_t * | sam_deep_copy (bam1_t *original) |
creates a deep copy of an existing bam1_t More... | |
bam_hdr_t * | sam_header_deep_copy (bam_hdr_t *original) |
creates a deep copy of an existing bam_hdr_t More... | |
bcf1_t * | variant_deep_copy (bcf1_t *original) |
creates a deep copy of an existing bcf1_t More... | |
bcf_hdr_t * | variant_header_deep_copy (bcf_hdr_t *original) |
creates a deep copy of an existing bcf_hdr_t More... | |
char | complement_base (const char base) |
std::string | complement (std::string &sequence) |
calculates the complement of a sequence in-place More... | |
std::string | complement (const std::string &sequence) |
calculates the complement of a sequence More... | |
std::string | reverse_complement (const std::string &sequence) |
calculates the reverse complement of a sequence More... | |
template<typename T , typename... Args> | |
std::unique_ptr< T > | make_unique (Args &&...args) |
herb sutter's implementation of make unique More... | |
std::vector< std::string > | hts_string_array_to_vector (const char *const *const string_array, const uint32_t array_size) |
converts an array of c-strings into a vector<string> More... | |
char | complement (const char base) |
calculates the complement of a base More... | |
utility functions for the gamgee library
This namespace includes typical functors and templates for DNA sequence manipulation as well as low level routines for htslib memory management
std::string gamgee::utils::complement | ( | std::string & | sequence | ) |
calculates the complement of a sequence in-place
sequence | the sequence to turn into the complement |
std::string gamgee::utils::complement | ( | const std::string & | sequence | ) |
calculates the complement of a sequence
sequence | the sequence to get the complement from |
char gamgee::utils::complement | ( | const char | base | ) |
calculates the complement of a base
base | the base to get the complement from |
char gamgee::utils::complement_base | ( | const char | base | ) |
std::vector< std::string > gamgee::utils::hts_string_array_to_vector | ( | const char *const *const | string_array, |
const uint32_t | array_size | ||
) |
converts an array of c-strings into a vector<string>
Useful in many hts structs where a list of names is stored as a char** and we want to manipulate it in a vector<string> to maintain data contiguity and improve usability
std::shared_ptr< bam1_t > gamgee::utils::make_shared_sam | ( | bam1_t * | sam_ptr | ) |
wraps a pre-allocated bam1_t in a shared_ptr with correct deleter
sam_ptr | an htslib raw bam pointer |
std::shared_ptr< bam_hdr_t > gamgee::utils::make_shared_sam_header | ( | bam_hdr_t * | sam_header_ptr | ) |
wraps a pre-allocated bam_hdr_t in a shared_ptr with correct deleter
sam_header_ptr | an htslib raw bam header pointer |
std::shared_ptr< bcf1_t > gamgee::utils::make_shared_variant | ( | bcf1_t * | bcf_ptr | ) |
wraps a pre-allocated bcf1_t in a shared_ptr with correct deleter
bcf_ptr | an htslib raw vcf pointer |
std::shared_ptr< bcf_hdr_t > gamgee::utils::make_shared_variant_header | ( | bcf_hdr_t * | bcf_hdr_ptr | ) |
wraps a pre-allocated bcf_hdr_t in a shared_ptr with correct deleter
bcf_hdr_ptr | an htslib raw variant header pointer |
std::unique_ptr< T > gamgee::utils::make_unique | ( | Args &&... | args | ) |
herb sutter's implementation of make unique
std::string gamgee::utils::reverse_complement | ( | const std::string & | sequence | ) |
calculates the reverse complement of a sequence
sequence | the sequence to get the reverse complement from |
bam1_t * gamgee::utils::sam_deep_copy | ( | bam1_t * | original | ) |
creates a deep copy of an existing bam1_t
original | an htslib raw bam pointer |
bam_hdr_t * gamgee::utils::sam_header_deep_copy | ( | bam_hdr_t * | original | ) |
creates a deep copy of an existing bam_hdr_t
original | an htslib raw bam header pointer |
bcf1_t * gamgee::utils::variant_deep_copy | ( | bcf1_t * | original | ) |
creates a deep copy of an existing bcf1_t
original | an htslib raw bcf pointer |
bcf_hdr_t * gamgee::utils::variant_header_deep_copy | ( | bcf_hdr_t * | original | ) |
creates a deep copy of an existing bcf_hdr_t
original | an htslib raw bcf header pointer |