subsetVCF: Generate a market subset of a vcf file

Description Usage Arguments Value Examples

Description

Generate a market subset of a vcf file

Usage

1
subsetVCF(vcf, var_index = NA, var_id = NA, individual_id = NA)

Arguments

vcf

VCF data as created by function readVCF

var_index

index of number to subset. Should be in the range 1..length(vcf$varid)

var_id

id of markers to subset. Should be a selection from vcf$varid. NA if no filtering on id to be performed.

individual_id

IDs of individuals to subset. Should be a selection from vcf$individual_id

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)

vcf2 = subsetVCF(vcf, var_index = 1:50)

sim1000G documentation built on June 10, 2019, 1:01 a.m.