x = nuclearPed(3)
s = ibdsim(x, N = 1, map = uniformMap(M = 1), seed = 1729)
# Segments where some allele is shared by 3 and 4, but not 5
pattern = list(carriers = 3:4, noncarriers = 5)
findPattern(s, pattern)
# Exclude segments less than 7 cM
findPattern(s, pattern, cutoff = 7)
# Visual confirmation:
haploDraw(x, s)
Run the code above in your browser using DataLab