plot.haplinStrat: Plotter function for haplinStrat results.

View source: R/plot.haplinStrat.R

plot.haplinStratR Documentation

Plotter function for haplinStrat results.

Description

This will automatically plot all haplinStrat results on one figure.

Usage

## S3 method for class 'haplinStrat'
plot(
  x,
  filename,
  title,
  windows,
  plot.signif.only = FALSE,
  signif.thresh = 0.05,
  y.lim,
  x.title,
  y.title,
  file.width,
  file.height,
  ...
)

Arguments

x

The haplinSlide object (NB: only the output produced by running haplinSlide with the table.output argument set to TRUE!)

filename

If the plot should be saved to the disk, give the name of the output file including the file extension.

title

If the user wishes to override the default title of the plot, give it here.

windows

Numerical vector. If given, this will only plot the chosen windows.

plot.signif.only

Logical: whether to filter out the "non-significant" markers from the plot. Default: FALSE, i.e., plot everything.

signif.thresh

The threshold defining the significant p-values: if plot.signif.only == TRUE, then only the markers with relative risk p-values lower than the threshold will be kept for plotting. Default: 0.05.

y.lim

Vector with two numbers setting the Y limits of the plotted graph.

x.title

Title for the X axis (default: "marker").

y.title

Title for the Y axis (default: "RR (log scale)").

file.width

Width (in inches) for the output plot, if a filename was given.

file.height

Height (in inches) for the output plot, if a filename was given.

...

other arguments (ignored).

Details

This function uses the same style as plot.haplinSlide and plots all of the haplinStrat results on one figure, for easy comparison. NB: those estimates that have infinite confidence interval will not be plotted.

Value

ggplot object.


Haplin documentation built on Sept. 11, 2024, 7:13 p.m.