gg_manhattan: Manhattan plot with ggplot2

View source: R/gg_manhattan.R

gg_manhattanR Documentation

Manhattan plot with ggplot2

Description

...

Usage

gg_manhattan(
  data,
  chr,
  pos,
  pval,
  label,
  title = NULL,
  label.mode = c("none", "fdr05", "signif", "suggest"),
  label.size = 0.7,
  point.size = 0.8,
  hline.signif = NA,
  hline.suggest = NA,
  highlight_loci.thresh = hline.signif,
  highlight_loci.width = 250,
  highlight_loci.color = "red",
  overplot.limit = 0.05,
  overplot.frac = 0.05,
  chr.colors = manhattan_colors_GnBu(),
  chr.labels = waiver(),
  limits_y = waiver(),
  breaks_y = waiver(),
  progress = TRUE
)

Arguments

data

Input data frame

chr

Name of column with chromosome number.

pos

Name of column with chromosome position (typically in base pair)

pval

Name of column with p-value

label

Optional, name of column with rsid symbols, gene symbols, or other labels

title

Plot title

label.mode

How to apply labels to selected points. One of c("none", "fdr_0.05", "hline.signif", "hline.suggest"). "fdr_0.05" identifies points that have FDR < 0.05. "hline.signif" identifies points above the significance line.

label.size

Font size of labels relative to the ggplot theme text element

point.size

Size of point. Default 0.8.

hline.signif

Horizontal significance line. Can be a number, or "bonferroni" to automatically calculate Bonferroni correction. Use NA to omit.

hline.suggest

Horizontal suggestive line. Can be a number, or "bonferroni" to automatically calculate Bonferroni correction. Use NA to omit.

highlight_loci.thresh

Threshold p-value to use to identify lead snps in loci that will be highlighted with highlight_loci.color. Use NA to omit.

highlight_loci.width

Width, in kilobases, of loci identified by highlight_loci.thresh to include in the highlight regions

highlight_loci.color

Highlight color

overplot.limit

If there are greater than 1 million points, only a fraction (specified by overplot.frac) of the points with p-values above this limit will be randomly removed.

overplot.frac

Fraction of points above the overplot.limit to plot. Other points (randomly sampled) will be discarded.

chr.colors

Vector of color names, applied to each chromosome.

chr.labels

Optional. Chromosome labels.

limits_y

Optional. y-axis limits, in -log10 units.

breaks_y

Optional. y-axis breaks, in -log10 units.

progress

Whether to show a progress bar during ggplot construction


adamleejohnson/R-ajtools documentation built on April 4, 2022, 7:24 a.m.