Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

manhattan

Manhattan plot


Description

Draws a Manhattan plot

Usage

manhattan(x, bty = "n", chrom.col = c("black", "gray50"), thinning = TRUE, ... )

Arguments

x

A data.frame with columns named chr, pos and p.

bty

Type of box to draw about the plot. Default is to draw none.

thinning

Logical. If TRUE, not all points are displayed.

chrom.col

Alternating colors for chromosomes.

...

Graphical parameters to be passed to plot.

Details

If there is only one chromosome value in x$chr, the x-axis will be labeled with the SNP position. In the general case, the x-axis is labeled with the chromosome name and the color of the points alternates between the colors in chrom.col.

The default value bty = "n" should give the best result for GWAS Manhattan plots. See par for other possible values of bty and their meaning.

The thinning procedure suppress some points to avoid generating too heavy graphs. The user should check that setting thinning = FALSE does not change the final aspect of the plot.

Value

An invisible copy of x is returned, in which a column coord has been added if there is more than one chromosome value in x$chr. This column contains the x-coordinates of each SNP on the plot, and should prove helpful to annotate it.

See Also


gaston

Genetic Data Handling (QC, GRM, LD, PCA) & Linear Mixed Models

v1.5.7
GPL-3
Authors
Hervé Perdry [cre, aut, cph], Claire Dandine-Roulland [aut, cph], Deepak Bandyopadhyay [cph] (C++ gzstream class), Lutz Kettner [cph] (C++ gzstream class)
Initial release
2020-09-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.