readVCF {sim1000G} | R Documentation |
Read a vcf file, with options to filter out low or high frequency markers.
Description
Read a vcf file, with options to filter out low or high frequency markers.
Usage
readVCF(filename = "data.vcf", thin = NA, maxNumberOfVariants = 400,
min_maf = 0.02, max_maf = NA, region_start = NA, region_end = NA)
Arguments
filename |
Input VCF file |
thin |
How much to thin markers |
maxNumberOfVariants |
Maximum number of variants to keep from region |
min_maf |
Minimum allele frequency of markers to keep. If NA skip min_maf filtering. |
max_maf |
Maximum allele frequency of markers to keep. If NA skip max_maf filtering. |
region_start |
Extract a region from a vcf files with this starting basepair position |
region_end |
Extract a region from a vcf files with this ending basepair position |
Value
VCF object to be used by startSimulation function.
Examples
examples_dir = system.file("examples", package = "sim1000G")
vcf_file = file.path(examples_dir,
"region-chr4-93-TMEM156.vcf.gz")
vcf = readVCF( vcf_file, maxNumberOfVariants = 500 ,
min_maf = 0.02 ,max_maf = NA)
str(as.list(vcf))
[Package sim1000G version 1.40 Index]