Learn R Programming

SNPhood (version 1.2.3)

plotGenotypesPerSNP: Plot genotype frequencies of regions across datasets.

Description

Creates bar plots for the distribution of genotype frequencies of regions across individuals.

Usage

plotGenotypesPerSNP(SNPhood.o, regions = NULL, fileToPlot = NULL, verbose = FALSE)

Arguments

SNPhood.o
Object of class SNPhood
regions
Numeric or Character or NULL. Default NULL. Regions that should be plotted, either specified as integer (such as 1, value must be between 1 and the total number of regions as defined in the object) or their annotation (name must appear in the region names as obtained via the function annotationRegions). If set to NULL, all regions will be considered.
fileToPlot
Character(1) or NULL. Default NULL. Filename of the PDF file for the output plots. If set to NULL, plots will be plotted to the currently active device.
verbose
Logical(1). Default FALSE. Should the verbose mode (i.e., diagnostic messages during execution of the script) be enabled?

Value

the generated ggplot2 plot(s) as list for further processing. May contain multiple plots, depending on the function. The plot(s) can then be plotted individually or modified arbitrarily as the user wants. For example, if multiple plots are returned and the plots have been saved in a variable called plots.l, simply type plots.l[[1]] to view the first plot.

See Also

plotAndClusterMatrix

Examples

Run this code
data(SNPhood.o, package="SNPhood")
plot = plotGenotypesPerSNP(SNPhood.o, regions=1:20)

Run the code above in your browser using DataLab