Description Usage Arguments Examples
Starts and initializes the data structures required for a simulation. A VCF file should be read beforehand with the function readVCF.
| 1 2 | startSimulation(vcf, totalNumberOfIndividuals = 2000, subset = NA,
  randomdata = 0, typeOfGeneticMap = "download")
 | 
| vcf | Input vcf file of a region (can be .gz). Must contain phased data. | 
| totalNumberOfIndividuals | Maximum Number of individuals to allocate memory for. Set it above the number of individuals you want to simulate. | 
| subset | A subset of individual IDs to use for simulation | 
| randomdata | If 1, disregards the genotypes in the vcf file and generates independent markers that are not in LD. | 
| typeOfGeneticMap | Specify whether to download a genetic map for this chromosome | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library("sim1000G")
library(gplots)
examples_dir = system.file("examples", package = "sim1000G")
vcf_file = file.path(examples_dir, "region.vcf.gz")
vcf = readVCF( vcf_file, maxNumberOfVariants = 100)
genetic_map_of_region = system.file(
   "examples",
   "chr4-geneticmap.txt",
   package = "sim1000G"
)
readGeneticMapFromFile(genetic_map_of_region)
pdf(file=tempfile())
plotRegionalGeneticMap(vcf$vcf[,2]+1)
dev.off()
startSimulation(vcf, totalNumberOfIndividuals = 200)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.