manhattan: Manhattan plots for P-values

Description Usage Arguments Details Value Author(s) Examples

View source: R/manhattan.R

Description

Plots a ‘Manhattan’ plot, appropriate for P-values from a genome-wide analysis.

Usage

1
manhattan(p, SNP, chr, pos, pmin = NULL, ...)

Arguments

p

A vector of P-values

SNP

A vector of SNP names in chr:pos[:allele_allele] format

chr

A vector of chromosome locations

pos

A vector of positions within chromosomes

pmin

The smallest P-value that should fit in the plot

...

Additional arguments passed to points for plotting the p-values

Details

The plot is drawn in the current screen on the current device. The spacing between chromosomes is hard coded to a value that looks nice for human chromosome lengths.

Value

Nothing should be returned.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
5
6
7
8
chr <- rep(c(1:22, "X"), each = 5000)
pos <- do.call(c, lapply(c(2e8/sqrt(1:22), 2e8),
                         function(chrlen)
                         return(sort(chrlen*runif(5000)))))
SNP <- paste(chr, pos, sep = ":")
pvals <- runif(115000)
manhattan(pvals, SNP, pch = 20)
## FIXME blue colour repeated for X

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.