omXplore: a versatile series of Shiny apps to explore ‘omics’ data (original) (raw)

Introduction

The omXplore package offers a series of built-in plots dedicated to the visualization and the analysis of *omics (genomic, transcriptomics, proteomics) data. As for several R packages available in Bioconductorfor exploring omics-like datasets, omXplore is based on Shiny to make those plots easily available in a web application. Four popular Bioconductor data objects are currently supported:SummarizedExperiment, MultiAssayExperiment, MSnset andQFeatures.It is also possible to use data.frame or matrix (or lists of) which contains quantitative data tables (rows for features and columns for samples).

All these formats are automatically converted into an internal S4 class which is an enriched version of the MultiAssayexperiment class. This process is invisible to the end-user.

The package omXplore was created to be versatile, reusable and scalable. It differs from similar R packages in two main points:

Features

omXplore provides a graphical user interface using the Shiny and thehighcharter packages for the following visualizations:

For developers or users who wants to enhance their application, additional features include:

Installation

To install this package, start R (version “4.3”) and enter:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("omXplore")

This will also install dependencies.

It is also possible to install omXplore from Github:

library(devtools)
install_github('prostarproteomics/omXplore')

Then, load the package into R environment:

library("omXplore")

Enriching native MultiAssayExperiment

The internal data struture used in omXplore is based on the classMultiAssayExperimentswhich is enriched with specific slots needed to create built-in plots. The plots display statistical information about data contained in the SummarizedExperiment slots of a dataset.

Some items are added to the metadata of the instance of MultiAssayExperiment and to each of the instances of SummarizedExperiment.

Additional info in MultiAssayExperiment

Currently, there is no custom slot in the metadata of the mae contains the following additional items (in the slot names other):

data(vdata)
MultiAssayExperiment::metadata(vdata)
## $other
## list()

Additional info in SummarizedExperiment

The metadata of each SummarizedExperiment dataset contains the following items:

data(vdata)
MultiAssayExperiment::metadata(vdata[[1]])
## $pkg_version
## NULL
## 
## $type
## [1] "protein"
## 
## $colID
## [1] "protID"
## 
## $proteinID
## [1] "protID"
## 
## $cc
## $cc[[1]]
## 1 x 1 sparse Matrix of class "dgCMatrix"
##        proteinID_1
## prot_1           1
## 
## $cc[[2]]
## 1 x 1 sparse Matrix of class "dgCMatrix"
##        proteinID_2
## prot_2           1
## 
## $cc[[3]]
## 1 x 1 sparse Matrix of class "dgCMatrix"
##        proteinID_3
## prot_3           1
## 
## $cc[[4]]
## 1 x 1 sparse Matrix of class "dgCMatrix"
##        proteinID_4
## prot_4           1
## 
## $cc[[5]]
## 1 x 1 sparse Matrix of class "dgCMatrix"
##        proteinID_5
## prot_5           1

The adjacencyMatrix (when exists) is stored as a DataFrame in the rowData() of a SummarizedExperiment itemµ.

All modules are self-contained in the sense that it is not necessary to manipulate datasets to view the plots. The information described above are given only to discover the slots used if the user wants to enrich its dataset before using omXplore. >>>>>>> 14775302f522d3b419e552fe13e02b3f42189311

All modules are self-contained in the sense that it is not necessary to manipulate datasets to view the plots. The information described above are given only to discover the slots used if the user wants to enrich its dataset before using omXplore.

Using omXplore

The package omXplore offers a collection of standard plots written as Shiny modules. The main app is a Shiny module itself which displays the plots of each module.

This section describes how to view built-in plots and the main app ofomXplore.

Individual built-in plots

The list of plots available in the current R session via omXplore can be obtained with:

listPlotModules()
## [1] "omXplore_cc"          "omXplore_corrmatrix"  "omXplore_density"    
## [4] "omXplore_heatmap"     "omXplore_intensity"   "omXplore_pca"        
## [7] "omXplore_tabExplorer" "omXplore_variance"

