ggmanhattan: Make manhattan plot with full ggplot customizability

Description Usage Arguments Value Author(s) Examples

View source: R/ggmanhattan.R

Description

This function is provided to make manhattan plot with full ggplot customizability. So next we can customize the manhattan plot with kinds of functions of ggplot2 and add additional layers.

Usage

1
2
3
4
5
ggmanhattan(gwasres, snp = NA, bp = NA, chrom = NA, pvalue = NA,
  index = NA, file.output = FALSE, file = "png", output = "Trait",
  dpi = 300, vlinetype = "solid", vlinesize = 0.75,
  title = "Manhattan Plot", color = c("#FF8C00", "#556B2F"),
  pointsize = 1.25, verbose = TRUE, ...)

Arguments

gwasres

a data frame of gwas results.

snp

Name of the column containing SNP identifiers; default is NA.

bp

Name of the column containing the SNP positions; default is NA.

chrom

Name of the column containing the chromosome identifers; default is NA.

pvalue

Name of the column containing the p values; default is NA.

file.output

a logical, if file.output=TRUE, the result will be saved. if file.output=FALSE, the result will be printed. The default is TRUE.

file

a character, users can choose the different output formats of plot, so far, "jpeg", "pdf", "png", "tiff" can be selected by users. The default is "png".

output

a character, the name of your trait. The default is "Trait"

dpi

a number, the picture element for .jpeg, .png and .tiff files. The default is 300.

vlinetype

the type of vline (geom_vline()). The default is "solid".

vlinesize

the size of the vline. The default is 0.75.

title

the title of manhattan plot. The default is "Manhattan Plot".

color

the colors of alternate chromosome. The default is "#FF8C00" and "#556B2F"

pointsize

the size of point. The default is 1.25.

Value

a manhattan plot based on ggplot2.

Author(s)

Tao Yan <tyan@zju.edu.cn> | <https://taoyan.netlify.com/>

Examples

1
ggmanhattan(gwas_test)

YTLogos/ttplot documentation built on Aug. 20, 2019, 8:18 p.m.