ipheman: ipheman

Description Usage Arguments Value See Also Examples

View source: R/ipheman.R

Description

Create Interactive Manhattan plots for PheWAS

Usage

1
2
3
4
5
ipheman(d, phegroup, line, log10 = TRUE, yaxis, ymax, opacity = 1,
  highlight_snp, highlight_p, highlighter = "red", title = NULL,
  chrcolor1 = "#AAAAAA", chrcolor2 = "#4D4D4D", groupcolors,
  background = "variegated", chrblocks = TRUE, db, moreinfo = FALSE,
  bigrender = FALSE, file = "ipheman", hgt = 7, wi = 12)

Arguments

d

data frame, must contain PHE, SNP, CHR, POS pvalue, columns, optional Shape

phegroup

optional grouping file for phenotypes, must contain PHE and Group columns

line

optional pvalue threshold to draw red line at

log10

plot -log10() of pvalue column, boolean

yaxis

label for y-axis, automatically set if log10=TRUE

ymax

set the upper limit for the y-axis if not automatically scaled

opacity

opacity of points, from 0 to 1, useful for dense plots

highlight_snp

vector of SNPs to highlight

highlight_p

pvalue threshold to highlight

highlighter

color to highlight

title

optional string for plot title

chrcolor1

first alternating color for chromosome

chrcolor2

second alternating color for chromosome

groupcolors

named vector of colors for data in 'Color' column

background

variegated or white

chrblocks

boolean, turns on x-axis chromosome marker blocks

db

choose database to connect to ("dbSNP", "GWASCatalog", or enter your own search address)

moreinfo

includes more information on hover, refers to Info column

bigrender

can set to TRUE for big plots (~50000 rows) that produce huge input lookup error

file

file name of saved image

hgt

height of plot in inches

wi

width of plot in inches

Value

html file

See Also

pheman, apheman, igman, ieman

Other PheWAS functions: apheman, pheman

Other interactive plotting functions: igman

Examples

1
2
3
4
5
6
#In this case we'd like to also see the p-value when we hover over a point,
#so we'll add an 'Info' column to the data
#We'd also like to search dbSNP when we click on a point
data(phewas)
phewas$Info <- paste0("p-value:", signif(phewas$pvalue, digits=3))
ipheman(d=phewas, moreinfo = TRUE, db="dbSNP", line=0.001, title="PheWAS Example")

anastasia-lucas/plotman documentation built on July 13, 2020, 11:47 p.m.