An R package pedigree plotter based on the kinship2 and visNetwork R packages for families affected by multiple cancer syndromes. Designed to be compatible with the BayesMendel and associated packages.
Use the latest github version by running
devtools::install_github("bayesmendel/visPed")
library(visPed)
Pass a compatible pedigree (data frame) into the function.
visPed(pedigree)
To view the pedigree as a hierarchical network, which relies on the visNetwork package, run
toVisNetwork(pedigree)
The user must specify the pedigree
argument as a data frame with the
following columns:
ID
: A numeric value; ID for each individual. There should not be any duplicated entries.Sex
: A numeric value;0
for female and1
for male. Missing entries are not currently supported.MotherID
: A numeric value; unique ID for someone’s mother.FatherID
: A numeric value; unique ID for someone’s father.isProband
: A numeric value;1
if someone is a proband,0
otherwise. This will be overridden by theproband
argument inPanelPRO
, if it is specified. At least one proband should be specified by either theisProband
column orproband
. Multiple probands are supported.CurAge
: A numeric value; the age of censoring (current age if the person is alive or age of death if the person is dead). Ages ranging from1
to94
are allowed.isAffX
: A numeric value; the affection status of cancerX
, whereX
is ashort
cancer code (see below). Affectation status should be encoded as1
if the individual was diagnosed,0
otherwise. Missing entries are not currently supported.AgeX
: A numeric value; the age of diagnosis for cancerX
, whereX
is ashort
cancer code (see below). Ages ranging from1
to94
are allowed. If the individual was not diagnosed for a given cancer, their affectation age should be encoded asNA
and will be ignored otherwise.isDead
: A numeric value;1
if someone is dead,0
otherwise. Missing entries are assumed to be0
.