findPattern | R Documentation |

Find segments satisfying a particular pattern of IBD sharing, in a list of IBD simulations.

findPattern(sims, pattern, merge = TRUE, cutoff = 0)

`sims` |
A |

`pattern` |
A named list of vectors containing ID labels. Allowed names
are |

`merge` |
A logical, indicating if adjacent segments should be merged. Default: TRUE. |

`cutoff` |
A non-negative number. Segments shorter than this are excluded from the output. Default: 0. |

For each simulation, this function extracts the subset of rows satisfying the
allele sharing specified by `pattern`

. That is, segments where, for some allele,

all of

`pattern$autozygous`

are autozygousall of

`pattern$heterozygous`

have exactly one copyall of

`pattern$carriers`

have at least one copynone of

`pattern$noncarriers`

carry the allele.

A matrix (if `sims`

is a single `genomeSim`

object), or a list of
matrices.

`segmentStats()`

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) # Exclude segments less than 7 cM findPattern(s1, pattern, cutoff = 7) # Visual confirmation: haploDraw(x, s1, margin = c(5,3,3,3))

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.