Reconstruct Gene Networks Using Shiny

[This article was first published on Trestle Technology, LLC » R, 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.

Check out the application on Glimmer!  http://glimmer.rstudio.com/qbrc/grn/

 

We’ve been experimenting with RStudio’s new Shiny software as a way to quickly and easily create interactive, responsive web applications which are able to leverage complicated analytics back-ends built in the R programming language.

We created a simple interface which can infer the structure of an underlying Gene Regulatory information based on gene expression patterns; the application is available at http://glimmer.rstudio.com/qbrc/grn/. (At the time of writing, Shiny’s file upload functionality is highly unstable and may not work from your machine — hopefully improvements to the project will resolve the issues shortly.)

Technical Details

I’m using Shiny/Glimmer to handle all web traffic, and ENA to wrap GeneNet to do the actual network inference (more methods could easily be added later). I used D3′s Force Layout to provide some interactive network visualization — I don’t know that it’s really the most practical way to view the data, but it’s some fun eye-candy.

I had stumbled through a few un-documented features of Shiny (app-specific `www` directories, JS to handle custom Shiny outputs, fileInput() for uploading data, etc.) — if you find yourself in the same boat, all my source is available on Github here if anyone’s interested.

I had created a custom reactive function in Shiny to handle an adjacency matrix (the preferred format for the ENA package), which will translate the adjacency matrix into an adjacency list which can be properly handled by RJSONIO, which is how Shiny transfers data. I think created the client-side portion in Javascript which is able to parse that JSON and display it in a D3 Force-Directed Graph.

To leave a comment for the author, please follow the link and comment on their blog: Trestle Technology, LLC » R.

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)