A library for working with phylogenetic data.
vcf_common.hpp File Reference
#include <cstdint>
#include <string>
#include <vector>

Go to the source code of this file.


class  VcfGenotype
 Simple wrapper class for one genotype field for a sample. More...
struct  VcfSpecification
 Collect the four required keys that describe an INFO or FORMAT sub-field of VCF/BCF files. More...


 Container namespace for all symbols of genesis in order to keep them separate when used as a library.


enum  VcfHeaderLine : int {
  kFilter = 0, kInfo = 1, kFormat = 2, kContig = 3,
  kStructured = 4, kGeneric = 5
 Specification for the values determining header line types of VCF/BCF files. More...
enum  VcfValueSpecial : int {
  kFixed = 0, kVariable = 1, kAllele = 2, kGenotype = 3,
  kReference = 4
 Specification for special markers for the number of values expected for key-value-pairs of VCF/BCF files. More...
enum  VcfValueType : int { kFlag = 0, kInteger = 1, kFloat = 2, kString = 3 }
 Specification for the data type of the values expected in key-value-pairs of VCF/BCF files. More...


std::string vcf_genotype_string (std::vector< VcfGenotype > const &genotypes)
 Return the VCF-like string representation of a set of VcfGenotype entries. More...
size_t vcf_genotype_sum (std::vector< VcfGenotype > const &genotypes)
 Return the sum of genotypes for a set of VcfGenotype entries, typically used to construct a genotype matrix with entries 0,1,2. More...
std::string vcf_hl_type_to_string (int hl_type)
 Internal helper function to convert htslib-internal BCF_HL_* header line type values to their string representation as used in the VCF header ("FILTER", "INFO", "FORMAT", etc). More...
std::string vcf_value_special_to_string (int vl_type_num)
std::string vcf_value_special_to_string (VcfValueSpecial vl_type_num)
std::string vcf_value_type_to_string (int ht_type)
std::string vcf_value_type_to_string (VcfValueType ht_type)