buildPeds | R Documentation |
Build all pedigrees between a set of individuals, subject to given restrictions.
buildPeds(
labs,
sex = 1,
extra = "parents",
age = NULL,
knownPO = NULL,
knownSub = NULL,
allKnown = FALSE,
notPO = NULL,
noChildren = NULL,
connected = TRUE,
maxInbreeding = 1/16,
linearInb = FALSE,
sexSymmetry = TRUE,
verbose = TRUE
)
labs |
A character vector of ID labels. |
sex |
A vector of the same length as |
extra |
Either the word "parents" (default), or a non-negative integer. See Details. |
age |
A numeric or character vector. If numeric, and |
knownPO |
A list of vectors of length 2, containing the ID labels of
pairs known to be parent-offspring. By default, both directions are
considered; use |
knownSub |
A |
allKnown |
A logical. If TRUE, no other pairs than |
notPO |
A list of vectors of length 2, containing the ID labels of pairs known not to be parent-offspring. |
noChildren |
A vector of ID labels, indicating individuals without children of their own. |
connected |
A logical. If TRUE (default), only connected pedigrees are returned. |
maxInbreeding |
A single numeric indicating the highest permitted inbreeding coefficient. Default: 1/16 (as with first-cousin parents.) |
linearInb |
A parameter controlling the maximum separation of linearly
related spouses. Either TRUE (allow all linear inbreeding), FALSE (disallow
all) or a non-negative integer. For example, |
sexSymmetry |
A logical. If TRUE (default), pedigrees which are equal except for the gender distribution of the added parents, are regarded as equivalent, and only one of each equivalence class is returned. Example: paternal vs. maternal half sibs. |
verbose |
A logical. |
The parameter extra
controls which of two algorithms are used to create the
pedigree list.
If extra
is a nonnegative integer, it determines the number of extra
individuals allowed in the iterative pedigree construction. These extras
start off with undetermined sex, meaning that both males and females are
used. It should be noted that the final pedigrees may contain additional
extras, since missing parents are added at the end.
If extra
is the word "parents", the algorithm is not iterative. It first
generates all directed acyclic graphs between the original individuals. Then
their parents are added and merged in all possible ways. This option has the
advantage of not requiring an explicit/ad hoc number of "extras", but works
best in smaller cases.
A list of (possibly disconnected) pedigrees.
# Two individuals + 1 extra
plist = buildPeds(1:2, extra = 1, age = "1>2")
plot(plist)
# Allow disconnected
plist2 = buildPeds(1:2, extra = 1, age = "1>2", connected = FALSE)
plot(plist2, frames = TRUE)
# Note that full sibs require 2 extras
plist3 = buildPeds(1:2, extra = 2, age = "1>2")
plot(plist3)
# With 2 extras, allowing any inbreeding
plist4 = buildPeds(1:2, extra = 2, age = "1>2", maxInbreeding = 1)
plot(plist4)
# Full sibs are also included when `extra = "parents"`
plist5 = buildPeds(1:2, extra = "parents", age = "1>2")
plot(plist5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.