manhattan: Make a Manhattan plot

View source: R/manhattan.R

manhattanR Documentation

Make a Manhattan plot

Description

Make a Manhattan plot

Usage

manhattan(gwas, build = c("hg18", "hg19", "hg38"), color1 = "black",
  color2 = "grey")

Arguments

gwas

A GWAS study. Must have chrom, pos, and y columns

build

Genomic build. Currently supports hg18, hg19, and hg38

color1

Color for odd-numbered chromosomes

color2

Color for even-numbered chromosomes

Details

manhattan is a wrapper around ggplot. It uses a few tricks to transform a genomic axis to a scatterplot axis. For instance, chr2:1 would be the length of chromosome 1 plus 1, chr3:1 would be chromosome 1 plus chromosome 2 plus 1, so on and so forth. It is important to specify the genomic build (e.g. hg19) so that 'manhattan' can make the correct transformation. It positions the chromosome labels on the x-axis according to these transformations.

Value

a ggplot object that makes a Manhattan plot


boxiangliu/manhattan documentation built on Aug. 24, 2022, 6:45 p.m.