Cattle case study: Host-microbiome correlations

OmniCorr developers

Overview

This vignette demonstrates the application of OmniCorr to cattle host–microbiome multi-omics data.

The analysis integrates six proteomics layers:

This vignette uses precomputed WGCNA module eigengenes to demonstrate the integration of microbial and host proteomics data using OmniCorr. Details about data processing and sample alignment are provided in the Data provenance section.

Data provenance

The module eigengenes used in this vignette were generated from the original cattle multi-omics datasets using the WGCNA workflow provided in Case_Study_2/Cattle_OmniCorr/Rumen_OmniCorr.Rmd.

WGCNA was performed separately for each omics layer. The resulting module eigengenes were aligned using sample identifiers, retaining the 20 samples shared across all six omics layers.

The processed eigengenes are distributed with OmniCorr as cattle_module_eigengenes.rds to make this vignette reproducible without rerunning the computationally intensive WGCNA analysis.

The original WGCNA workflow is retained in the project repository for reference and reproducibility.

Load the data

library(OmniCorr)

cattle_file <- system.file(
  "extdata",
  "cattle_module_eigengenes.rds",
  package = "OmniCorr",
  mustWork = TRUE
)

cattle_MEs <- readRDS(cattle_file)

sapply(cattle_MEs, dim)
#>      Archbac Ciliates Fungi Metazoa Liver Wall
#> [1,]      20       20    20      20    20   20
#> [2,]      27       31     7      15    68   92

Calculate correlations

We first calculate correlations between the archaeal/bacterial module eigengenes and the rumen digesta metazoan module eigengenes.

cor_results <- calculate_correlations(
  df1 = cattle_MEs$Archbac,
  df2 = cattle_MEs$Metazoa,
  method = "pearson",
  show_significance = "stars"
)

head(cor_results$correlation)
#>               MEgreenyellow MEsalmon MEyellow MEmagenta MEpurple MEturquoise
#> MEgreenyellow         0.221    0.676    0.447     0.621    0.315       0.522
#> MEred                 0.209    0.506    0.693     0.320    0.575       0.875
#> MEblack               0.505    0.518    0.735    -0.146   -0.001       0.225
#> MEdarkorange          0.532    0.473    0.495     0.156   -0.234      -0.044
#> MEbrown              -0.416   -0.528   -0.814     0.070   -0.270      -0.629
#> MEblue               -0.344   -0.832   -0.690    -0.459   -0.252      -0.544
#>               MEblack  MEtan  MEred MEblue MEbrown MEgreen MEcyan MEpink MEgrey
#> MEgreenyellow   0.015 -0.487 -0.241 -0.469  -0.888  -0.088 -0.579 -0.622  0.173
#> MEred          -0.047 -0.250 -0.008 -0.917  -0.858   0.067 -0.557 -0.467  0.572
#> MEblack        -0.553 -0.541  0.230 -0.520  -0.508   0.809  0.281  0.343 -0.072
#> MEdarkorange   -0.361 -0.662  0.031 -0.098  -0.503   0.596  0.228  0.088 -0.310
#> MEbrown         0.288  0.404 -0.060  0.873   0.758  -0.390  0.211  0.017 -0.288
#> MEblue          0.201  0.620  0.186  0.608   0.976  -0.093  0.471  0.433 -0.130

Integrate multiple omics layers

We use the archaeal/bacterial proteomics modules as the central reference layer and compare them with the other five layers.

comparison_layers <- cattle_MEs[
  c("Ciliates", "Fungi", "Metazoa", "Liver", "Wall")
]

run_omnicorr(
  reference_layer = cattle_MEs$Archbac,
  comparison_layers = comparison_layers
)
#> ==================================================
#> OmniCorr Multi-Omics Integration
#> ==================================================
#> Samples: 20
#> Reference Features: 27
#> Sample alignment verified
#> Clustering reference features...
#> Clustering samples...
#> Generating reference heatmap...
#> Computing correlations with Ciliates...
#> Computing correlations with Fungi...
#> Computing correlations with Metazoa...
#> Computing correlations with Liver...
#> Computing correlations with Wall...
#> Drawing final integrated heatmap...

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

Interpretation

The resulting heatmap visualizes correlations between archaeal/bacterial proteomics modules and modules from microbial and host proteomics layers.

Positive and negative correlations indicate associations between module eigengenes. These relationships may suggest coordinated biological processes but do not establish direct interactions or causality.

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