Learn R Programming

sim1000G (version 1.3)

startSimulation: Start the simulation

Description

Start the simulation

Usage

startSimulation(vcf, totalNumberOfIndividuals = 250, randomdata = 0)

Arguments

vcf

Input vcf file of a region (can be .gz). Must contain phased data.

totalNumberOfIndividuals

Maximum Number of individuals that will ever be generated

randomdata

If 1, disregards the genotypes in the vcf file and generates markers that are not in LD. Generally do not use.

Examples

Run this code
# NOT RUN {
library("sim1000G")
library(gplots)

examples_dir = system.file("examples", package = "sim1000G")
vcf_file = sprintf("%s/region.vcf.gz", examples_dir)
vcf = readVCF( vcf_file, maxNumberOfVariants = 100 , min_maf = 0.12 ,max_maf = NA)

# For a realistic genetic map, use the functions downloadGeneticMap / readGeneticMap
generateFakeGeneticMap()

plotRegionalGeneticMap(vcf$vcf[,2]+1)

startSimulation(vcf, totalNumberOfIndividuals = 200)

# }

Run the code above in your browser using DataLab