Plot Froh-based inbreeding coefficients by group
The function plots the distribution of inbreeding/consanguinity coefficients per chromosome and/or group. Three types of plots can be produces: barplots, boxplots, violin plots. With style="All"
all three plots are produced.
plot_InbreedingChr(runs, mapFile, groupSplit = TRUE, style = c("ChrBarPlot", "ChrBoxPlot", "FrohBoxPlot", "All"), outputName = NULL, plotTitle = NULL, savePlots = FALSE)
runs
: R object (dataframe) with results on detected runsmapFile
: Plink map file (for SNP position)groupSplit
: plots split by group (defaults to TRUE)style
: type of plot: ChrBarPlot, ChrBoxPlot, FrohBoxPlot, All (all plots)outputName
: title prefix (the base name of graph, if savePlots is TRUE)plotTitle
: title in plot (default NULL)savePlots
: should plots be saved out to files or plotted in the graphical terminal (default)?plots of the distribution of inbreeding by chromosome and group
# 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')
Useful links