README.md

HTML Widget For Manhattan Plots

Traditional static manhattan plots are slow and ugly. Let's fix that with a little d3 and R!

Here's a live example (or just look in the gh-pages branch of this repo).

Example:

library(devtools)
install_github("nstrayer/D3ManhattanPlots")

#Load in package data to test. 
d = sampleVals

#Draw it!
manhattanPlot(d)        

#If you don't want a significance line: 
manhattanPlot(d, sigLine = FALSE)

#If you want it to load fast and forgo silly animations
manhattanPlot(d, animationSpeed = 50)

Notes:

Data:

Make sure your data is a dataframe with one column with the SNP names and another with their corresponding p-values. You can then specify these to the plotting function. If you have already -log10-ed your p-values then set the option logged = TRUE.

manhattanPlot(d, snps_col = "SNP", pvals_col = "PVal")

Two datasets have been included for ease of testing:



nstrayer/D3ManhattanPlots documentation built on May 24, 2019, 7:51 a.m.