# NOT RUN {
op = par(no.readonly = TRUE)
###############################
# Example 1: A family quartet #
###############################
x = nuclearPed(2)
als = list(1:2, 3:4, c(1,3), c(2,3))
# Default options
ibdDraw(x, als)
# Nicer colors
cols = c(7, 3, 2, 4)
ibdDraw(x, als, cols = cols)
# Inside the pedigree symbols
ibdDraw(x, als, cols = cols, pos = 0, symbolsize = 2.5)
# Other placements (margins depend on device - may need adjustment)
ibdDraw(x, als, cols = cols, pos = c(2, 4, 1, 1),
margin = c(2, 6, 2, 6))
# Letters instead of points
ibdDraw(x, als, cols = cols, symbol = "text", cex = 2)
# Further arguments (note that `col` is an argument of `ped.plot()`)
ibdDraw(x, als, cols = cols, pos = 0, symbolsize = 2,
labs = TRUE, shaded = 3:4, col = "blue")
# Mutations are warned about (unless `checkParents = FALSE`)
ibdDraw(x, alleles = list(1:2, 3:4, 5, 6))
############################
# Example 2: X inheritance #
############################
x = nuclearPed(2, sex = c(1, 2))
als = list(1, 2:3, 3, c(1, 3))
ibdDraw(x, als, cols = c(3, 7, 2))
#################################
# Example 3: mtDNA inheritance #
#################################
x = linearPed(2, sex = 2)
als = list(1, 2, 2, 3, 2)
ibdDraw(x, als, cols = 2:4)
# Restore graphics parameters
par(op)
# }
Run the code above in your browser using DataLab