| Title: | Multi-omics Integration and Visualization Framework |
|---|---|
| Description: | OmniCorr is an R package for correlation-based integration and visualization of multi-omics datasets, including transcriptomics, metatranscriptomics, metagenomics, metaproteomics, and associated sample metadata. The package computes pairwise correlations between independently processed omics layers and provides flexible tools for organizing and visualizing cross-omics associations using aligned heatmaps and optional network-style visualizations. OmniCorr is designed to complement existing preprocessing and network inference workflows rather than replace them. |
| Authors: | Shashank Gupta [aut] (ORCID: <https://orcid.org/0000-0001-8839-7003>), Veronica Quarato [aut, cre] (ORCID: <https://orcid.org/0009-0008-4049-9746>), Wanxin Lai [aut] |
| Maintainer: | Veronica Quarato <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.0 |
| Built: | 2026-09-24 15:24:37 UTC |
| Source: | https://github.com/BiocStaging/OmniCorr |
This function calculates the correlation matrix between the columns of two data frames.
calculate_correlations( df1, df2, method = "pearson", adjust_method = "fdr", use = "all.obs", show_significance = "stars" )calculate_correlations( df1, df2, method = "pearson", adjust_method = "fdr", use = "all.obs", show_significance = "stars" )
df1 |
A data frame or matrix containing the first set of variables to be correlated. Rows are samples, columns are variables (e.g., genes, proteins, metabolites). |
df2 |
A data frame or matrix containing the second set of variables to be correlated. Rows are samples, columns are variables. |
method |
The correlation method to be used. Default is "pearson". Other options include "spearman" and "kendall". |
adjust_method |
Method for adjusting the p-values for multiple
testing. Default is "fdr". If "none", no adjustment is applied.
Supports all methods from |
use |
Handling of missing data. One of "all.obs" or "pairwise.complete.obs". |
show_significance |
How to represent significance in the output. One of "stars", "p_value", or "correlation". |
Pearson and Spearman correlations are computed using
WGCNA::corAndPvalue for efficiency.
Kendall correlation uses cor.test in a loop and may be slow
for large datasets.
A list containing:
correlation |
Matrix of correlation coefficients (rounded to 3 decimals). |
p_value |
Matrix of raw p-values. |
p_value_adj |
Matrix of adjusted p-values. |
signif_matrix |
Matrix of significance stars, p-values, or correlations. |
data(Transcriptomics) data(Metagenomics) result_list <- calculate_correlations( df1 = Transcriptomics, df2 = Metagenomics, show_significance = "p_value" )data(Transcriptomics) data(Metagenomics) result_list <- calculate_correlations( df1 = Transcriptomics, df2 = Metagenomics, show_significance = "p_value" )
Ensures that two data frames or matrices contain identical samples and reorders the second dataset to match the first.
CheckSampleOrder(df1, df2)CheckSampleOrder(df1, df2)
df1 |
A data frame or matrix with samples in rows (reference order) |
df2 |
A data frame or matrix with samples in rows |
A list with df1 and df2 reordered to have identical rownames and order
df1 <- matrix(1:6, nrow = 3, dimnames = list(c("S1", "S2", "S3"), c("A", "B"))) df2 <- matrix(7:12, nrow = 3, dimnames = list(c("S3", "S1", "S2"), c("C", "D"))) result <- CheckSampleOrder(df1, df2) result$df2df1 <- matrix(1:6, nrow = 3, dimnames = list(c("S1", "S2", "S3"), c("A", "B"))) df2 <- matrix(7:12, nrow = 3, dimnames = list(c("S3", "S1", "S2"), c("C", "D"))) result <- CheckSampleOrder(df1, df2) result$df2
This data frame contains information about the samples used in the study.
metadatametadata
A data frame with 14 variables:
Body weight of the sample in grams.
Length of the sample in centimeters.
Sex of the sample.
Structural condition of the gut of the sample.
Light coloration of the gut of the sample.
Presence or absence of anus bleeding in the sample.
Presence or absence of gut bleeding in the sample.
Score of fat deposition in the sample.
Score of heart condition in the sample.
Presence or absence of soft liver in the sample.
Presence or absence of patchy liver in the sample.
Score of liver condition in the sample.
Hepatosomatic index of the sample.
Cardiosomatic index of the sample.
A data frame containing sample metadata.
Information was collected from the study samples.
# View the first few rows of the metadata head(metadata)# View the first few rows of the metadata head(metadata)
A processed metagenomics feature-abundance matrix used as an example input for OmniCorr.
data(Metagenomics)data(Metagenomics)
A numeric matrix with samples as rows and features as columns.
Derived from published cow rumen multi-omics analysis.
A processed metatranscriptomics feature-abundance matrix used as an example input for OmniCorr.
data(Metatranscriptomics)data(Metatranscriptomics)
A numeric matrix with samples as rows and features as columns.
Derived from published cow rumen multi-omics analysis.
Integrates multiple omics layers by computing correlations between a reference omics dataset and multiple comparison layers and visualizing the results as aligned multi-panel heatmaps using ComplexHeatmap.
The reference layer is displayed as an expression heatmap with optional clustering of features and samples. Correlation heatmaps for comparison layers and metadata are aligned to the same reference feature order to ensure consistent interpretation across panels.
run_omnicorr( reference_layer, comparison_layers, metadata = NULL, reference_name = "Reference Layer", comparison_names = NULL, metadata_name = "Metadata", method = "pearson", adjust_method = "fdr", use = "all.obs", show_significance = "stars", cluster_reference_rows = TRUE, cluster_reference_columns = TRUE, show_row_names = TRUE, show_column_names = TRUE, font_size = 8, star_font_size = 8, verbose = TRUE )run_omnicorr( reference_layer, comparison_layers, metadata = NULL, reference_name = "Reference Layer", comparison_names = NULL, metadata_name = "Metadata", method = "pearson", adjust_method = "fdr", use = "all.obs", show_significance = "stars", cluster_reference_rows = TRUE, cluster_reference_columns = TRUE, show_row_names = TRUE, show_column_names = TRUE, font_size = 8, star_font_size = 8, verbose = TRUE )
reference_layer |
Numeric matrix/data.frame (samples x features). |
comparison_layers |
Named list of numeric matrices/data.frames. |
metadata |
Optional numeric matrix/data.frame (samples x variables). |
reference_name |
Title for the reference heatmap. |
comparison_names |
Optional titles for comparison heatmaps. |
metadata_name |
Title for metadata heatmap. |
method |
Correlation method: |
adjust_method |
P-value correction method ( |
use |
Missing value handling strategy ( |
show_significance |
|
cluster_reference_rows |
Cluster reference features. |
cluster_reference_columns |
Cluster reference samples. |
show_row_names |
Logical; display row labels. |
show_column_names |
Logical; display column labels. |
font_size |
Font size for row/column labels. |
star_font_size |
Font size for cell annotations. |
verbose |
Print progress messages. |
Invisibly returns a ComplexHeatmap::HeatmapList.
reference <- matrix( rnorm(20), nrow = 5, dimnames = list(paste0("S", 1:5), paste0("Gene", 1:4)) ) comparison <- matrix( rnorm(15), nrow = 5, dimnames = list(paste0("S", 1:5), paste0("Taxon", 1:3)) ) result <- run_omnicorr( reference_layer = reference, comparison_layers = list(Microbiome = comparison) )reference <- matrix( rnorm(20), nrow = 5, dimnames = list(paste0("S", 1:5), paste0("Gene", 1:4)) ) comparison <- matrix( rnorm(15), nrow = 5, dimnames = list(paste0("S", 1:5), paste0("Taxon", 1:3)) ) result <- run_omnicorr( reference_layer = reference, comparison_layers = list(Microbiome = comparison) )
A processed transcriptomics expression matrix used as an example input for OmniCorr. Rows correspond to samples and columns to transcript-level features.
data(Transcriptomics)data(Transcriptomics)
A numeric matrix with samples as rows and features as columns.
Derived from published cow rumen multi-omics analysis.