View source: R/plotSegregation.R
plotSegregation | R Documentation |
Plots a pedigree showing the segregation of a variant.
plotSegregation(
x,
affected = NULL,
unknown = NULL,
proband = NULL,
carriers = NULL,
homozygous = NULL,
noncarriers = NULL,
cex = 1,
margins = 1,
pos.geno = "bottom",
pos.arrow = "bottomleft",
...
)
x |
A |
affected |
The affected pedigree members. |
unknown |
Pedigree members with unknown affection status. |
proband |
The ID label of the proband. This person must also be in both
|
carriers |
A character vector (or coercible to such), containing the ID labels of pedigree members known to carry one copy of the variant in question. |
homozygous |
A character vector (or coercible to such), containing the ID labels of pedigree members known to carry two copies of the variant in question. |
noncarriers |
A character vector (or coercible to such), containing the ID labels of pedigree members known not to carry the variant in question. |
cex , margins |
Arguments passed on to |
pos.geno |
Position of genotype labels relative to pedigree symbols; either "bottom" (default), "topleft" or "topright". |
pos.arrow |
Position of the proband arrow; either "bottomleft", "bottomright", "topleft" or "topright". |
... |
Optional plot parameters passed on to |
x = nuclearPed(2)
plotSegregation(x, proband = 3, carriers = 3:4, noncarriers = 1,
aff = 3:4, unknown = 1:2)
# Same with various options
plotSegregation(x, proband = 3, carriers = 3:4, noncarriers = 1,
aff = 3:4, unknown = 1:2,
pos.geno = "topright", pos.arrow = "topleft",
labs = NULL, title = "Family 1", cex.main = 1.5)
# Recessive example
y = cousinPed(1, child = TRUE)
plotSegregation(y, affected = 9, unknown = 1:6, carrier = 7:8,
homozygous = 9, noncarriers = c(4,6), proband = 9)
# Different symbol placements
plotSegregation(y, affected = 9, unknown = 1:6, carrier = 7:8,
homozygous = 9, noncarriers = c(4,6), proband = 9,
pos.geno = "topleft", pos.arrow = "bottomright")
# Incest case
y = nuclearPed() |> addChildren(father = 3, mother = 2, nch = 3)
plotSegregation(y, proband = 4, aff = 4:6, unknown = 2, carrier = 4:6, deceased = 1,
pos.geno = "topleft", pos.arrow = "bottomright")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.