given region coordinates, the function extracts genotypes for all loci in the region, computes minor allele frequency for each marker and returns the number of loci with maf <= threshold and the number of loci maf > threshold.

count_by_maf(regions, vcf_file, maf_threshold = 0.01)

Arguments

regions

list of regions as returned by the read_regions_bed function

vcf_file

path to vcf file containing genotypes

maf_threshold

maf threshold for counting loci

Value

a tibble with region name, total count of loci, count of loci above and below the maf threshold

Author

Marcin Kierczak <marcin.kierczak@scilifelab.se>