# FnR: R package for computing inbreeding and numerator relationship coefficients

**Authors:** Mohammad Ali Nilforooshan

PMC · DOI: 10.1186/s12862-024-02285-4 · 2024-07-18

## TL;DR

The FnR R package efficiently calculates inbreeding and relationship coefficients for large populations, aiding conservation and breeding programs.

## Contribution

FnR introduces an efficient method for computing relationship coefficients using inbreeding coefficients and dummy progenies.

## Key findings

- FnR efficiently calculates relationship coefficients for large populations with 200,000 dummy progenies in under 3:45 minutes.
- Providing precomputed inbreeding coefficients reduces runtime to 1:08 minutes.
- The package is memory efficient and suitable for conservation and breeding applications.

## Abstract

Inbreeding and relationship coefficients are essential for conservation and breeding programs. Whether dealing with a small conserved population or a large commercial population, monitoring the inbreeding rate and designing mating plans that minimize the inbreeding rate and maximize the effective population size is important. Free, open-source, and efficient software may greatly contribute to conservation and breeding programs and help students and researchers. Efficient methods exist for calculating inbreeding coefficients. Therefore, an efficient way of calculating the numerator relationship coefficients is via the inbreeding coefficients. i.e., the relationship coefficient between parents is twice the inbreeding coefficient of their progeny. A dummy progeny is introduced where no progeny exists for a pair of individuals. Calculating inbreeding coefficients is very fast, and finding whether a pair of individuals has a progeny and picking one from multiple progenies is computationally more demanding. Therefore, the R package introduces a dummy progeny for any pair of individuals whose relationship coefficient is of interest, whether they have a progeny or not.

Runtime and peak memory usage were benchmarked for calculating relationship coefficients between two sets of 250 and 800 animals (200,000 dummy progenies) from a pedigree of 2,721,252 animals. The program performed efficiently (200,000 relationship coefficients, which involved calculating 2,721,252 + 200,000 inbreeding coefficients) within 3:45 (mm:ss). Providing the inbreeding coefficients (for real animals), the runtime was reduced to 1:08. Furthermore, providing the diagonal elements of D in \documentclass[12pt]{minimal}
				\usepackage{amsmath}
				\usepackage{wasysym} 
				\usepackage{amsfonts} 
				\usepackage{amssymb} 
				\usepackage{amsbsy}
				\usepackage{mathrsfs}
				\usepackage{upgreek}
				\setlength{\oddsidemargin}{-69pt}
				\begin{document}$$\textbf{A} = \textbf{TDT}^{\prime }$$\end{document}A=TDT′ (d), the runtime was reduced to 54s. All the analyses were performed on a machine with a total memory size of 1 GB.

The R package FnR is free and open-source software with implications in conservation and breeding programs. It proved to be time and memory efficient for large populations and many dummy progenies. Calculation of inbreeding coefficients can be resumed for new animals in the pedigree. Thus, saving the latest inbreeding coefficient estimates is recommended. Calculation of d coefficients (from scratch) was very fast, and there was limited value in storing those for future use.

## Full-text entities

- **Diseases:** Inbreeding depression (MESH:D003866)
- **Species:** Bos taurus (bovine, species) [taxon 9913]

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/PMC11256478/full.md

---
Source: https://tomesphere.com/paper/PMC11256478