D3ManhattanPlots
An R HTMLWidget for making interactive manhattan plots for GWAS.
Install / Use
/learn @nstrayer/D3ManhattanPlotsREADME
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:
sampleValsare real data from Klein et al.'s 2005 science paper (run?sampleValsfor more info and citation).randomwhich is randomly generated values with one significant snp (according to a bonferroni correction).
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
