powered by
count the heterozygous sites per sample in the VCF/BCF
vcfpopgen( vcffile, region = "", samples = "-", pass = FALSE, qual = 0, fun = "heterozygosity" )
vcfpopgen a list containing the following components:
vcfpopgen
: character vector; the samples ids in the VCF file after subsetting
: integer vector; the counts of heterozygous sites of each sample in the same order as samples
samples
path to the VCF/BCF file
region to subset like bcftools
samples to subset like bcftools
restrict to variants with FILTER==PASS
restrict to variants with QUAL > qual.
which popgen function to run. available functions are "heterozygosity".
Zilong Li zilong.dk@gmail.com
library('vcfppR') vcffile <- system.file("extdata", "raw.gt.vcf.gz", package="vcfppR") res <- vcfpopgen(vcffile) str(res)
Run the code above in your browser using DataLab