manhattan_plot: Manhattan plot

View source: R/manhattan_plot.R

manhattan_plotR Documentation

Manhattan plot

Description

This function creates a Manhattan plot of EWAS results using ggplot2.

Usage

manhattan_plot(
  probe,
  region = NULL,
  array = c("450K", "EPIC"),
  FDR = FALSE,
  title = NULL,
  col.chr = c("gray40", "gray55"),
  col.sig = "gray18",
  col.dmr = "black",
  line.dmr = "#4393c3",
  size.line.dmr = 0.2,
  cex = 0.5,
  cex.sig = 0.75,
  alpha = 0.5,
  alpha.sig = 1,
  size.line.sig = 0.5
)

Arguments

probe

Dataframe of EWAS results, including the columns 'cpg', 'P.Value', 'chr', and 'pos'. If 'cpg' column is not included, rownames will be used as probe names. If output from limma's topTable is provided, chromosome and position will be obtained from 450K of EPIC annotations.

region

Dataframe of regional analysis results including the columns 'chr', 'start', 'end'.

array

'450K' or 'EPIC'

FDR

Should an FDR level of significance be indicated? Defaults to FALSE.

title

Title text.

col.chr

Vector of two colors that will be alternately used for probes within each chromosome. Defaults to c('gray40', 'gray55').

col.sig

Color of FDR or Bonferroni significant probes. Defaults to 'gray18'.

col.dmr

Color of probes within DMRs. Defaults to 'black'.

line.dmr

Color of line indicating DMRs. Defaults to '#4393c3'.

size.line.dmr

Size of line indicating DMRs. Defaults to 0.2.

cex

Size of non-significant probes. Defaults to 0.5.

cex.sig

Size of significant probes. Defaults to 0.5.

alpha

Alpha of non-significant probes. Defaults to 0.5.

alpha.sig

alpha Alpha of non-significant probes. Defaults to 1.

Size

of line indicating FDR and Bonferroni significance. Defaults to 0.5.

Value

Manhattan plot


annebozack/EWASplot documentation built on Aug. 5, 2023, 6:02 p.m.