Learn R Programming

paramlink (version 0.8-3)

plot.linkdat: Plot pedigrees with genotypes

Description

This is the main function for pedigree plotting, with many options for controlling the appearence of pedigree symbols, labels and marker genotypes.

Usage

## S3 method for class 'linkdat':
plot(x, marker = NULL, alleles = NULL, sep = "/", missing = "-", 
                       id.labels = x$orig.ids, title = paste("Family", x$famid), 
                       available = FALSE, col = 1, deceased = numeric(0), 
                       starred = numeric(0), aff2 = NULL, margins = c(4.1, 1, 4.1, 1), ...)
## S3 method for class 'singleton':
plot(x, marker = NULL, alleles = NULL, sep = "/", missing = "-", 
                       id.labels = x$orig.ids, title = paste("Family", x$famid), 
                       available = FALSE, col = 1, starred = numeric(0), margins = c(4.1, 1, 4.1, 1),
                       symbolsize=4, offset=0.5+0.2*symbolsize, textsize=1, ...)

Arguments

x
a linkdat object.
marker
either NULL, a vector of positive integers, a marker object, or a list of marker objects. If NULL, no genotypes are plotted. If a marker object (or a list of such), the genotypes
alleles
a character vector with allele names.
sep
a character of length 1 separating alleles for diploid markers.
missing
the symbol (integer or character) for missing alleles.
id.labels
a vector with labels/names of the pedigree members.
title
the plot title. If NULL or "", no title is added to the plot.
available
if TRUE, the available individuals are drawn in red.
col
a vector with color indicators for the pedigree members. Recycled if necessary. By default everyone is drawn black.
deceased
a numeric containing ID's of deceased pedigree members. (Not implemented for singletons.)
starred
a numeric containing ID's of pedigree members that should be marked with a star in the pedigree plot.
aff2
NULL, or a numeric with affection statuses (2=affected, 1=unaffected, 0=unknown) for a second trait. (Not implemented for singletons.)
margins
a numeric of length 4 indicating the plot margins.
symbolsize
numeric controlling the size of pedigree symbols (squares for males, circles for females). NB: This works differently in plot.linkdat and plot.singleton.
offset
a numeric controlling the vertical distance between the symbol and text label in singleton plots.
textsize
a numeric controlling the text label size in singleton plots.
...
in plot.linkdat: Arguments passed on to plot.pedigree in the kinship2 package. In particular symbolsize and cex can be useful.

Details

The main plotting is done by plot.pedigree in the package kinship2 package.

See Also

plot.pedigree

Examples

Run this code
data(toyped)
x = linkdat(toyped)
plot(x, marker=1, alleles=c("a1","a2"), sep="| ", deceased=2)

y = singleton(id=1) 
m = marker(y, 1, c('A',0), alleles=c('A','B'))
plot(y, marker=m, id="indiv 1", title="Singleton", available=TRUE)

Run the code above in your browser using DataLab