Introduction to OmniCorr

Introduction

OmniCorr is an R package for exploring associations between multiple omics datasets through correlation analysis and visualization.

The package integrates a reference omics layer with one or more comparison layers and optional sample metadata. It calculates correlations between features across datasets and visualizes the results as aligned heatmaps using the ComplexHeatmap package.

OmniCorr can be used to investigate potential relationships between different molecular layers, such as transcriptomics, proteomics, metabolomics, and metagenomics.

The main functions are:

The general workflow consists of:

  1. Preparing omics datasets with matching sample identifiers.
  2. Selecting a reference omics layer and one or more comparison layers.
  3. Calculating correlations between features.
  4. Visualizing the results using aligned heatmaps.

The resulting associations can help identify potentially related biological features, although correlations alone do not establish causal relationships.

Installation

OmniCorr is currently under review for inclusion in Bioconductor.

During development, the package can be installed from GitHub:

if (!requireNamespace("remotes", quietly = TRUE))
    install.packages("remotes")

remotes::install_github("veronicaquarato/OmniCorr")

Once OmniCorr is accepted and available in a Bioconductor release, it can be installed using:

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

BiocManager::install("OmniCorr")

Load the package:

library(OmniCorr)

Input data

OmniCorr accepts numeric matrices, data frames, and SummarizedExperiment objects.

For matrices and data frames, samples must be arranged in rows and features in columns. For SummarizedExperiment objects, features are stored in rows and samples in columns; OmniCorr automatically converts these objects to the required orientation.

All omics layers must contain the same samples in the same order. Sample identifiers should be consistent across datasets to ensure correct alignment.

For this example, we generate two small simulated omics datasets containing six samples.

set.seed(123)

samples <- paste0("Sample", 1:6)

reference_layer <- matrix(
  rnorm(6 * 5),
  nrow = 6,
  dimnames = list(samples, paste0("Gene", 1:5))
)

comparison_layer <- matrix(
  rnorm(6 * 4),
  nrow = 6,
  dimnames = list(samples, paste0("Metabolite", 1:4))
)

Calculate correlations

The calculate_correlations() function calculates correlations between features from two omics layers.

cor_results <- calculate_correlations(
  df1 = reference_layer,
  df2 = comparison_layer,
  method = "pearson",
  adjust_method = "fdr",
  show_significance = "stars"
)

cor_results$correlation
#>       Metabolite1 Metabolite2 Metabolite3 Metabolite4
#> Gene1       0.479      -0.379       0.169       0.469
#> Gene2       0.492      -0.146      -0.695       0.331
#> Gene3       0.038      -0.070      -0.261      -0.741
#> Gene4      -0.301       0.855      -0.476       0.219
#> Gene5       0.659      -0.103      -0.271       0.618

Positive correlations indicate that two features tend to increase together, whereas negative correlations indicate that one tends to decrease as the other increases. Correlations do not establish causation.

Multi-omics visualization

The run_omnicorr() function combines a reference omics layer with one or more comparison layers and visualizes the results as aligned heatmaps.

run_omnicorr(
  reference_layer = reference_layer,
  comparison_layers = list(Metabolomics = comparison_layer),
  reference_name = "Transcriptomics",
  method = "pearson",
  cluster_reference_rows = FALSE,
  cluster_reference_columns = FALSE
)
#> ==================================================
#> OmniCorr Multi-Omics Integration
#> ==================================================
#> Samples: 6
#> Reference Features: 5
#> Sample alignment verified
#> Generating reference heatmap...
#> Computing correlations with Metabolomics...
#> Drawing final integrated heatmap...

#> OmniCorr integration complete
#> ==================================================

The reference heatmap displays the reference features across samples, while the correlation heatmap shows associations between reference features and features from the comparison layer.

For a more detailed biological example using salmon multi-omics data, see the salmon_workflow vignette.

Session information

sessionInfo()
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.5 LTS
#> 
#> Matrix products: default
#> BLAS:   /home/biocbuild/bbs-3.24-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] OmniCorr_1.0.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] impute_1.88.0         gtable_0.3.6          circlize_0.4.18      
#>  [4] shape_1.4.6.1         rjson_0.2.23          xfun_0.62            
#>  [7] bslib_0.12.0          ggplot2_4.0.4         htmlwidgets_1.6.4    
#> [10] GlobalOptions_0.1.4   lattice_0.23-1        Cairo_1.7-0          
#> [13] vctrs_0.7.3           tools_4.6.1           generics_0.1.4       
#> [16] stats4_4.6.1          parallel_4.6.1        tibble_3.3.1         
#> [19] cluster_2.1.8.3       pkgconfig_2.0.3       Matrix_1.7-6         
#> [22] data.table_1.18.6.1   checkmate_2.3.4       RColorBrewer_1.1-3   
#> [25] S7_1.0.0              S4Vectors_0.52.0      lifecycle_1.0.5      
#> [28] stringr_1.6.0         compiler_4.6.1        farver_2.1.2         
#> [31] codetools_0.2-20      ComplexHeatmap_2.30.0 clue_0.3-68          
#> [34] htmltools_0.5.9       sass_0.5.0            yaml_2.3.12          
#> [37] preprocessCore_1.76.0 htmlTable_2.5.0       Formula_1.2-6        
#> [40] pillar_1.11.1         crayon_1.5.3          jquerylib_0.1.4      
#> [43] cachem_1.1.0          magick_2.9.1          Hmisc_5.3-1          
#> [46] iterators_1.0.14      rpart_4.1.27          foreach_1.5.2        
#> [49] tidyselect_1.2.1      digest_0.6.39         stringi_1.8.9        
#> [52] dplyr_1.2.1           splines_4.6.1         fastmap_1.2.0        
#> [55] grid_4.6.1            colorspace_2.1-4      cli_3.6.6            
#> [58] magrittr_2.0.5        base64enc_0.1-6       dichromat_2.0-1      
#> [61] survival_3.8-13       dynamicTreeCut_1.63-1 foreign_0.8-92       
#> [64] backports_1.5.1       scales_1.4.0          rmarkdown_2.32       
#> [67] matrixStats_1.5.0     otel_0.3.0            nnet_7.3-21          
#> [70] gridExtra_2.3.1       fastcluster_1.3.0     png_0.1-9            
#> [73] GetoptLong_1.1.1      evaluate_1.0.5        knitr_1.52           
#> [76] IRanges_2.48.0        doParallel_1.0.17     rlang_1.3.0          
#> [79] Rcpp_1.1.2            glue_1.8.1            BiocGenerics_0.60.0  
#> [82] rstudioapi_0.19.0     WGCNA_1.74            jsonlite_2.0.0       
#> [85] R6_2.6.1