Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
gamgee::VariantHeaderBuilder Class Reference

Utility class to build VariantHeader objects from scratch. More...

#include <variant_header_builder.h>

Public Member Functions

 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
 
VariantHeaderBuilderoperator= (const VariantHeaderBuilder &other)=delete
 
 VariantHeaderBuilder (VariantHeaderBuilder &&other)=default
 
VariantHeaderBuilderoperator= (VariantHeaderBuilder &&other)=default
 
VariantHeaderBuilderadd_chromosome (const std::string &id, const std::string &length="", const std::string &url="", const std::string &extra="")
 
VariantHeaderBuilderadd_filter (const std::string &id, const std::string &description="", const std::string &extra="")
 
VariantHeaderBuilderadd_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="")
 
VariantHeaderBuilderadd_individual_field (const std::string &id, const std::string &number, const std::string &type, const std::string &description="", const std::string &extra="")
 
VariantHeaderBuilderadd_sample (const std::string &sample)
 
VariantHeaderBuilderadd_source (const std::string &source)
 
VariantHeaderBuilderadvanced_add_arbitrary_line (const std::string &line)
 
VariantHeaderBuildermerge (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...
 

Detailed Description

Utility class to build VariantHeader objects from scratch.

Constructor & Destructor Documentation

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
headerthe VariantHeader to use as a source for this builder
gamgee::VariantHeaderBuilder::VariantHeaderBuilder ( const VariantHeaderBuilder other)
delete
gamgee::VariantHeaderBuilder::VariantHeaderBuilder ( VariantHeaderBuilder &&  other)
default

Member Function Documentation

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_sample ( const std::string &  sample)
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::add_source ( const std::string &  source)
VariantHeaderBuilder & gamgee::VariantHeaderBuilder::advanced_add_arbitrary_line ( const std::string &  line)
VariantHeader gamgee::VariantHeaderBuilder::build ( ) const
inline

create a new VariantHeader by copying the contents of this builder into a new object. Allows for reuse.

VariantHeaderBuilder & gamgee::VariantHeaderBuilder::merge ( const VariantHeader other_header)

merges a variant header into this builder, using bcf_hdr_combine() from htslib

Parameters
headerthe VariantHeader to merge into this builder
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.

VariantHeaderBuilder& gamgee::VariantHeaderBuilder::operator= ( const VariantHeaderBuilder other)
delete
VariantHeaderBuilder& gamgee::VariantHeaderBuilder::operator= ( VariantHeaderBuilder &&  other)
default

The documentation for this class was generated from the following files: