1 #ifndef gamgee__variant_header__guard
2 #define gamgee__variant_header__guard
6 #include "../missing.h"
14 template<
bool fields_forward_LUT_ordering,
bool fields_reverse_LUT_ordering,
bool samples_forward_LUT_ordering,
bool samples_reverse_LUT_ordering>
15 class VariantHeaderMerger;
55 explicit VariantHeader(
const std::shared_ptr<bcf_hdr_t>& header) : m_header{header} {}
71 std::vector<std::string>
samples()
const;
91 std::vector<std::string>
filters()
const;
125 uint8_t
field_type(
const int32_t index,
const int32_t field_category)
const {
return bcf_hdr_id2type(m_header.get(), field_category, index); }
191 return field_index >= 0 &&
207 return sample_index >= 0 &&
235 if(field_idx >= 0 && field_idx < m_header->n[
BCF_DT_ID])
245 if(sample_idx >= 0 && sample_idx < m_header->n[
BCF_DT_SAMPLE])
255 std::shared_ptr<bcf_hdr_t> m_header;
263 template<
bool fields_forward_LUT_ordering,
bool fields_reverse_LUT_ordering,
bool samples_forward_LUT_ordering,
bool samples_reverse_LUT_ordering>
269 #endif // gamgee__variant_header__guard
#define bcf_hdr_id2number(hdr, type, int_id)
Definition: vcf.h:698
#define BCF_HL_FLT
Definition: vcf.h:46
#define BCF_HL_INFO
Definition: vcf.h:47
#define BCF_DT_ID
Definition: vcf.h:76
#define bcf_hdr_int2id(hdr, type, int_id)
Definition: vcf.h:673
int bcf_hdr_id2int(const bcf_hdr_t *hdr, int type, const char *id)
Definition: vcf.c:2145
Helper class for VariantBuilder to manage the fields belonging to the shared region of Variant record...
Definition: variant_builder_shared_region.h:56
constexpr auto int32
missing value for an int32
Definition: missing.h:18
utility class to write out a VCF/BCF file to any stream
Definition: variant_writer.h:21
#define BCF_DT_SAMPLE
Definition: vcf.h:78
VariantBuilder: construct Variant records from scratch (and, coming soon, from existing Variant recor...
Definition: variant_builder.h:164
#define bcf_hdr_id2length(hdr, type, int_id)
Definition: vcf.h:697
#define bcf_hdr_id2type(hdr, type, int_id)
Definition: vcf.h:699
#define BCF_HL_FMT
Definition: vcf.h:48
Definition: exceptions.h:9
Helper class for VariantBuilder to manage the fields belonging to the individual region of Variant re...
Definition: variant_builder_individual_region.h:23
Utility class to manipulate a Variant record.
Definition: variant.h:29
#define bcf_hdr_nsamples(hdr)
Definition: vcf.h:433