Draws a volcano plot for a set of coefficients and p-values. Uses ggplot for plotting and ggrepel package for labels. By default, plot labeling assumes FDR-corrected p-values.

spaghetti_plot(
  target,
  data,
  sampleInfo,
  time_var_name,
  id_var_name,
  group_var_name = NULL,
  axis_label_font_size = 0.55,
  legend = TRUE
)

Arguments

axis_label_font_size

Font size of axis title.

coefs

Vector of coefficients.

p_vals

Vector of p-values.

target_labels

Vector of target names.

title

Plot title.

xlabel

X axis label.

ylabel

Y axis label.

xlimits

X axis limits

ylimits

Y axis limits

max.overlaps

Passed to ggrepel. Integer which determines how many targets will have labels. "Inf" (default) labels all targets.

plot_title_font_size

Font size of plot title.

tick_label_font_size

Font size of axis tick marks.

target_label_size

Font size of target labels.

target_label_segment_color

Color of line segments for target labels.

plot_aspect_ratio

Aspect ratio for plot. Default is 1 (square plot).

Value

Outputs a ggplot object.