Learn R Programming

sim1000G (version 1.3)

newFamily3generations: Generates genotype data for a family of 3 generations

Description

Generates genotype data for a family of 3 generations

Usage

newFamily3generations(familyid, noffspring2 = 2, noffspring3 = c(1, 1))

Arguments

familyid

What will be the family_id (for example: 100)

noffspring2

Number of offspring in generation 2

noffspring3

Number of offspring in generation 3 (vector of length noffspring2)

Value

family structure object

Examples

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

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 realistic data use the functions downloadGeneticMap / readGeneticMap
generateFakeGeneticMap()

startSimulation(vcf, totalNumberOfIndividuals = 200)

ped_line = newFamily3generations(12, 3, c(3,3,2) )

# }

Run the code above in your browser using DataLab