###
# The following example computes the probability of
# no IBD sharing between a pair of fourth cousins.
# We also show how the probability is affected by
# truncation, i.e., ignoring short segments.
###
# Define the pedigree
x = cousinPed(4)
cous = leaves(x)
# Simulate (increase N!)
s = ibdsim(x, N = 10)
# Probability of zero ibd segments. (By default all segs are used)
zeroIBD(s, ids = cous)
# Re-compute with nonzero threshold
zeroIBD(s, ids = cous, threshold = 1, unit = "cm")
zeroIBD(s, ids = cous, threshold = 1, unit = "mb")
Run the code above in your browser using DataLab