Learn R Programming

ggenealogy

Motivation:

Genealogists wish to study the parent-child relationship between groups of organisms. Visual representations of genealogical relationships allow scientists to more effectively understand the historical changes that caused novel and desirable traits to arise in lineages. For example, in crops, desirable modifications could include an increase in protein yield or an increase in disease resistance. However, there are also times when lineages of detrimental traits can be viewed, such as to determine the origin of hazardous traits in rapidly-evolving viruses.

While there are visual methods available for genealogical data structures, there is a need for additional development of tools that are more customized to particular needs that arise when scientists want to make informed decisions while visualizing their data.

Description:

This package provides methods for searching through genealogical data and displaying the results. The available plotting algorithms can assist users in performing data exploration, as well as in generating publication-quality images. This package uses the Grammar of Graphics.

Some of the currently-available methods include:

  • Drawing genealogy trees from database of known lineage.
  • Selecting generation number of ancestors and descendants to show around a given variety.
  • Showing shortest path between two given varieties, and superimpose over full lineage structure.
  • Obtaining graph theory measures of the full lineage structure.
  • Producing color matrix plots of variables between a subset of varieties.
  • Interactively visualizing genealogical structure
  • Perform basic parsing and calculations on descendant branches of interest

Installation:

  • The latest released version: install.packages("ggenealogy")
  • The latest development version: install_github("lindsayrutter/ggenealogy")

Vignette:

Installation of the package will automatically download a vignette, which contains a more thorough explanation of the available methods, and example code.

Paper citation:

A software paper describing the ggenealogy package is available in the Journal of Statistical Software here.

@article{rutter2019ggenealogy,
  title={ggenealogy: An R Package for Visualizing Genealogical Data},
  author={Rutter, Lindsay and VanderPlas, Susan and Cook, Dianne and Graham, Michelle A},
  journal={Journal of Statistical Software},
  volume={89},
  number={1},
  pages={1--31},
  year={2019}
}

License:

GPL

Copy Link

Version

Install

install.packages('ggenealogy')

Monthly Downloads

266

Version

1.0.3

License

GPL

Maintainer

Last Published

February 21st, 2024

Functions in ggenealogy (1.0.3)

getVariable

Determine the date of a variety
isParent

Determine if a variety is a parent of another
isChild

Determine if a variety is a child of another
plotPath

Construct the graphic object of the path
plotDegMatrix

Returns the image object to show the heat map of degrees between the inputted set of vertices
plotPathOnAll

Plot a path between two vertices over the full genealogy
plotVariableMatrix

Returns the image object to show the heat map of dates between the inputted set of vertices
sbGeneal

Soybean data
plotAncDes

Returns the image object to show the ancestors and descendants of a variety
getNodes

Returns the nodes for a full genealogy
getParent

Returns the parents of a particular variety (if they exist)
nodeToDF

Returns the data frame representation of all ancestors and descendants of a variety
statGeneal

Academic statistics data
getPath

Determine the path between two varieties
getPathOnly

Determine the path between two varieties
buildAncDesCoordDF

Returns the coordinate positions of all ancestors and descendants of a variety.
buildEdgeTotalDF

Build the edges in the genealogy graph.
buildDesList

Returns the descendants of a particular variety (if they exist).
buildPlotTotalDF

Build all labels in the graph
buildAncDesTotalDF

Returns data frame with plot coordinates of all ancestors and descendants of a variety.
buildMinusPathDF

Process the genealogy graph
dfToIG

Process the genealogy graph
buildSpreadTotalDF

Build a data frame where the varieties are spread so they do not overlap
buildPathDF

Build data frame for path representation
buildAncList

Returns the ancestors of a particular variety (if they exist).
getBranchQual

Descendant branch calculations for quantitative variable
getBranchQuant

Descendant branch calculations for quantitative variable
getAncestors

Returns a list of the ancestors of a particular variety (if they exist)
getBasicStatistics

Determine basic statistics of the graph object
getDescendants

Returns a list of the descendants of a particular variety (if they exist)
getChild

Returns the children of a particular variety (if they exist)
getEdges

Returns edges (vertex names and edge weights) for the full genealogy
getDegree

Determine the degree between two varieties