volcano_plot: Volcano plot

View source: R/plots.r

volcano_plotR Documentation

Volcano plot

Description

Creates a volcano plot of Wald ratios from [do_mr()]. This function will take all of the Wald ratios in the given data.frame and plot these. If the plot is too crowded, subsetting the results before passing them to this plotter will help. If 'plotly' is installed, the plot will be returned interactive.

Usage

volcano_plot(
  res,
  label = "outcome",
  snp_col = "snp",
  beta_col = "b",
  pval_col = "pval",
  or_col = "or",
  or_lci_col = "or_lci95",
  or_uci_col = "or_uci95",
  method_col = "method",
  force_static = FALSE
)

Arguments

res

A data.frame of MR results

label

Column whose values will be used to group results by (Optional)

snp_col

Column name for SNPs (Optional)

beta_col

Column name for beta (Optional)

pval_col

Column name for P value (Optional)

or_col

Column name for odds ratio (Optional)

or_lci_col

Column name for lower CI of OR (Optional)

or_uci_col

Column name for upper CI of OR (Optional)

method_col

Column name which contains the MR method (Optional)

force_static

True for forcing the plot to be returned as a static plot (Optional)

Value

Plot


jwr-git/mrpipeline documentation built on Oct. 2, 2022, 3:41 p.m.