Manhattanly: R package for Interactive Manhattan Plots

[This article was first published on R – Modern Data, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Introduction

The new R package, manhattanly, creates interactive manhattan plots using the plotly.js engine. The plots are usable from the R console, the RStudio viewer pane, R Markdown documents, in Shiny apps, embeddable in websites and can be exported as .png files. By hovering the mouse over a point, you can see annotation information such as the SNP identifier and GENE name. You can also drag a rectangle to zoom in on a region of interest and then export the image as a .png file.

Visit the package website for full details and example usage.

Quick Start

The following three lines of code will produce the plot below

install.packages("manhattanly")
library(manhattanly)
manhattanly(HapMap, 
            snp = "SNP", gene = "GENE", 
            annotation1 = "ZSCORE", annotation2 = "EFFECTSIZE", 
            highlight = significantSNP)

Related Work

This work is based on the qqman package by Stephen Turner. It produces similar manhattan plots as the qqman::manhattan function; the main difference here is being able to interact with the plot, including extra annotation information and seamless integration with HTML.

The splitting of the tasks into data pre-processing and plot rendering is inspired by the heatmaply package by Tal Galili.

To leave a comment for the author, please follow the link and comment on their blog: R – Modern Data.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)