manhattan | R Documentation |
Make a Manhattan plot
manhattan(gwas, build = c("hg18", "hg19", "hg38"), color1 = "black", color2 = "grey")
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 |
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.
a ggplot object that makes a Manhattan plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.