plotPValues: Plotting p-values for relative risks

View source: R/plotPValues.R

plotPValuesR Documentation

Plotting p-values for relative risks

Description

This function plots p-values for the relative risks calculated by haplinSlide.

Usage

plotPValues(
  object,
  windows,
  which.p.val = "overall",
  plot.signif.only = FALSE,
  signif.thresh = 0.05,
  title,
  filename
)

Arguments

object

The haplinSlide results: list of haptable objects.

windows

Numerical vector; if given, the plot will be restricted to only those.

which.p.val

Character string specifying which p-values to choose for plotting: "overall" (default), "child", "child.double", "maternal", "maternal.double", "paternal". The last three options can be chosen only if haplinSlide was run with maternal = TRUE or poo = TRUE.

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.

title

Optional character string for the title of the figure.

filename

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

Details

The output of haplinSlide can be very lengthy and not suitable for an overall plot of all the relative risks (RR) on one figure. Therefore, it's advised to first plot only the p-values for each window (user can choose which p-values to plot - see parameter which.p.val), and only then plot the RRs for specific windows, for which the p-values are significant.

Value

Invisibly returns the table with only the plotted p-values.


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