Skip to contents

Uses canonical group colors, effect-direction triangles, group separators, directly annotated testing thresholds, boxed labels, and bottom legends. Stored neg_log10_p values remain authoritative, so probabilities that underflowed to zero are still plottable. Group and phenotype order are deterministic.

Usage

plot_phewas_manhattan(
  x,
  significance = "bonferroni",
  label = NULL,
  highlight = NULL,
  category_order = NULL,
  y_limit = NULL,
  missing = c("error", "drop"),
  title = NULL,
  label_mode = c("description", "phenotype", "both"),
  top_label_n = 0L,
  label_wrap_width = 26L,
  group_display = c("legend", "auto", "x_axis"),
  group_legend_columns = 5L,
  group_label_rows = 3L,
  group_wrap_width = 24L,
  point_size = 2.2,
  base_size = 12,
  label_size = base_size,
  axis_break_mode = c("off", "auto", "on"),
  axis_break_top = 55,
  axis_break_top_size = 0.125
)

Arguments

x

A phewas_result.

significance

Any of "bh", "bonferroni", and "none".

label, highlight

Explicit phenotype values to label or ring.

category_order

Optional character vector giving every group in display order. The argument name is retained for API compatibility; plotted metadata use the canonical group field.

y_limit

Optional reviewed limits on the original -log10(p) scale. Limits that clip data or testing thresholds error.

missing

What to do when selected phenotypes are unavailable.

title

Optional in-plot title. NULL leaves room for an external report or slide title.

label_mode

Label text: phenotype description, phenotype, or "both".

top_label_n

Number of automatically selected labels when label is NULL. Significant associations rank first; use zero to disable.

label_wrap_width

Approximate characters per label line.

group_display

Where to show phenotype groups. The default "legend" matches the volcano plot and leaves a numeric phenotype index on the Manhattan x-axis. "auto" uses centered group labels for compact group sets and a legend for crowded group sets; "x_axis" always places group labels on the Manhattan x-axis.

group_legend_columns

Number of columns in the group legend.

group_label_rows

Rows used to dodge group labels on the x-axis.

group_wrap_width

Approximate characters per group-label line.

point_size

Point size in millimetres.

base_size, label_size

Base and association-label font sizes in points.

axis_break_mode

Optional upper-tail compression: "off", "auto", or "on".

axis_break_top

Compression threshold on the original -log10(p) scale.

axis_break_top_size

Fraction of the plotting range allotted above the compression threshold.

Value

A ggplot object with a phewas_audit attribute.