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 facilitates feature-level comparison across omics layers and generates aligned heatmap visualizations highlighting putative cross-omics associations.
OmniCorr focuses on:
Computing pairwise correlations between independently processed omics layers.
Organizing correlation results in a reproducible data structure.
Visualizing correlations using aligned, hierarchical heatmaps.
OmniCorr is not a preprocessing or network inference pipeline. Instead, it assumes that each omics layer has already been processed using appropriate domain-specific workflows, such as WGCNA for transcriptomics. This design allows OmniCorr to be used with different preprocessing and upstream analysis workflows.
With appropriate modification of the input datasets, OmniCorr can be adapted to different omics data types. Users can also customize the heatmap color schemes and other visualization settings.
Before using OmniCorr, users should ensure that:
Each omics dataset has been independently preprocessed.
Samples are matched across datasets.
Input matrices are numeric with samples as rows and features as columns.
Feature-level summaries, such as hub genes, pathways, or taxa, are provided as input when required by the analysis.
OmniCorr has been peer-reviewed and published in Bioinformatics Advances.
OmniCorr: An R package for visualizing putative host-microbiome interactions using multi-omics data. Bioinformatics Advances (2026). https://academic.oup.com/bioinformaticsadvances/advance-article/doi/10.1093/bioadv/vbag057/8488725
If you use OmniCorr in your research, please cite this article.
OmniCorr requires R (>= 4.6.0).
The development version can be installed from GitHub:
install.packages("pak")
pak::pak("veronicaquarato/OmniCorr")
OmniCorr is being prepared for submission to Bioconductor. Following acceptance, the package will be available through Bioconductor:
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("OmniCorr")
Some examples in this README use packages listed in Suggests, including pheatmap, cowplot, and ggplot2. These packages are not required for the core OmniCorr functions but can be installed if needed:
install.packages(c("pheatmap", "cowplot", "ggplot2"))
library(OmniCorr)
data(Metagenomics)
data(Transcriptomics)
data(Metatranscriptomics)
The example datasets included in OmniCorr are derived from typical upstream omics analysis workflows.
Metatranscriptomics input can be generated from:
blockwiseModules() from WGCNA for module detection.
chooseTopHubInEachModule() for hub feature selection.
The resulting object contains module-level summaries and representative hub features.
Other omics layers, such as metagenomics, may originate from functional annotation or pathway profiling workflows. OmniCorr does not enforce a specific preprocessing strategy.
All datasets must contain identical samples in the same order.
Check sample alignment:
all(rownames(Transcriptomics) == rownames(Metagenomics))
If sample order differs, use the CheckSampleOrder() helper function:
df_list <- CheckSampleOrder(Transcriptomics, Metagenomics)
Transcriptomics <- df_list[[1]]
Metagenomics <- df_list[[2]]
OmniCorr can be used in two complementary ways, depending on the level of control required:
| Workflow | Description | Best for |
|---|---|---|
| Manual workflow | Users perform clustering, correlation calculation, and heatmap construction step-by-step using individual OmniCorr helper functions. | Maximum control, method development, or custom visualization pipelines |
| Fully automated workflow | A single function run_omnicorr() performs the complete integration workflow automatically. |
Fast analysis, reproducible workflows, and standard analyses |
The following steps use OmniCorr to integrate transcriptomics and metagenomics data and visualize the results. First, perform hierarchical clustering of the transcriptomics data:
dendro <- hclust(
d = as.dist(1 - WGCNA::bicor(Transcriptomics, maxPOutliers = 0.05)),
method = "ward.D2"
)
tx_heatmap <- pheatmap::pheatmap(
t(Transcriptomics),
cluster_rows = dendro,
cluster_cols = FALSE,
show_rownames = FALSE,
main = "Transcriptomics"
)
This heatmap provides the structural backbone for aligning downstream correlation heatmaps.
Use the calculate_correlations() function from OmniCorr to calculate Pearson correlations between the transcriptomics and metagenomics data:
corr_mg <- calculate_correlations(
df1 = Transcriptomics,
df2 = Metagenomics,
show_significance = "stars"
)
corr_mt <- calculate_correlations(
df1 = Transcriptomics,
df2 = Metatranscriptomics,
show_significance = "stars"
)
Each call returns:
a correlation matrix
p-values
adjusted p-values
significance annotations
Create a color ramp for the heatmap using colorRampPalette() and RColorBrewer:
heatmap_colors <- colorRampPalette(
rev(RColorBrewer::brewer.pal(6, "RdBu"))
)(51)
Generate heatmaps of the correlations using pheatmap() with the dendrogram from Step 1:
hm_mg <- pheatmap::pheatmap(
corr_mg$correlation,
color = heatmap_colors,
cluster_rows = dendro,
cluster_cols = FALSE,
display_numbers = corr_mg$signif_matrix,
breaks = seq(-1, 1, length.out = 51),
show_rownames = FALSE,
legend = FALSE,
main = "Metagenomics"
)
hm_mt <- pheatmap::pheatmap(
corr_mt$correlation,
color = heatmap_colors,
cluster_rows = dendro,
cluster_cols = FALSE,
display_numbers = corr_mt$signif_matrix,
breaks = seq(-1, 1, length.out = 51),
show_rownames = TRUE,
legend = TRUE,
main = "Metatranscriptomics"
)
The cowplot package can be used to combine the heatmaps into a single figure:
cowplot::plot_grid(
tx_heatmap$gtable,
hm_mg$gtable,
hm_mt$gtable,
ncol = 3,
align = "h",
rel_widths = c(3, 1, 2)
)

