readVCF: Read a vcf file, with options to filter out low or high...

Description Usage Arguments Value Examples

View source: R/readvcf.R

Description

Read a vcf file, with options to filter out low or high frequency markers.

Usage

1
2
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

1
2
3
4
5
6
7
8
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))

adimitromanolakis/sim1000G documentation built on Sept. 29, 2021, 3:44 a.m.