Function to calculated Froh genome-wide or chromosome-wide
Function to calculated Froh genome-wide or chromosome-wide
This function calculates the individual inbreeding coefficients based on runs of homozygosity (ROH), either per-chromosome (chromosome-wide) or based on the entire genome (genome-wide). See details of calculations below
Froh_inbreeding(runs, mapFile, genome_wide =TRUE)
Arguments
runs: R object (dataframe) with results on runs
mapFile: Plink map file (to retrieve SNP position)
genome_wide: vector of TRUE/FALSE (genome-wide or chromosome-wide; defaults to TRUE/genome-wide)
Returns
A data frame with the inbreeding coefficients of each individual sample
Details
Froh is calculated as:
FROH=Lengthgenome∑ROHlength
Depending on whether genome-wide or chromosome-wide calculations are required, the terms in the numerator and denominator will refer to the entire genome or will be restricted to specific chromosomes.