Skip to contents

Creates a Manhattan plot

Usage

manhattan(
  df,
  group = "group",
  position = "position",
  value = "value",
  yline = NULL,
  logy = FALSE,
  highlight_colour = NULL,
  annotate_column = NULL,
  annotate = NULL,
  colours = c("gray10", "gray60"),
  title = NULL,
  y_breaks = NULL,
  ylims = NULL,
  ...
)

Arguments

df

A data frame.

group

Column name for groups (X-axis sections). Default is "group".

position

Column name for positions within groups. Default is "position".

value

Column name for values (Y-axis). Default is "value".

yline

Optional. Horizontal line(s) at specified Y-axis value(s).

logy

Logical. Whether to -log10 transform the Y-axis values. Default is FALSE.

highlight_colour

Optional. Colour for points above the first yline.

annotate_column

Optional. Column name to use for labels.

annotate

Optional. Vector of values from annotate_column to label.

colours

Character vector of colours for alternating groups.

title

Optional. Plot title.

...

Additional arguments.

Value

A ggplot object.