My friend Jonathan Sidi and I (Tal Galili) are pleased to announce the release of shinyHeatmaply (0.1.0): a new Shiny application (and Shiny gadget) for creating interactive cluster heatmaps. shinyHeatmaply is based on the heatmaply R package which strives to make it easy as possible to create interactive cluster heatmaps.
The app introduces a functionality that saves to disk a self contained copy of the htmlwidget as an html file with your data and specifications you set from the UI, so it can be embedded in webpages, blogposts and online web appendices for academic publications.
You can see some of shinyHeatmaply‘s capabilities in the following 40 seconds video:
Installing shinyHeatmaply
From CRAN:
install.packages('shinyHeatmaply')
From github:
devtools::install_github('yonicd/shinyHeatmaply')
Running the app/gadget
The application has an import interface as part of the application which currently supports csv, txt, tab, xls, xlsx, rd, rda. You can start the app using:
library(shiny)
library(heatmaply)
# If you didn't get shinyHeatmaply yet, you can run it through github:
# runGitHub("yonicd/shinyHeatmaply",subdir = 'inst/shinyapp')
# or just use your locally installed package:
library(shinyHeatmaply)
runApp(system.file("shinyapp", package = "shinyHeatmaply"))
The gadget is called from the R console and accepts input arguments. The object defined as the input to the shinyHeatmaply gadget is a data.frame or a list of data.frames. You can start it using the following code:
library(shinyHeatmaply)
#single data.frame
data(mtcars)
launch_heatmaply(mtcars)
#list
data(iris)
launch_heatmaply(list('Example1'=mtcars,'Example2'=iris))
You can see an example of a saved shinyHeatmaply output here. Or view the following iframe:
We would love to get your feedback!
For issue reports or feature requests, please visit the GitHub repo.
Post post credit: shinyHeatmaply was made thanks to the dedication of Jonathan Sidi, and based on recent features added to heatmaply by Alan O’Callaghan. I am very grateful to them both. This could also not be made possible by the amazing work of the RStudio’s team on Shiny applications, and of Carson Sievert on plotly. And lastly, to my adviser Yoav Benjamini for his support and advices.
Great work! I am looking forward to play with it. Unfortunately the link to the Git repo is broken!
Best
Christin
Thanks PetitCrapaud,
The correct link is:
https://github.com/yonicd/shinyHeatmaply
And I’ll fix it in the post now.
Best,
Tal
I tried running the code from the post and got errors: > install_packages(‘shinyHeatmaply’)
Error: could not find function “install_packages”
> install.packages(“shinyHeatmaply”)
Installing package into ‘C:/Users/lpohlma/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘shinyHeatmaply’ is not available (for R version 3.2.3)
Hi Larry,
Thanks for the comment, I’ve now fixed it in the text to read:
install.packages(“shinyHeatmaply”)
If this does not work for you, please change your CRAN mirror. The package was uploaded only about a day and it may take another day until all CRAN mirrors will have a copy of it properly rendered.
Cheers,
Tal
Great app! Is there a way to make sure the app closes when you close the window when using viewerType=’browserViewer’? Right now, when I close the browser window running the widget, the console lingers as if the app is still open.
Hi. Thanks for the great app. I love it. I am currently implementing this in an app.
I have a question:
In my app I have some ggplots that I would like to tie with the heatmap data.
I would like the user to click on the heatmap, and based on the click, the appropriate sample in ggplot(s) get annotated.
Is there anyway to add mouse click events to this package? I would like to basically have the “clickOpt” feature on ggplot2 shiny implemented in this app.
Any suggestion or guidance is well appreciated.
Thanks.
How do you use one of your own csv files as input?