Utility class to build VariantHeader objects from scratch.
More...
#include <variant_header_builder.h>
|
| VariantHeaderBuilder () noexcept |
| initializes a variant header builder More...
|
|
| VariantHeaderBuilder (const VariantHeader &header) |
| initializes a variant header builder from a variant header using copy semantics More...
|
|
| VariantHeaderBuilder (const VariantHeaderBuilder &other)=delete |
|
VariantHeaderBuilder & | operator= (const VariantHeaderBuilder &other)=delete |
|
| VariantHeaderBuilder (VariantHeaderBuilder &&other)=default |
|
VariantHeaderBuilder & | operator= (VariantHeaderBuilder &&other)=default |
|
VariantHeaderBuilder & | add_chromosome (const std::string &id, const std::string &length="", const std::string &url="", const std::string &extra="") |
|
VariantHeaderBuilder & | add_filter (const std::string &id, const std::string &description="", const std::string &extra="") |
|
VariantHeaderBuilder & | add_shared_field (const std::string &id, const std::string &number, const std::string &type, const std::string &description="", const std::string &source="", const std::string &version="", const std::string &extra="") |
|
VariantHeaderBuilder & | add_individual_field (const std::string &id, const std::string &number, const std::string &type, const std::string &description="", const std::string &extra="") |
|
VariantHeaderBuilder & | add_sample (const std::string &sample) |
|
VariantHeaderBuilder & | add_source (const std::string &source) |
|
VariantHeaderBuilder & | advanced_add_arbitrary_line (const std::string &line) |
|
VariantHeaderBuilder & | merge (const VariantHeader &other_header) |
| merges a variant header into this builder, using bcf_hdr_combine() from htslib More...
|
|
VariantHeader | build () const |
| create a new VariantHeader by copying the contents of this builder into a new object. Allows for reuse. More...
|
|
VariantHeader | one_time_build () const |
| create a new VariantHeader by moving the contents of this builder into a new object. More efficient but does not allow for reuse. More...
|
|
Utility class to build VariantHeader objects from scratch.
gamgee::VariantHeaderBuilder::VariantHeaderBuilder |
( |
| ) |
|
|
noexcept |
initializes a variant header builder
- Note
- VariantReader and VariantWriter will take care of creating objects for reading and writing respectively if your goal is to write a VCF/BCF file to disk or stream.
- Warning
- you should only call this explicitly if you are building a VariantHeader from scratch.
gamgee::VariantHeaderBuilder::VariantHeaderBuilder |
( |
const VariantHeader & |
header | ) |
|
initializes a variant header builder from a variant header using copy semantics
- Note
- VariantReader and VariantWriter will take care of creating objects for reading and writing respectively if your goal is to write a VCF/BCF file to disk or stream.
- Parameters
-
VariantHeaderBuilder & gamgee::VariantHeaderBuilder::add_chromosome |
( |
const std::string & |
id, |
|
|
const std::string & |
length = "" , |
|
|
const std::string & |
url = "" , |
|
|
const std::string & |
extra = "" |
|
) |
| |
VariantHeaderBuilder & gamgee::VariantHeaderBuilder::add_filter |
( |
const std::string & |
id, |
|
|
const std::string & |
description = "" , |
|
|
const std::string & |
extra = "" |
|
) |
| |
VariantHeaderBuilder & gamgee::VariantHeaderBuilder::add_individual_field |
( |
const std::string & |
id, |
|
|
const std::string & |
number, |
|
|
const std::string & |
type, |
|
|
const std::string & |
description = "" , |
|
|
const std::string & |
extra = "" |
|
) |
| |
VariantHeaderBuilder & gamgee::VariantHeaderBuilder::add_shared_field |
( |
const std::string & |
id, |
|
|
const std::string & |
number, |
|
|
const std::string & |
type, |
|
|
const std::string & |
description = "" , |
|
|
const std::string & |
source = "" , |
|
|
const std::string & |
version = "" , |
|
|
const std::string & |
extra = "" |
|
) |
| |
VariantHeaderBuilder & gamgee::VariantHeaderBuilder::advanced_add_arbitrary_line |
( |
const std::string & |
line | ) |
|
create a new VariantHeader by copying the contents of this builder into a new object. Allows for reuse.
merges a variant header into this builder, using bcf_hdr_combine() from htslib
- Parameters
-
VariantHeader gamgee::VariantHeaderBuilder::one_time_build |
( |
| ) |
const |
|
inline |
create a new VariantHeader by moving the contents of this builder into a new object. More efficient but does not allow for reuse.
The documentation for this class was generated from the following files: