This function processes the results from slidingRUNS.run and consecutiveRUNS.run and produces a number of interesting descriptives statistics on results.
summaryRuns(runs, mapFile, genotypeFile, Class =2, snpInRuns =FALSE)
Arguments
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 snpInsideRuns be called to compute the proportion of times each SNP falls inside a run in the group/population?
Returns
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
Details
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