Description

This library aims to provide R shiny apps developers of the Institut Curie with different modules witch can be used as bricks to build bigger shiny apps.

Installation

  renv::init("path_to_your_app_folder/").

This should install the library dependancies.

install.packages("path_to_bioshiny_module_library_folder/", type = "source", repos = NULL)

Call a module

To do so you have to call two functions, one in the server and the second in the UI part.

Server Part

In the CallModule function you stipulate the library module that you want to call (typically called ModuleNameServer), and an id for this specific call.

  server <- function(input, output, session) {
    observe({
    PCA <- callModule(module = DrawPCAServer2,id = "PCA1",
                     matrix = counts ,
                      metadata = metadata)
    })
}

NB : Some of the modules accept arguments of type reactiveValues. Description of the arguments are provided in the ModuleNameServer functions' help sections. This wad different modules can communicates and share data objects.

UI part

In the UI call the corresponding ModuleName UI function, with the matching id.

ui <- dashboardPage(
  dashboardHeader(title = "PCA Module Test"),
  dashboardSidebar(),
  dashboardBody(
    fluidPage(
    fluidRow(
      DrawPCAUI2("PCA1")
    ))
  )
)

Modules List

The current available modules can be test executing the whole code in the corresponding inst/Tests/run_dev_ModuleNameModule.R file.

Contact

If you have any question, suggestions or bug reports please contact pierre.gestraud@curie.fr and clement.benoit@curie.fr



bioinfo-pf-curie/bioshiny-modules-library documentation built on Dec. 19, 2021, 9:45 a.m.