count the heterozygous sites per sample in the VCF/BCF
Usage
vcfpopgen(
vcffile,
region = "",
samples = "-",
pass = FALSE,
qual = 0,
fun = "heterozygosity"
)
Value
vcfpopgen
a list containing the following components:
- samples
: character vector;
the samples ids in the VCF file after subsetting- hets
: integer vector;
the counts of heterozygous sites of each sample in the same order assamples
Author
Zilong Li zilong.dk@gmail.com
Examples
library('vcfppR')
vcffile <- system.file("extdata", "raw.gt.vcf.gz", package="vcfppR")
res <- vcfpopgen(vcffile)
str(res)