Description Usage Arguments Value Examples
View source: R/plotting_functions.R
A wrapper for ggplot to plot genome wide distribution of parameters used to identify QTL.
1 2 3 |
SNPset |
a data frame with SNPs and genotype fields as imported by
|
subset |
a vector of chromosome names for use in quick plotting of chromosomes of interest. Defaults to NULL and will plot all chromosomes in the SNPset |
var |
character. The paramater for plotting. Must be one of: "nSNPs", "deltaSNP", "Gprime", "negLog10Pval" |
scaleChroms |
boolean. if TRUE (default) then chromosome facets will be scaled to relative chromosome sizes. If FALSE all facets will be equal sizes. This is basically a convenience argument for setting both scales and shape as "free_x" in ggplot2::facet_grid. |
line |
boolean. If TRUE will plot line graph. If FALSE will plot points. Plotting points will take more time. |
plotThreshold |
boolean. Should we plot the False Discovery Rate threshold (FDR). Only plots line if var is "Gprime" or "negLogPval". |
plotIntervals |
boolean. Whether or not to plot the two-sided Takagi confidence intervals in "deltaSNP" plots. |
q |
numeric. The q-value to use as the FDR threshold. If too low, no line will be drawn and a warning will be given. |
... |
arguments to pass to ggplot2::geom_line or ggplot2::geom_point for changing colors etc. |
Plots a ggplot graph for all chromosomes or those requested in
subset
. By setting var
to "nSNPs" the distribution of SNPs
used to calculate G' will be plotted. "deltaSNP" will plot a tri-cube
weighted delta SNP-index for each SNP. "Gprime" will plot the tri-cube
weighted G' value. Setting "negLogPval" will plot the -log10 of the p-value
at each SNP. In "Gprime" and "negLogPval" plots, a genome wide FDR threshold of
q can be drawn by setting "plotThreshold" to TRUE. The defualt is a red
line. If you would like to plot a different line we suggest setting
"plotThreshold" to FALSE and manually adding a line using
ggplot2::geom_hline.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.