plot.scanonevar: plot.scanonevar

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot.scanonevar.R

Description

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.

Usage

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, ...)

Arguments

x

the scanonevar object to be plotted

y

Optionally, a scanone object to be plotting for comparison to the scanonevar object.

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

Details

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

Value

Returns the plot.

Author(s)

Robert Corty [email protected]

Examples

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)

vqtl documentation built on May 2, 2019, 3:29 p.m.