This is a simple use case of using the D3ManhattanPlots HTMLWidget for R to generate interactive manhattan plots for genome wide association studies (GWAS). The package/widget are on github where you are encuraged to submit issues for desired features (or pull requests for the more adventurous).
Each balloon and string represents a single snp, or base pair on the genome. The height of the bar represents its significance of correlation with a trait or phenotype. These data are a subsection (100 most significant snps when stratified by the male gender) of the data from Complement factor H polymorphism in age-related macular degeneration. Klein et al. 2005.
First we load the library and data:
library(manhattanPlot)
d = sampleVals
Take a quick peak at the data:
head(d)
## X SNP PVal
## 1 1 rs848208 0.009142308
## 2 2 rs10492990 0.011585225
## 3 3 rs725389 0.019716484
## 4 4 rs10489155 0.007363745
## 5 5 rs10493028 0.014088796
## 6 6 rs10493029 0.014088796
…and plot:
manhattanPlot(d)
If we want to see it with slightly less homogeneous data we can use an included randomly generated dataset.
manhattanPlot(random)
We can also play around with some of the options.
manhattanPlot(random, sigLine = FALSE, animationSpeed = 0)