Description Usage Arguments Details Value Author(s) Examples
plot.scanonevar
implements the plot generic for objects of class 'scanonevar'.
Because scanonevar objects can be viewed in terms of LODs or empirical p-values,
this plotting function checks the 'units' attribute to determine which to plot.
1 2 3 4 5 6 7 8 9 | ## S3 method for class 'scanonevar'
plot(x, y = NULL,
chrs = unique(x[["result"]][["chr"]]), tests_to_plot = c("mQTL",
"vQTL", "mvQTL"), plotting.units = if (any(grepl(pattern = "empir.p", x
= names(x[["result"]])))) { "empir.p" } else { "LOD" },
plot.title = x[["meta"]][["scan.formulae"]][["mean.alt.formula"]][[2]],
marker.rug = TRUE, ymax = NULL, legend_pos = NULL,
alpha_pos = c("left", "right", "none"), alpha_chr = 1,
alpha_size = 2, ...)
|
x |
the |
y |
Optionally, a |
chrs |
Optionally, the subset of the chromosomes to plot |
tests_to_plot |
which one or ones of the three possible tests to plot ('mQTL', 'vQTL', and 'mvQTL') |
plotting.units |
One of 'LOD', 'asymp.p', or 'empir.p', implying whether LOD scores, asymptotic p-values, or empirical p-values should be plotted. Defaults to 'LOD' |
plot.title |
the title of the plot |
marker.rug |
Should a marker rug be plotted? Defaults to TRUE. |
ymax |
the top of the y axis |
legend_pos |
the position of the legend |
alpha_pos |
the position of the alpha values (false positive rate) |
alpha_chr |
which chromosome to put the alphas (FPRs) on |
alpha_size |
size of annotations for alpha=0.05 and alpha=0.01 lines |
... |
additional plotting arguments |
If such a strong signal was observed that the empirical p-value underflows R's float type, this function produces an error. The author is open to suggestions on how to deal with this situation better.
These plots look better when both x (the scanonevar object) and y (optional scanone for comparison) are in units p values than when they are in LOD units.
none
Returns the plot.
Robert Corty rcorty@gmail.com
1 2 3 4 | set.seed(27599)
test.cross <- qtl::sim.cross(map = qtl::sim.map(len = rep(20, 3), n.mar = 5), n.ind = 50)
test.sov <- scanonevar(cross = test.cross)
plot(x = test.sov)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.