Learn R Programming

sim1000G (version 1.3)

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

Description

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

Usage

computePairIBD1(i, j)

Arguments

i

Index of first individual

j

Index of second individual

Value

Mean IBD1 as computed from shared haplotypes

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)

ped1 = newNuclearFamily(1)

v = computePairIBD1(1, 3)

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

# }

Run the code above in your browser using DataLab