OmniCorr can correlate omics features with phenotypic or environmental variables.
data(metadata)
all(row.names(metadata) == row.names(Transcriptomics))
corr_meta <- calculate_correlations(
df1 = Transcriptomics,
df2 = metadata,
use = "pairwise.complete.obs",
show_significance = "stars"
)
Generate the metadata correlation heatmap:
hm_meta <- pheatmap::pheatmap(
corr_meta$correlation,
color = heatmap_colors,
cluster_rows = dendro,
cluster_cols = FALSE,
display_numbers = corr_meta$signif_matrix,
breaks = seq(-1, 1, length.out = 51),
show_rownames = FALSE,
legend = FALSE,
main = "Environmental Variables"
)
The resulting heatmaps can be combined using cowplot:
cowplot::plot_grid(
hm_meta$gtable,
tx_heatmap$gtable,
hm_mg$gtable,
hm_mt$gtable,
ncol = 4,
align = "h",
rel_widths = c(1.5, 3.5, 1, 2)
)

OmniCorr provides a single high-level function, run_omnicorr(), that performs the complete integration workflow automatically.
The function internally performs:
Sample alignment validation.
Reference feature clustering, optional and enabled by default.
Pairwise cross-omics correlation calculation.
Multiple testing correction using false discovery rate (FDR) by default.
Significance annotation using stars, p-values, or correlation values.
Construction of aligned multi-panel heatmaps.
Run the full integration with one command:
run_omnicorr(
reference_layer = Transcriptomics,
reference_name = "Transcriptomics",
comparison_layers = list(
Metagenomics = Metagenomics,
Metatranscriptomics = Metatranscriptomics
),
metadata = metadata
)
Any omics dataset can be used as the reference layer. For example, to use metatranscriptomics as the reference:
run_omnicorr(
reference_layer = Metatranscriptomics,
reference_name = "Metatranscriptomics",
comparison_layers = list(
Transcriptomics = Transcriptomics,
Metagenomics = Metagenomics
),
metadata = metadata
)
Metadata are optional. OmniCorr can be run using only the reference and comparison omics layers:
run_omnicorr(
reference_layer = Transcriptomics,
reference_name = "Transcriptomics",
comparison_layers = list(
Metagenomics = Metagenomics,
Metatranscriptomics = Metatranscriptomics
)
)
The names displayed in the heatmaps can be customized using reference_name, comparison layer names, and metadata_name:
run_omnicorr(
reference_layer = Transcriptomics,
reference_name = "Host Gene Expression",
comparison_layers = list(
Microbiome = Metagenomics,
Microbial_Activity = Metatranscriptomics
),
metadata = metadata,
metadata_name = "Environmental Variables"
)
OmniCorr supports Pearson, Spearman, and Kendall correlation.
run_omnicorr(
reference_layer = Transcriptomics,
comparison_layers = list(
Metagenomics = Metagenomics,
Metatranscriptomics = Metatranscriptomics
),
metadata = metadata,
method = "spearman"
)
run_omnicorr(
reference_layer = Transcriptomics,
comparison_layers = list(
Metagenomics = Metagenomics,
Metatranscriptomics = Metatranscriptomics
),
metadata = metadata,
method = "kendall"
)
Users can control whether row or column labels are shown:
run_omnicorr(
reference_layer = Transcriptomics,
comparison_layers = list(
Metagenomics = Metagenomics,
Metatranscriptomics = Metatranscriptomics
),
metadata = metadata,
show_row_names = FALSE,
show_column_names = TRUE
)