Description Usage Arguments Details Value Examples
This function processes the results from slidingRUNS.run
and
consecutiveRUNS.run
and produces a number of interesting descriptives
statistics on results.
1 | summaryRuns(runs, mapFile, genotypeFile, Class = 2, snpInRuns = FALSE)
|
runs |
R object (dataframe) with results on detected runs |
mapFile |
Plink map file (for SNP position) |
genotypeFile |
Plink ped file (for SNP position) |
Class |
group of length (in Mbps) by class (default: 0-2, 2-4, 4-8, 8-16, >16) |
snpInRuns |
TRUE/FALSE (default): should the function |
summaryRuns
calculates: i) the number of runs per chromosome and group/population;
ii) the percent distribution of runs per chromosome and group; iii) the number of
runs per size-class and group; iv) the percent distribution of runs per size-class
and group; v) the mean length of runs per chromosome and group; vi) the mean
length of runs per size-class and group; vii) individual inbreeding coefficient
estimated from ROH; viii) individual inbreeding coefficient estimated from ROH
per chromosome; ix) individual inbreeding coefficient estimated from ROH per
size-class
A list of dataframes containing the most relevant descriptives statistics on detected runs. The list conveniently contains 9 dataframes that can be used for further processing and visualization, or can be written out to text files
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')
summaryRuns(runs = runsDF, mapFile = mapFile, genotypeFile = genotypeFile, Class = 2,
snpInRuns = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.