1 #ifndef gamgee__variant_filters__guard
2 #define gamgee__variant_filters__guard
6 #include "../utils/hts_memory.h"
30 explicit VariantFilters(
const std::shared_ptr<bcf_hdr_t>& header,
const std::shared_ptr<bcf1_t>& body) : m_header {header}, m_body {body} {}
41 uint32_t
size()
const {
return uint32_t(m_body->d.n_flt); }
59 std::shared_ptr<bcf_hdr_t> m_header;
60 std::shared_ptr<bcf1_t> m_body;
67 #endif // gamgee__variant_filters__guard
uint32_t size() const
returns the number of filters in the filter field
Definition: variant_filters.h:41
simple random-access iterator class for VariantFilters objects
Definition: variant_filters_iterator.h:18
VariantFilters(const std::shared_ptr< bcf_hdr_t > &header, const std::shared_ptr< bcf1_t > &body)
standard constructor used by the Variant API
Definition: variant_filters.h:30
std::string operator[](int index) const
random access operator
Definition: variant_filters.h:36
VariantFiltersIterator begin() const
returns an iterator pointing to the first element in the list of filters.
Definition: variant_filters.h:51
Definition: exceptions.h:9
class to manipulate filter field objects without making copies.
Definition: variant_filters.h:23
std::string htslib_filter_name(bcf_hdr_t *header, bcf1_t *body, int index)
helper function to translate an index into a string in the filter list
Definition: hts_memory.cpp:144
VariantFiltersIterator end() const
Returns an iterator referring to one-past-the-last element in the list of filters.
Definition: variant_filters.h:56
bool missing() const
returns true if the filters field is missing
Definition: variant_filters.h:46