Shiny app fails to deploy because of BiocParallel Bioconductor package

I've been trying to deploy a shiny app to shinyapps.io for the last few days and had a very hard time with a few points that were not clear to me. I've fixed the issues and successfully deployed my app now though, YAY! But I want to synthesize some of the solutions to my problems because I found that all of the information is available online but in disparate places and I want to provide a complete answer to all of the issues that I was having as I feel others might run into the same problems. Recommendations are welcome!

So my problems, as I understand them, stemmed from the fact that I'm trying to deploy from a windows computer and my app uses the Bioconductor package DESeq2, which has BiocParallel as a dependency. To further complicate things the current source package of BiocParallel is currently on version 1.18.0, but the most current windows binary is version 1.17.18.

At first I ran into an error of the same type as abbati and Igatto:

Error parsing manifest: Unable to determine package source for Bioconductor package BiocParallel: Repository must be specified
Execution halted

So I followed those examples and specified my repository to Bioconductor. I believe there are multiple ways of doing this (both above examples have slightly differing ways), but I did it with the following command directly in the console BEFORE I DEPLOY THE APP:

options(repos = c("CRAN" = "https://cran.rstudio.com/", "BioCsoft" = "https://bioconductor.org/packages/3.8/bioc", "BioCann" = "https://bioconductor.org/packages/3.8/data/annotation"))

getOption("repos")

Be sure to execute the getOption("repos") command to confirm that the proper repositories are specified. I want to be clear about the point to execute this directly in the console before attempting to deploy the app. This is because shinyapps.io sets the repository settings for each of your apps on its server by determining the current state on your local machine. If you put this in the app.R or ui.R script, it will do nothing, so don't include it in your script file. The only place that I found this information was this earlier topic also posted by abbati and I really wish that would have been more clear. Maybe I just missed it somewhere else that's more obvious?

One major problem solved, but this resulted in the issue specific to BiocParallel. The error that is thrown when I try to deploy with the above fix now looks like these reported by Meinizi.Z and keholsinger:

Error: Unhandled Exception: Child Task 123456789 failed: Error building image: Error fetching BiocParallel (1.17.18) source. Error downloading package source. Please update your BioConductor packages to the latest version and try again: <BioconductorPackageSource repo='
Execution halted

However, I was unable to get the most recent version 1.18.0 of the package on my computer regardless of what I tried and ultimately deploying the app would produce the same error. I think this is because the most current SOURCE for this package is not the same version as the most current BINARY that is available for windows. I suspect that this would not be a problem on a Linux or Mac machine, but I haven't tried it out yet. I also suspect that this will not be a problem sometime in the near, or far, future when a new version of the windows binary is eventually released and matches up to the most current copy for everyone else. I also don't have time to wait for that eventuality.

I did see a mention somewhere, don't remember where, that someone was able to solve their issue with an older version of R so I tried that. The current version of R is v3.6.0, so I downloaded R v3.5.3 and through some trial and error found that I also needed to point my repositories to the previous version of Bioconductor, version 3.8 (which I already included in the code at the beginning). Once you download the previous version of R you can run that in RStudio by holding the ctrl key when you open RStudio to select alternate versions of R, or by opening the global options and selecting the preferred version, then restarting RStudio.

There you have it, my solution in the end was to run RStudio with an old R version, specify the proper repositories, do it in the console before deployment, and use the proper repository versions for the version of R that is used. These solutions might be obvious to some people, but they weren't to me. I also think that this solution might be useful to people even if their having issues with different Bioconductor packages. In addition, there may be better solutions to these out there, this is just the only thing that's worked for me so far. Any additional comments are welcome and I really hope this is useful to others!

Cheers!
Ryan

5 Likes

@bioryguy Congrats on getting your app deployed and thanks for sharing your experience!

1 Like