Description Usage Arguments Details Value Examples
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
1 | Froh_inbreeding(runs, mapFile, genome_wide = TRUE)
|
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) |
Froh is calculated as:
F_{ROH} = \frac{∑ ROH_{length}}{Length_{genome}}
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.
A data frame with the inbreeding coefficients of each individual sample
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # 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_inbreeding(runs = runsDF, mapFile = mapFile)
Froh_inbreeding(runs = runsDF, mapFile = mapFile, genome_wide=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.