computePairIBD1: Computes pairwise IBD1 for a specific pair of individuals....

Description Usage Arguments Value Examples

View source: R/simulation.R

Description

Computes pairwise IBD1 for a specific pair of individuals. See function computePairIBD12 for description.

Usage

1

Arguments

i

Index of first individual

j

Index of second individual

Value

Mean IBD1 as computed from shared haplotypes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library("sim1000G")

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

# For realistic data use the function downloadGeneticMap
generateUniformGeneticMap()

startSimulation(vcf, totalNumberOfIndividuals = 200)

ped1 = newNuclearFamily(1)

v = computePairIBD1(1, 3)

cat("IBD1 of pair = ", v, "\n");

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