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")
Run the code above in your browser using DataLab