Learn R Programming

inbreedR

Goal

inbreedR provides functions and workflows for the analysis of inbreeding and heterozygosity-fitness correlations (HFCs) based on molecular markers such as microsatellites and SNPs. In case of genomic data, it’s most useful for lower density datasets where it is unclear whether genotyped markers represent genome-wide diversity / inbreeding. It has four main application areas:

  • Quantifying variance in inbreeding through estimation of identitiy disequilibria (g2), heterozygosity-heterozygosity correlations (HHC) and variance in standardized multilocus heterozygosity (sMLH)

  • Calculating g2 for small and large SNP datasets. The use of data.table and parallelization speed up bootstrapping and permutation tests

  • Estimating central parameters within HFC theory, such as the influence of inbreeding on heterozygosity and fitness, and their confidence intervals.

  • Exploring the sensitivity of these measures towards the number of genetic markers using simulations

Installation

You can install the stable version of inbreedR from CRAN with:

install.packages("rptR")

Or the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("mastoffel/inbreedR", build_vignettes = TRUE, dependencies = TRUE) 
# manual
browseVignettes("inbreedR")

If you find a bug, please report a minimal reproducible example in the issues.

Get started with inbreedR

To get started read the vignette:

vignette("inbreedR_step_by_step", package = "inbreedR")

Citation

Stoffel, M. A., Esser, M., Kardos, M., Humble, E., Nichols, H., David, P., & Hoffman, J. I. (2016). inbreedR: an R package for the analysis of inbreeding based on genetic markers. Methods in Ecology and Evolution, 7(11), 1331-1339.

Copy Link

Version

Install

install.packages('inbreedR')

Monthly Downloads

302

Version

0.3.3

License

GPL-2

Maintainer

Martin A Stoffel

Last Published

February 2nd, 2022

Functions in inbreedR (0.3.3)

mouse_snps

Oldfield mouse SNP data
check_data

Checks the data for consistency with the inbreedR working format.
MLH

Calculate multilocus heterozygosity (MLH)
inbreedR

inbreedR: Workflows for analysing variance in inbreeding and HFCs based on SNP or microsatellite markers.
convert_raw

Genotype format converter
HHC

Calculates heterzygosity-heterozygosity correlations with standardized multilocus heterozygosities (sMLH)
g2_snps

Estimating g2 from larger datasets, such as SNPs
mouse_msats

Oldfield mouse microsatellite data
bodyweight

Oldfield mouse bodyweight data
r2_Wf

Expected r2 between inbreeding level (f) and fitness (W)
plot.inbreed

Plot an inbreed object
sMLH

Calculate multilocus heterozygosity (MLH)
simulate_g2

Simulate \(g2\)
r2_hf

Expected r2 between standardized multilocus heterozygosity (h) and inbreeding level (f)
simulate_r2_hf

Calculates the expected squared correlation between heteorzygosity and inbreeding for simulated marker sets
g2_microsats

Estimating g2 from microsatellite data
print.inbreed

Print an inbreed object