|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_POPULATION_FORMAT_VCF_COMMON_H_
2 #define GENESIS_POPULATION_FORMAT_VCF_COMMON_H_
50 namespace population {
228 bool use_allelic_depth =
false
337 : genotype_(genotype)
397 int32_t
data()
const;
411 #endif // htslib guard
412 #endif // include guard
bool is_reference() const
True iff the called variant of this genotype is the REF allele.
Simple wrapper class for one genotype field for a sample.
bool is_missing() const
True iff the variant call is missing for this genotype.
int32_t variant_index() const
Return the index of the variant set for this genotype call.
bool is_phased() const
True iff the called variant is phased.
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 ...
int32_t data() const
Return the raw genotype value as used by htslib.
GenomeRegionList genome_region_list_from_vcf_file(std::string const &file)
Read a VCF file, and use its positions to create a GenomeRegionList.
List of positions/coordinates in a genome, for each chromosome.
VcfHeaderLine
Specification for the values determining header line types of VCF/BCF files.
VcfValueSpecial
Specification for special markers for the number of values expected for key-value-pairs of VCF/BCF fi...
@ kVariable
Variable number of possible values, or unknown, or unbounded. In VCF, this is denoted by '....
Collect the four required keys that describe an INFO or FORMAT sub-field of VCF/BCF files.
VcfGenotype(int32_t genotype)
List of regions in a genome, for each chromosome.
Variant convert_to_variant_as_individuals(VcfRecord const &record, bool use_allelic_depth)
Convert a VcfRecord to a Variant, treating each sample as an individual, and combining them all into ...
GenomeLocusSet genome_locus_set_from_vcf_file(std::string const &file)
Read a VCF file, and use its positions to create a GenomeLocusSet.
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 ...
@ kFixed
Fixed number of values expected. In VCF, this is denoted simply by an integer number.
A single variant at a position in a chromosome, along with SampleCounts for a set of samples.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
VcfGenotype & operator=(VcfGenotype const &)=default
std::string vcf_value_special_to_string(VcfValueSpecial vl_type_num)
std::string vcf_genotype_string(std::vector< VcfGenotype > const &genotypes)
Return the VCF-like string representation of a set of VcfGenotype entries.
bool is_alternative() const
True iff the called variant of this genotype is not the REF, but one of the ALT alleles.
VcfValueType
Specification for the data type of the values expected in key-value-pairs of VCF/BCF files.
Capture the information of a single SNP/variant line in a VCF/BCF file.
std::string vcf_value_type_to_string(VcfValueType ht_type)
Variant convert_to_variant_as_pool(VcfRecord const &record)
Convert a VcfRecord to a Variant, treating each sample column as a pool of individuals.