Parse VCF with bcftools.
Uses bcftools under the hood to do the heavy lifting with field splitting,
then converts the parsed character vector to a tibble.
Usage
bcftools_parse_vcf(vcf, only_pass = TRUE, alias = TRUE)
Arguments
- vcf
VCF with one or more samples.
- only_pass
Keep PASS variants only (def: TRUE).
- alias
Substitute sample names with S1/S2/... alias (def: TRUE).
Value
A tibble with all the main, FORMAT, and INFO fields detected in
the VCF header as columns.
Details
For VCFs with 0 variants, returns a tibble with 0 rows and proper number of
columns.