Class for vcf file.
More...
#include <ppvcf.hpp>
Class for vcf file.
VCF file.
◆ VCF()
VCF::VCF |
( |
char * |
vcf_path, |
|
|
const int |
n_threads_, |
|
|
const int |
block_size_ |
|
) |
| |
|
inline |
Constructor
- Parameters
-
vcf_path | is the path to the input vcf file |
n_threads_ | is the number of threads to use |
block_size_ | is the number of variants to read at each iteration |
◆ ~VCF()
◆ extract_genotype()
tuple<uint8_t, uint8_t, bool> VCF::extract_genotype |
( |
char * |
start | ) |
|
|
inlineprivate |
Extracts information from a cstring representing a genotype
- Parameters
-
- Returns
- a tuple containing the first allele, the second allele, and the phased flag
◆ fill_genotypes()
void VCF::fill_genotypes |
( |
| ) |
|
|
inlineprivate |
Extracts and store the genotypes of all the variants read in the last iteration
◆ fill_variant()
void VCF::fill_variant |
( |
const uint32_t |
var_idx | ) |
|
|
inlineprivate |
Extracts and stores the genotype fields associated to the {var_idx}-th variant read in the last iteration
- Parameters
-
◆ get_samples()
char* VCF::get_samples |
( |
char *const |
fmt_line, |
|
|
const size_t |
len |
|
) |
| |
|
inlineprivate |
Extract the genotype information from a vcf line
- Parameters
-
fmt_line | is a line of the input vcf file |
len | is the length of fmt_line |
- Returns
- a cstring representing the genotypes information
◆ get_variants()
vector<Variant> VCF::get_variants |
( |
| ) |
const |
|
inline |
- Returns
- the variants read in the last iteration
◆ parse()
Parse block_size lines from the input vcf file
- Returns
- false if less than block_size lines have been read (due to EOF), true otherwise.
The documentation for this class was generated from the following file: