Description Usage Arguments Details Value Examples
Find segments satisfying a particular pattern of IBD sharing, in a list of IBD simulations
1 | findPattern(sims, pattern)
|
sims |
A |
pattern |
A list of two vectors names |
For each simulation, this function extracts the subset of rows satisfying the
allele sharing specified by pattern
. That is, segments where some allele
occur in all of pattern$carriers
, but in none of pattern$noncarriers
.
A matrix (if sims
is a single genomeSim
object), or a list of
matrices.
1 2 3 4 5 6 7 8 9 10 | x = nuclearPed(3)
s = ibdsim(x, N = 1, map = uniformMap(M = 1), seed = 1729)
s1 = s[[1]]
# Segments where some allele is shared by 3 and 4, but not 5
pattern = list(carriers = 3:4, noncarriers = 5)
findPattern(s1, pattern)
# Visual confirmation:
haploDraw(x, s1, margin = c(5,3,3,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.