manhattan_plot: Make a Manhattan Plot

Description Usage Arguments Examples

View source: R/manhattan_plot.R

Description

Generates a manhattan plot (a plot of -log10(p-val)) for a set of markers by chromosome and base-pair position.

Usage

1
2
3
4
manhattan_plot(pval, bp, chr, groups = NULL, cutoff = NULL,
  xlab = "Chromosome (base-pair position)",
  ylab = expression(paste(-log[10](italic(p)))), transform = TRUE,
  cex = 0.5, ...)

Arguments

pval

A vector of p-values.

bp

A vector of base-pair positions, corresponding to the genomic location for which that p-value is associated (typically, the SNP location).

chr

The chromosomal location associated with the p-value.

groups

A groups vector: used if you want to overlay multiple manhattan plots.

cutoff

optional. By default, a Bonferroni cutoff line is drawn on the plot; if you want to plot a custom cut-off line you can specify the cutoff here.

xlab

The label to use for the x axis.

ylab

The label to use for the y axis.

transform

boolean; if TRUE, we compute -log10(pval); otherwise, we use pval as-is, assuming that pval has been transformed accordingly.

cex

Multiplier for the point size.

...

Optional arguments passed to xyplot.

Examples

1
2
3
4
5
6
pval <- runif(1E4)
bp <- c(1:5E3, 1:5E3)
chr <- rep(1:22, length.out=1E4)
groups=rep( c("Phenotype 1", "Phenotype 2"), each=5E3 )
manhattan_plot( pval, bp, chr, groups, main="Two Phenotype MH Plot" )
manhattan_plot( pval, bp, chr, main="Manhattan Plot" )

Example output



Kmisc documentation built on May 29, 2017, 1:43 p.m.

Related to manhattan_plot in Kmisc...