Utility class to hold a variant header.
More...
#include <variant_header.h>
Utility class to hold a variant header.
It can be used to read headers from a VCF/BCF file, but to create one from scratch you want to use the VariantHeaderBuilder
gamgee::VariantHeader::VariantHeader |
( |
| ) |
|
|
default |
gamgee::VariantHeader::VariantHeader |
( |
const std::shared_ptr< bcf_hdr_t > & |
header | ) |
|
|
inlineexplicit |
creates a VariantHeader given htslib object.
- Note
- used by all iterators
gamgee::VariantHeader::VariantHeader |
( |
const VariantHeader & |
other | ) |
|
makes a deep copy of a VariantHeader. Shared pointers maintain state to all other associated objects correctly.
moves VariantHeader accordingly. Shared pointers maintain state to all other associated objects correctly.
gamgee::VariantHeader::~VariantHeader |
( |
| ) |
|
|
default |
void gamgee::VariantHeader::advanced_merge_header |
( |
const VariantHeader & |
other | ) |
|
|
inline |
vector< string > gamgee::VariantHeader::contigs |
( |
| ) |
const |
builds a vector with the contigs
vector< string > gamgee::VariantHeader::filters |
( |
| ) |
const |
builds a vector with the filters
vector< string > gamgee::VariantHeader::format_fields |
( |
| ) |
const |
builds a vector with the format fields
vector< string > gamgee::VariantHeader::info_fields |
( |
| ) |
const |
builds a vector with the info fields
uint32_t gamgee::VariantHeader::n_samples |
( |
| ) |
const |
|
inline |
returns the number of samples in the header
- Note
- much faster than getting the actual list of samples
deep copy assignment of a VariantHeader. Shared pointers maintain state to all other associated objects correctly.
< shared_ptr assignment will take care of deallocating old sam record if necessary
move assignment of a VariantHeader. Shared pointers maintain state to all other associated objects correctly.
other is an r-value reference, so it will disappear into the nether right after the swap
vector< string > gamgee::VariantHeader::samples |
( |
| ) |
const |
builds a vector with the names of the samples
This implementation is simply transforming the char ** representation of the sample names into a contiguous vector<string>. As efficient as it gets.
The documentation for this class was generated from the following files: