###############################
# Example 1: A family quartet #
###############################
x = nuclearPed(2)
map = uniformMap(M = 1)
s = ibdsim(x, map = map, seed = 4276)
haploDraw(x, s)
# Custom colours and placements
haploDraw(x, s, cols = c(3,7,2,4), pos = c(2,4,2,4))
# Standard plot options apply
haploDraw(x, s, margins = 3, cex = 1.5, title = "Full sibs")
###########################
# Example 2: Autozygosity #
###########################
x = halfCousinPed(0, child = TRUE)
map = uniformMap(M = 1)
s = ibdsim(x, map = map, skipRecomb = c(1,3), seed = 2)
# Only include relevant individuals (skip 1 and 3)
haploDraw(x, s, ids = c(2,4,5,6), pos = c(1,2,4,4))
###############################
# Example 3: X-chromosomal sims
###############################
x = nuclearPed(2, sex = 2:1)
s = ibdsim(x, N = 1, map = uniformMap(M = 1, chrom = "X"), seed = 123)
haploDraw(x, s)
Run the code above in your browser using DataLab