By default, this function lists the built-in modules and the external modules compliant with omXplore.

Each of these functions is a Shiny app implemented as a module and can be launched in a standalone mode or embedded in another shiny app (as it is the case with the main UI of omXplore or inserted in a third party Shiny app).

Most of these functions analyse the data contained in an Experiment of the dataset (an instance of the class SummarizedExperiment). For a sake of simplicity, they all have the same two parameters: (1) the dataset in any (compatible) format (See the help page of the plot functions for details) and (2) the indice of the assay to analyse (SeeMultiAssayExperiment).

Internally, each function builds the enriched instance of MAE used inside omXplore then show the plot for the assay which has been specified in parameters.

data(sub_R25)
app <- omXplore_density(sub_R25, 1)
shiny::runApp(app)

Note: this code to run a shiny app follows the recommendations of Bioconductor on Running Shiny apps.

(#fig:omXplore_density_png)Plot generated by the module omXplore_density()

Main UI

As it is 9described in the previous section, omXplore have several built-in plots. And it may be fastidious to launch each plot function one after one to completely analyze a dataset.

For that purpose, omXplore has another shiny app, calledview_dataset() which acts as a hub for plots to facilitate the analyse of the different assays in a dataset. It is launched as follows:

data(sub_R25)
app <- view_dataset(sub_R25)
shiny::runApp(app)

The resulting UI is the following:

(#fig:example_view_dataset_nomodal_png)omXplore interactive interface with modal.

The interface is divided in three parts.

(A) Choosing the assay

A widget let the user select one of the experiments contained in the dataset.

(B) Select which plot to display

A series of clickable vignettes which represent the different plots available. When the user clicks on a vignette, the corresponding plot is displayed (See are C).

(C) Viewing the plots

The plots are displayed in the same window as the UI (below the vignettes) or in a modal window, depending of the option used to launch the Shinyp app (See ?view_dataset).

(#fig:view_dataset_nomodal_png)omXplore interactive interface with modal.

When a plot is displayed, it shows the data corresponding to the dataset selected in the widget (of the left side). If this dataset is changed, the plot is automatically updated with the data of the new dataset.

Session information

sessionInfo()
## R version 4.5.0 RC (2025-04-04 r88126)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.2 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] omXplore_1.2.0   BiocStyle_2.36.0
## 
## loaded via a namespace (and not attached):
##   [1] splines_4.5.0               later_1.4.2                
##   [3] bitops_1.0-9                tibble_3.2.1               
##   [5] preprocessCore_1.70.0       xts_0.14.1                 
##   [7] XML_3.99-0.18               shinyjqui_0.4.1            
##   [9] factoextra_1.0.7            lifecycle_1.0.4            
##  [11] doParallel_1.0.17           lattice_0.22-7             
##  [13] MASS_7.3-65                 flashClust_1.01-2          
##  [15] MultiAssayExperiment_1.34.0 dendextend_1.19.0          
##  [17] backports_1.5.0             magrittr_2.0.3             
##  [19] limma_3.64.0                sass_0.4.10                
##  [21] rmarkdown_2.29              jquerylib_0.1.4            
##  [23] yaml_2.3.10                 rlist_0.4.6.2              
##  [25] sm_2.2-6.0                  shinyBS_0.61.1             
##  [27] httpuv_1.6.15               MsCoreUtils_1.20.0         
##  [29] RColorBrewer_1.1-3          lubridate_1.9.4            
##  [31] multcomp_1.4-28             abind_1.4-8                
##  [33] GenomicRanges_1.60.0        purrr_1.0.4                
##  [35] AnnotationFilter_1.32.0     BiocGenerics_0.54.0        
##  [37] TH.data_1.1-3               sandwich_3.1-1             
##  [39] GenomeInfoDbData_1.2.14     IRanges_2.42.0             
##  [41] S4Vectors_0.46.0            ggrepel_0.9.6              
##  [43] MSnbase_2.34.0              highcharter_0.9.4          
##  [45] ncdf4_1.24                  codetools_0.2-20           
##  [47] DelayedArray_0.34.0         DT_0.33                    
##  [49] bs4Dash_2.3.4               tidyselect_1.2.1           
##  [51] Spectra_1.18.0              UCSC.utils_1.4.0           
##  [53] viridis_0.6.5               matrixStats_1.5.0          
##  [55] stats4_4.5.0                showtext_0.9-7             
##  [57] nipals_1.0                  jsonlite_2.0.0             
##  [59] vioplot_0.5.1               waiter_0.2.5               
##  [61] iterators_1.0.14            survival_3.8-3             
##  [63] emmeans_1.11.0              foreach_1.5.2              
##  [65] tools_4.5.0                 Rcpp_1.0.14                
##  [67] glue_1.8.0                  gridExtra_2.3              
##  [69] SparseArray_1.8.0           BiocBaseUtils_1.10.0       
##  [71] xfun_0.52                   MatrixGenerics_1.20.0      
##  [73] TTR_0.24.4                  GenomeInfoDb_1.44.0        
##  [75] dplyr_1.1.4                 BiocManager_1.30.25        
##  [77] fastmap_1.2.0               shinyjs_2.1.0              
##  [79] caTools_1.18.3              digest_0.6.37              
##  [81] timechange_0.3.0            R6_2.6.1                   
##  [83] mime_0.13                   estimability_1.5.1         
##  [85] colorspace_2.1-1            gtools_3.9.5               
##  [87] tidyr_1.3.1                 generics_0.1.3             
##  [89] data.table_1.17.0           PSMatch_1.12.0             
##  [91] httr_1.4.7                  htmlwidgets_1.6.4          
##  [93] S4Arrays_1.8.0              scatterplot3d_0.3-44       
##  [95] pkgconfig_2.0.3             gtable_0.3.6               
##  [97] impute_1.82.0               XVector_0.48.0             
##  [99] htmltools_0.5.8.1           sysfonts_0.8.9             
## [101] bookdown_0.43               MALDIquant_1.22.3          
## [103] multcompView_0.1-10         ProtGenerics_1.40.0        
## [105] clue_0.3-66                 scales_1.3.0               
## [107] Biobase_2.68.0              leaps_3.2                  
## [109] knitr_1.50                  MetaboCoreUtils_1.16.0     
## [111] rstudioapi_0.17.1           reshape2_1.4.4             
## [113] coda_0.19-4.1               visNetwork_2.1.2           
## [115] curl_6.2.2                  showtextdb_3.0             
## [117] cachem_1.1.0                zoo_1.8-14                 
## [119] stringr_1.5.1               KernSmooth_2.23-26         
## [121] parallel_4.5.0              mzID_1.46.0                
## [123] vsn_3.76.0                  pillar_1.10.2              
## [125] grid_4.5.0                  vctrs_0.6.5                
## [127] gplots_3.2.0                pcaMethods_2.0.0           
## [129] promises_1.3.2              xtable_1.8-4               
## [131] cluster_2.1.8.1             evaluate_1.0.3             
## [133] mvtnorm_1.3-3               cli_3.6.4                  
## [135] compiler_4.5.0              rlang_1.1.6                
## [137] crayon_1.5.3                QFeatures_1.18.0           
## [139] affy_1.86.0                 plyr_1.8.9                 
## [141] fs_1.6.6                    stringi_1.8.7              
## [143] viridisLite_0.4.2           BiocParallel_1.42.0        
## [145] assertthat_0.2.1            munsell_0.5.1              
## [147] lazyeval_0.2.2              Matrix_1.7-3               
## [149] ggplot2_3.5.2               statmod_1.5.0              
## [151] FactoMineR_2.11             shiny_1.10.0               
## [153] SummarizedExperiment_1.38.0 mzR_2.42.0                 
## [155] igraph_2.1.4                broom_1.0.8                
## [157] affyio_1.78.0               bslib_0.9.0                
## [159] thematic_0.1.6              quantmod_0.4.27