[Bioc-devel] BiocParallel and Shiny
Hi. If you use the DoparParam backend for BiocParallel with doFuture::registerDoFuture(), then you have access to everything available in the 'future' ecosystem. This means you can use any of the available future parallel backends, plus near-live progress updates via the 'progressr' package. Progress signaled by 'progressr' can be rendered in Shiny. See https://progressr.futureverse.org/#biocparallelbplapply---parallel-lapply, for an example how to use BiocParallel on top of the future framework together with progress updates signaled by 'progressr'. See https://progressr.futureverse.org/reference/withProgressShiny.html for progressr::withProgressShiny(), which is a plug-in replacement for shiny::withProgress(). Run example("withProgressShiny", package = "progressr") for an example. I gave a short presentation on progressr, with a focus on its use together with future, at eRum 2020. The talk is available at https://www.jottr.org/2020/07/04/progressr-erum2020-slides/. It might give some more insight on how it all works. Hope this helps, Henrik
On Thu, Jul 7, 2022 at 11:51 AM Giulia Pais <giuliapais1 at gmail.com> wrote:
Hi, thanks for the reply. Yes I?ve looked at this article, it seems to me like I have to access to the ?status? of a worker in order to do that, correct? I mean, is there a way through BiocParallel interface in which I can receive a notification when a worker has finished a task? It is not clear to me how BiocParallel manages to update the progress bar internally ? I guess the mechanism is similar to the one I described: distribute workload ? when a worker has finished a task notify and update progress bar by one tick. I?m honestly not too practical with asynch task management in R, sorry. Thank you From: Vincent Carey <stvjc at channing.harvard.edu> Date: Thursday, July 7, 2022 at 11:40 To: Giulia Pais <giuliapais1 at gmail.com> Cc: bioc-devel at r-project.org <bioc-devel at r-project.org> Subject: Re: [Bioc-devel] BiocParallel and Shiny Interesting question. Have you looked at https://shiny.rstudio.com/articles/progress.html ...? There is also a file called progress.R in BiocParallel/R folder. Probably some new code needs to be written to connect information from the BiocParallel activities to the server so incProgress is run as needed. On Thu, Jul 7, 2022 at 4:48 AM Giulia Pais <giuliapais1 at gmail.com<mailto:giuliapais1 at gmail.com>> wrote: Hello, I have a question on the use of BiocParallel with Shiny: I would like to show a progress bar on the UI much like the standard progress bar that can be set in functions like bplapply() ? is it possible to do it and how? I haven?t found anything on the topic in the documentation unfortunately. Thanks in advance, Giulia Pais [[alternative HTML version deleted]]
_______________________________________________ Bioc-devel at r-project.org<mailto:Bioc-devel at r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel The information in this e-mail is intended only for th...{{dropped:18}}