This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Differential gene analysis from a javascript based web app

I have two subsets of cells and their gene expression in a web app written in javascript. I need a way now to determine which genes are differentially expressed between the groups. I searched for javascript libraries but found nothing, so I reasoned to try using OpenCPU to call an R script located on my server. How could I call R script on the server from my javascript- based app, receive several parameters in the script, and then send back the results to the front end?

Also asked here: https://bioinformatics.stackexchange.com/questions/5059/find-differentially-expressed-genes-from-a-web-app

javascript r deseq2

Javascript is not meant to do heavy duty analyses like this. R only runs on a server, maybe you can expose a web service to accept data for analysis and return analyzed results, but don't try to run R from a browser.

JavaScript is for client side processing, you don't want to rely on your client's processing power/browser stability/JS settings for data analysis.

What about server-side javascript? I have node.js on the server. Maybe there are any other libraries in other languages that could be accessed easily from javascript? Like C++, idk... I actually think that OpenCPU is the right way to go, I am just not sure how to call it on the server from my javascript app

Searching for "gene expression javascript webapp" leads me to many seemingly good hits, among them DEIVA: a web application for interactive visual analysis of differential gene expression profiles and UBiT2: a client-side web-application for gene expression data analysis. I am sure you can gather some ideas from these projects. Or maybe you want to use shiny for this, as in shinyGEO: a web-based application for analyzing gene expression omnibus datasets.

Only R shiny has a persistent always-listening server, which is what you need for R scripts on demand. You can write a PHP page that runs an R script and returns the result, and call this PHP page from JavaScript, if you'd like. Just be aware that parameters and results need to be passed as plain text (say JSON) and it will open your server wide to bot attacks that can throw random data at the PHP page running the R process.

0 answers

No answers yet.

Log in to answer this question.