View source: R/segment_count_dist.R
segment_count_dist | R Documentation |
The segment_count_dist
function computes the probability distribution
of the number of IBD segments
(i.e., the count of IBD intervals) between pairs of individuals
in a pedigree, for a given IBD state and chromosome length(s).
segment_count_dist(
pedigree,
ids = pedtools::leaves(pedigree),
states = "ibd",
ibd_state = 1L,
chromosome_length = 267.77,
convolve = TRUE
)
pedigree |
Pedigree in |
ids |
Ids for which IBD is observed. Default is |
states |
One of |
ibd_state |
Default is 1. |
chromosome_length |
Default is 267.77 cM (an estimate of the length of chromosome 1). |
convolve |
Should the distribution of the sum (across chromosomes) be obtained? |
This function is analogous to total_ibd_dist()
but focuses on
the number of IBD segments rather than the total IBD length.
object of class segment_count_dist
total_ibd_dist()
for the distribution of IBD length.
ped_hs <- pedtools::halfSibPed()
dist <- segment_count_dist(ped_hs, chromosome_length = 100)
dist
plot(dist)
E(dist)
sd(dist)
r <- r_cibd(n = 1e4, pedigree = ped_hs, chromosome_length = 100)
mean(r$stats$segment_count)
sd(r$stats$segment_count)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.