Froh_inbreedingClass function

Function to calculated Froh using a ROH-class

Function to calculated Froh using a ROH-class

This function calculates the individual inbreeding coefficients based on runs of homozygosity (ROH) using only ROH of specific size classes. The parameter class specify the size interval to split up calculations. For example, if class = 2 Froh based on ROH 0-2, 2-4, 4-8, 80-16, >16 Mbps long will be calculated.

Froh_inbreedingClass(runs, mapFile, Class = 2)

Arguments

  • runs: R object (dataframe) with ROH results
  • mapFile: Plink map file (for SNP position)
  • Class: base ROH-length interval (in Mbps) (default: 0-2, 2-4, 4-8, 8-16, >16)

Returns

A data frame with individual inbreeding coefficients based on ROH-length of specific size. The sum of ROH-length of specific size in each individual is reported alongside

Examples

# getting map and ped paths genotypeFile <- system.file("extdata", "Kijas2016_Sheep_subset.ped", package = "detectRUNS") mapFile <- system.file("extdata", "Kijas2016_Sheep_subset.map", package = "detectRUNS") # calculating runs of Homozygosity ## Not run: # skipping runs calculation runs <- slidingRUNS.run(genotypeFile, mapFile, windowSize = 15, threshold = 0.1, minSNP = 15, ROHet = FALSE, maxOppositeGenotype = 1, maxMiss = 1, minLengthBps = 100000, minDensity = 1/10000) ## End(Not run) # loading pre-calculated data runsFile <- system.file("extdata", "Kijas2016_Sheep_subset.sliding.csv", package="detectRUNS") runsDF <- readExternalRuns(inputFile = runsFile, program = 'detectRUNS') Froh_inbreedingClass(runs = runsDF, mapFile = mapFile, Class = 2)