plot_waterfall: Plots a bar graph depicting the hazard ratio ( on log10 scale...

View source: R/plot_waterfall.R

plot_waterfallR Documentation

Plots a bar graph depicting the hazard ratio ( on log10 scale ) by feature

Description

Intended to aid in selection of significant features by displaying the hazard ratios for each feature ( ordered by hazard ratio ) with optional color coding for various Q-Value significance levels

Usage

plot_waterfall(
  plot_df,
  colors_clm = NA,
  features_clm = "Independant",
  fill_scheme = scale_fill_viridis_d(option = "rocket", begin = 0.8, end = 0.3),
  gg_add_on = theme_minimal(),
  hr_clm = "Hazard_Ratio",
  lab_color = "Q-Value",
  lab_x = "Features",
  lab_y = "Hazard Ratio ( Log10 )",
  log10_scale = TRUE,
  output_path = NA,
  plot_title = title_prefix,
  sig_clm = "qValue",
  sig_threshold = NA,
  size_height = 5.5,
  size_width = 5
)

Arguments

plot_df

Dataframe containing at a minimum hazard ratios and features

colors_clm

column name in plot_df of categorical variable to use for coloring of bars ( typically representing significance levels )

features_clm

column name in plot_df corresponding to features

fill_scheme

ggplot function to specify discrete fills

gg_add_on

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

hr_clm

column name in plot_df corresponding to hazard ratios

lab_color

String for labeling color legend

lab_x

String for labeling x axis

lab_y

String for labeling y axis

log10_scale

Boolean to indicate whether or not the y axis will be shown on log10 scale.

output_path

Output path for plot

plot_title

String for plot title

sig_clm

column name in plot_df corresponding to q-values, only used if sig_threshold is also set

sig_threshold

double representing the maximum q-value to plot on the graph. Observations with higher qvalues will be dropped from the data

size_height

Numeric to specify plot height

size_width

Numeric to specify plot width

Value

Returns ggplot object with graphed line and vertical lines at significance intervals


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