Web best practice for returning python/R plots (previously generated or dynamically generated if that is best practice) based on user input?
1
0
Entering edit mode
8.5 years ago
kbun ▴ 10

I would like to develop a web database that allows users to input a single query (let's say one gene). Then I'd like to return a graph of expressions of that gene (not what I actually want, but it is the same for the purpose of the question). Would I store the expression data in SQL and then dynamically generate the plot each time? Or do I somehow store the plots and then call on them based on their IDs.

Gtexportal.org is a webserver that performs this exactly the way that I'm looking for.

web gene plot R python • 1.8k views
ADD COMMENT
0
Entering edit mode

You want your web site to offer a decent user experience so if it takes too long to generate the page then it's better to store some pre-computed plots. When there's a combinatorial explosion of possible plots to return, you may not be able to avoid generating content dynamically. However, if it's a matter of one plot per gene then I would decide based on the speed gain in page loading time.

ADD REPLY
0
Entering edit mode

Why does it has to be R/Python? For a web project I would maybe consider javascript.

ADD REPLY
2
Entering edit mode
8.5 years ago

Seems to me most efficient to store the data and dynamically generate plots, I would have a look at Shiny in R for this.

ADD COMMENT

Login before adding your answer.

Traffic: 1616 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6