
Enumerate IBD partitions consistent with a given relationship graph
Source:R/enumerate_IPs_RG.R
enumerate_IPs_RG.Rd
Enumerate IBD partitions consistent with a given relationship graph; see vignette("enumerate") for more details.
Arguments
- RG
A relationship graph; see
enumerate_RGs
for details.- compat
Logical, if true, a list of
partitions
equivalence objects are returned. Otherwise, returns a list of IBD partition vectors in reference to the sibling clusters.
Details
For a IBD partition to be consistent with the relationship graph given, it must satisfy the following:
genotypes within each IBD cell have clonal and sibling relationships only,
genotypes that are clones must be in the same IBD cell,
each cluster of sibling units span at most 2 IBD cells (corresponds to two parents).
Note that all IBD partitions are equally likely.
Examples
set.seed(3)
RG <- sample_RG(c(2, 1, 2))
enumerate_IPs_RG(RG)
#> [[1]]
#> [1] {g1,g4,g5}{g2,g3}
#>
#> [[2]]
#> [1] {g1}{g4,g5}{g2,g3}
#>
#> [[3]]
#> [1] {g1,g4}{g5}{g2,g3}
#>
#> [[4]]
#> [1] {g1,g5}{g4}{g2,g3}
#>
#> [[5]]
#> [1] {g1,g4,g5}{g2}{g3}
#>
#> [[6]]
#> [1] {g1}{g4,g5}{g2}{g3}
#>
#> [[7]]
#> [1] {g1,g4}{g5}{g2}{g3}
#>
#> [[8]]
#> [1] {g1,g5}{g4}{g2}{g3}
#>