How bartongroup/dexdash works
Project type and purpose
• This is an R package that implements a Shiny web application for interactive downstream analysis of differential-expression (DE) results.
• It uses modular Shiny components for plots, enrichment, feature lookup, and global controls.
• It relies on external functional-term data (GO, KEGG, Reactome) and the fenr package for enrichment.
Main architectural components
A. Presentation Layer (Shiny UI modules)
• mod_global_input: file‐upload and dataset selection controls
• mod_volma_plot: volcano & MA plot interface
• mod_feature_info: gene name/description lookup
• mod_feature_plot: expression pattern plots
• mod_enrichment: enrichment result tables/plots
• mod_communication: notification & messaging UI
• explorer.R: assembles UI layout with these modules
B. Application Layer (Server logic & utilities)
• Server functions in each module handle reactive inputs, call processing functions
• util.R: shared helper functions (data checks, reshaping)
• dex dash API functions:
– dexdash_set() creates the central data object
– download_feature_information() fetches annotations from inst/extdata/species.json or web
– download_functional_terms(), prepare_functional_terms() interface to fenr
C. Data Layer
• Input data frames:
– DE results, raw expression/abundance, experimental design, gene metadata
• Cached datasets in inst/extdata (species.json)
• Prepared functional terms (GO/KEGG/Reactome) stored in memory
D. External Services & Libraries
• fenr package for fast functional enrichment
• CRAN/Bioconductor for GO, KEGG, Reactome queries
• R/Shiny runtime environment
E. Dev & Deployment Infrastructure
• renv: reproducible package environment (dependencies)
• tests: testthat suite for app logic and data downloads
• vignettes: Quarto/SASS assets for documentation
Relationships and data flows
• User (Browser) → Shiny Server (presented by explorer.R)
• UI modules capture user actions → Server modules
• Server modules read the central dexset object + downloaded annotations → util & fenr calls → generate plots/tables
• Data download modules call external services or use inst/extdata → populate in‐memory data
• All modules reactively update UI in response to data changes
• Tests validate each stage (data loading, plotting, enrichment)
Architectural patterns and principles to highlight
• Modularization: each UI/Server piece encapsulated as its own Shiny module
• Single source of truth: dexset object built by dexdash_set()
• Layered separation: UI vs. processing vs. data vs. external