Skip to contents

Pedigree-drawing with graphviz

Usage

pedtodot_verbatim(f, run = FALSE)

Arguments

f

A data.frame containing pedigrees, each with pedigree id, individual id, father id, mother id, sex and affection status.

run

A flag to run dot/neato on the generated .dot file(s).

Value

No value is returned but outputs in .dot, .pdf, and .svg.

Details

Read a GAS or LINKAGE format pedigree, return a digraph in the dot language and optionally call dot/neato to make pedigree drawing.

This is a verbatim translation of the original pedtodot implemneted in Bash/awk in contrast to pedtodot which was largely a mirror. To check independently, try xsel -i < <(cat pedtodot_verbatim.R) or cat pedtodot_verbatim.R | xsel -i and paste into an R session.

Note

Adapted from Bash/awk script by David Duffy

Examples

if (FALSE) { # \dontrun{
# pedigree p3 in pedtodot / toDOT=TRUE
  pedtodot_verbatim(p3,run=TRUE)
} # }