Learn R Programming

pedtricks package

Functions for sensitivity and power analysis, for calculating statistics describing pedigrees from wild populations, and for visualizing pedigrees.

This package is essentially a reboot of the now archived pedantics package. We took the pedantics package, removed the dependencies on archived packages (MasterBayes), renamed some functions and removed 2 (fpederr() and rpederr()).

Installation

Install with

remotes::install_github(
  "JulienGAMartin/pedtricks"
)

Changes from pedantics

see the News page of pedtricks website for the list of all the changes

speed

Code has been optimized to run faster (over 200 times faster on example pedigree for ped_stats from >160s to <1s)

Defunct functions

  • rpederr() and fpederr() have been removed from the package.

The questions about rates of pedigree error typically encountered, and their effects on inference of elementary QG parameters are basically settled (Charmantier & Réale 2005, Morrissey et al. 2007, Firth et al. 2015, Bourret & Garant 2017), and outstanding questions will not plausibly be supported by these functions or any straightforward modifications thereof.

functions structure changes

  • pedigreeStats() and pedStatSummary() have been replaced by ped_stats() with a summary() and plot() methods to simplify the workflow and allow to get the plots without running the statistics each time
  • makePedigreeFactor() and makePedigreeNumeric() have been combined in convert_ped() which convert a pedigree to numeric or factor

functions renamed

  • fixPedigree() is now fix_ped()
  • genomesim(), microsim() and phensim() have been renamed as genome_sim(), micro_sim() and phen_sim()

new functions

  • ggpedigreedraw pedigrees ggplot style
  • draw_pedA graphical representation of the relatedness matrix

future for 1.0.0

  • replace drawPedigree by ggpedigree
  • reimplement all plot methods from ped_stats using ggplot
  • add a plotting function for relatedness matrices
  • ...

References

Bourret, A., and D. Garant. 2017. An assessment of the reliability of quantitative genetics estimates in study systems with high rate of extra pair paternity and low recruitment. Heredity 118: 229-38.

Charmantier, A., and D. Réale. 2005. How do misassigned paternities affect estimation of heritability in the wild? Molecular Ecology 14: 2839-50

Firth, J.A. J.D. Hadfield, A.W. Santure, J. Slate and B.C. Sheldon. 2015. The influence of non-random extra pair paternity on heritability estimates derived from wild pedigrees. Evolution 69: 1336-44.

Morrissey, M.B., A.J. Wilson, J.M. Pemberton, and M.M. Ferguson. 2007. A framework for power and sensitivity analysis for quantitative genetic studies of natural populations, and a case study in Soay sheep (Ovis aries). Journal of Evolutionary Biology 20: 2309-21.

Copy Link

Version

Install

install.packages('pedtricks')

Monthly Downloads

116

Version

0.4.2

License

MIT + file LICENSE

Maintainer

Julien Martin

Last Published

September 9th, 2024

Functions in pedtricks (0.4.2)

convert_ped

Converts a pedigree with individuals specified as factors to a numeric pedigree
summary.ped_stats

Post-processes output from ped_stats
ped_stats

Calculates a range of statistics of pedigrees
micro_sim

Simulates microsatellite data across a pedigree.
draw_pedA

Produce a graphical representation of the relatedness matrix of a pedigree
pedantics-defunct

Defunct functions from package pedantics.
fix_ped

Manipulating pedigrees to prepare them for requirements of subsequent analyses Prepares a pedigree to conform with requirements of many softwares used in quantitative genetic analysis, as well as for many of the functions in pedtricks.
makemakePedigreeFactor

Deprecated functions from package pedantics.
phen_sim

A function to simulated phenotypic data
draw_ped

Produce a graphical representation of a pedigree
WarblerG

Seychelles Warbler Genotypes
extractA

Allele Frequencies
genome_sim

A function to simulate QTL and/or SNP data.
plot.ped_stats

Plot output from ped_stats
gryphons

Example dataset for pedtricks examples and tutorial
ggpedigree

ggpedigree: Plotting tool for simple and complex pedigrees.
pedtricks-package

pedtricks: Visualize, Summarize and Simulate Data from Pedigrees