plot_error_volcano: Creates a scatterplot with optional errorbars and fine...

View source: R/plot_error_volcano.R

plot_error_volcanoR Documentation

Creates a scatterplot with optional errorbars and fine control over labels, colors, alpha and more

Description

Creates a scatterplot with optional errorbars and fine control over labels, colors, alpha and more

Usage

plot_error_volcano(
  plot_df,
  axis_clm_x,
  axis_clm_y,
  alpha_clm = NA,
  color_clm = NA,
  color_scheme = scale_color_viridis_d(option = "rocket", begin = 0.8, end = 0.1),
  error_clm_lower = NA,
  error_clm_upper = NA,
  gg_add_on = theme_minimal(),
  independent_clm = NA,
  lab_color = "Q-Value",
  lab_x = "Hazard Ratio (Log10)",
  lab_y = "Uncorrected Significance (-Log10)",
  label_clm = NA,
  label_nudge_x = 0.025,
  label_nudge_y = -0.15,
  label_size = 1.5,
  max_labels = 20,
  output_path = NA,
  plot_title = "Significance vs. Hazard Ratio",
  size_height = 4.5,
  size_width = 6
)

Arguments

plot_df

Dataframe containing at a minimum x and y axis data

axis_clm_x

column name in plot_df corresponding to x axis

axis_clm_y

column name in plot_df corresponding to y axis

alpha_clm

column name of categorical or continuous variable in plot_df on which to base alpha aesthetic

color_clm

column name of categorical variable in plot_df on which to base color aesthetic

color_scheme

ggplot function to specify discrete colors

error_clm_lower

column name containing lower bound of error bars

error_clm_upper

column name containing upper bound of error bars

gg_add_on

ggplot elements to add on to plot. Defaults to theme_minimal()

independent_clm

column name in plot_df from which to pull values for reporting on removed extreme values. If not set, and extreme values are removed, only the number of removed observations will be reported.

lab_color

String for labeling color legend

lab_x

String for labeling x axis

lab_y

String for labeling y axis

label_clm

column name in plot_df from which to pull labels for points

label_size

numeric value to use for the size of the point labels

max_labels

Integer to set the max number of labels that will be shown

output_path

Output path for plot

plot_title

String for plot title

size_height

Numeric to specify plot height

size_width

Numeric to specify plot width

Value

Returns ggplot object with point and optionally errorbar geoms as well as point labels if desired


Benjamin-Vincent-Lab/binfotron documentation built on Oct. 1, 2024, 8:33 p.m.