plotSegregation: Pedigree plot for segregation analysis

View source: R/plotSegregation.R

plotSegregationR Documentation

Pedigree plot for segregation analysis

Description

Plots a pedigree showing the segregation of a variant.

Usage

plotSegregation(
  x,
  affected = NULL,
  unknown = NULL,
  proband = NULL,
  carriers = NULL,
  homozygous = NULL,
  noncarriers = NULL,
  cex = 1,
  margins = 1,
  pos.geno = "bottom",
  pos.arrow = "bottomleft",
  ...
)

Arguments

x

A pedtools::ped() object.

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 and affected.

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 pedtools::plot.ped().

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 pedtools::plot.ped().

Examples


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")


segregatr documentation built on July 9, 2023, 7:24 p.m.