plot_DistributionRuns: Plot Distribution of runs

Description Usage Arguments Value Examples

Description

This function the distribution of runs per group. The average run length per size-class, the average run length per chromosome (and group), the percent distribution of runs per size-class and group, and the proportion of runs per chromosome are plotted. With style="All" all three plots are produced.

Usage

1
2
3
4
plot_DistributionRuns(runs, mapFile, groupSplit = TRUE,
  style = c("MeanClass", "MeanChr", "RunsPCT", "RunsPCT_Chr", "All"),
  savePlots = FALSE, outputName = NULL, plotTitle = NULL,
  Class = 2)

Arguments

runs

R object (dataframe) with results on detected runs

mapFile

Plink map file (for SNP position)

groupSplit

plots split by group (defaults to TRUE)

style

type of plot: MeanClass, MeanChr, RunsPCT, RunsPCT_Chr, All (all plots)

savePlots

should plots be saved out to files or plotted in the graphical terminal (default)?

outputName

title prefix (the base name of graph, if savePlots is TRUE)#'

plotTitle

title in plot (default NULL)

Class

group of length (in Mbps) by class (default: 0-2, 2-4, 4-8, 8-16, >16)

Value

plot Distribution Runs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# 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')

plot_InbreedingChr(runs = runsDF, mapFile = mapFile, style='All')

detectRUNS documentation built on Oct. 30, 2019, 11:41 a.m.