Hello, I have a simply singlecellexperiment object, and I have managed to make a shiny app using the iSEE package http://www.bioconductor.org/packages/release/bioc/html/iSEE.html
I made an app.R file to run the code that returns a shiny app, then I use runApp as you are supposed to do in the end of such a file, I am trying to upload it or deploy it and it's not working
library(BiocManager)
library(rsconnect)
options(repos = BiocManager::repositories())
library(shiny)
library(iSEE)
sce = readRDS("sce.RDS")
app <- iSEE(appTitle="test",sce)
if(interactive()){shiny::runApp(app)}
I get this error:
Error in shiny::runApp(app) :
Can't call runApp()
from within runApp()
. If your application code contains runApp()
, please remove it.
If I put just
iSEE(appTitle="test",sce)
It is able to load and deploy on my shiny apps account and it says "running", however I now get an "out of memory" error on the shinyapps server:
2020-10-08T09:12:21.153674+00:00 shinyapps[2969507]: aperm, apply, rowsum
2020-10-08T09:12:21.153674+00:00 shinyapps[2969507]:
2020-10-08T09:12:21.496053+00:00 shinyapps[2969507]: Loading required package: SingleCellExperiment
2020-10-08T09:12:26.698874+00:00 shinyapps[system]: Out of memory!
It's nice that this library works in my R session and local browser, but if I am unable to deploy the GUI app online, it is pretty useless.
I found out that the free version's bundle size is limited to 1GB ( https://docs.rstudio.com/shinyapps.io/applications.html ), and my app sce object is just around 0.9 GB, I will try to reduce the size and try again.
> format(object.size(sce), units = "GB")
[1] "0.9 Gb"
I reduced the memory size of my sce object to 0.6 GB but the error is still happening. It seems the memory size of "SingleCellExperiment" package is way too large and I suspect it imports some other sce-datasets that are very large, is there any way to route this issue?
Free services are often going to be limiting in one way or the other. If you have specific requirements and don't want to pay for a hosting service, you should consider self-hosting. You can deploy shiny apps using ShinyProxy. If you expect users to upload their data, note that there's a default limit to the size of files that can be uploaded to a shiny app. You can increase this limit in your app with options(shiny.maxRequestSize=X) where X is the new limit in bytes.