Stream in variants from compressed/uncompressed VCF/BCF file or stdin.
More...
#include <vcfpp.h>
Stream in variants from compressed/uncompressed VCF/BCF file or stdin.
◆ BcfReader() [1/3]
vcfpp::BcfReader::BcfReader |
( |
const std::string & |
file | ) |
|
|
inline |
construct a vcf/bcf reader from file.
- Parameters
-
file | the input vcf/bcf with suffix vcf(.gz)/bcf(.gz) or stdin "-" |
◆ BcfReader() [2/3]
vcfpp::BcfReader::BcfReader |
( |
const std::string & |
file, |
|
|
const std::string & |
region |
|
) |
| |
|
inline |
construct a vcf/bcf reader with subset samples
- Parameters
-
file | the input vcf/bcf with suffix vcf(.gz)/bcf(.gz) or stdin "-" |
region | samtools-like region "chr:start-end", skip if empty |
◆ BcfReader() [3/3]
vcfpp::BcfReader::BcfReader |
( |
const std::string & |
file, |
|
|
const std::string & |
region, |
|
|
const std::string & |
samples |
|
) |
| |
|
inline |
construct a vcf/bcf reader with subset samples in target region
- Parameters
-
file | the input vcf/bcf with suffix vcf(.gz) or bcf(.gz) |
region | samtools-like region "chr:start-end", skip if empty |
samples | LIST samples to include or exclude as a comma-separated string.
LIST : select samples in list
^LIST : exclude samples from list
"-" : include all samples
"" : exclude all samples |
◆ getNextVariant()
bool vcfpp::BcfReader::getNextVariant |
( |
BcfRecord & |
r | ) |
|
|
inline |
read in the next variant
- Parameters
-
◆ setRegion()
void vcfpp::BcfReader::setRegion |
( |
const std::string & |
region | ) |
|
|
inline |
explicitly stream to specific region
- Parameters
-
region | the string is samtools-like format which is chr:start-end |
◆ setSamples()
void vcfpp::BcfReader::setSamples |
( |
const std::string & |
samples | ) |
|
|
inline |
explicitly stream to specific samples
- Parameters
-
samples | the string is bcftools-like format, which is comma separated list of samples to include (or exclude with "^" prefix). |
The documentation for this class was generated from the following file: