19 Global association
The first step in multi-omic integration is exploratory: do the tables associate at all? Global association methods compare the overall variation in one table to that in another, without looking at individual features.
This chapter gives examples of three common approaches: the Mantel test, Procrustes analysis, and MiRKAT.
19.1 Data
As an example, we use the HintikkaXOData dataset (Section D.5) from Hintikka et al. (2021), in which rats were fed a high-fat or a low-fat diet, with or without prebiotics. The data is a MultiAssayExperiment (Ramos et al. 2017) (see Chapter 3) with three experiments from the same samples: microbial abundances, metabolite concentrations and biomarkers.
# Available experiments
experiments(mae)
## ExperimentList class object of length 3:
## [1] microbiota: TreeSummarizedExperiment with 12706 rows and 40 columns
## [2] metabolites: TreeSummarizedExperiment with 38 rows and 40 columns
## [3] biomarkers: TreeSummarizedExperiment with 39 rows and 40 columns# Microbiome data
getWithColData(mae, "microbiota")
## class: TreeSummarizedExperiment
## dim: 12706 40
## metadata(0):
## assays(1): counts
## rownames(12706): GAYR01026362.62.2014 CVJT01000011.50.2173 ...
## JRJTB:03787:02429 JRJTB:03787:02478
## rowData names(7): Phylum Class ... Species OTU
## colnames(40): C1 C2 ... C39 C40
## colData names(6): Sample Rat ... Fat XOS
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: NULL
## rowTree: NULL
## colLinks: NULL
## colTree: NULL# Metabolite data
getWithColData(mae, "metabolites")
## class: TreeSummarizedExperiment
## dim: 38 40
## metadata(0):
## assays(1): nmr
## rownames(38): Butyrate Acetate ... Malonate 1,3-dihydroxyacetone
## rowData names(0):
## colnames(40): C1 C2 ... C39 C40
## colData names(6): Sample Rat ... Fat XOS
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: NULL
## rowTree: NULL
## colLinks: NULL
## colTree: NULL# Biomarker data
getWithColData(mae, "biomarkers")
## class: TreeSummarizedExperiment
## dim: 39 40
## metadata(0):
## assays(1): signals
## rownames(39): Triglycerides_liver CLSs_epi ... NPY_serum
## Glycogen_liver
## rowData names(0):
## colnames(40): C1 C2 ... C39 C40
## colData names(6): Sample Rat ... Fat XOS
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: NULL
## rowTree: NULL
## colLinks: NULL
## colTree: NULLBefore the analysis, we preprocess both tables. The microbiome data is agglomerated to genus level and transformed to relative abundances. For the metabolites, we drop features with missing values, apply a log10 transformation, and standardize each metabolite.
# Microbiome
mae[["microbiota"]] <- agglomerateByRank(mae[["microbiota"]], rank = "Genus")
mae[["microbiota"]] <- transformAssay(
mae[["microbiota"]],
method = "relabundance"
)
# Metabolites
tse <- mae[["metabolites"]]
tse <- tse[rowSums(is.na(assay(tse, "nmr"))) == 0, ]
tse <- transformAssay(tse, assay.type = "nmr", method = "log10")
tse <- transformAssay(
tse,
assay.type = "log10", method = "standardize", MARGIN = "rows"
)
mae[["metabolites"]] <- tseAll three methods operate on sample-by-sample distances, so we calculate a dissimilarity matrix for each table: Bray-Curtis (Bray and Curtis 1957) for the microbiome and Euclidean for the metabolites. The samples are in the same order in both tables.
dist_mb <- getDissimilarity(
mae[["microbiota"]],
assay.type = "relabundance",
method = "bray"
)
dist_mt <- getDissimilarity(
mae[["metabolites"]],
assay.type = "standardize",
method = "euclidean"
)19.2 Mantel test
The Mantel test (Mantel 1967) correlates two distance matrices. If samples that are similar in microbiome composition are also similar in metabolite profiles, the correlation is positive. Significance is assessed with permutations.
library(vegan)
set.seed(123)
mantel(dist_mb, dist_mt, method = "spearman", permutations = 999)
##
## Mantel statistic based on Spearman's rank correlation rho
##
## Call:
## mantel(xdis = dist_mb, ydis = dist_mt, method = "spearman", permutations = 999)
##
## Mantel statistic r: 0.181
## Significance: 0.006
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.0906 0.1104 0.1332 0.1630
## Permutation: free
## Number of permutations: 99919.3 Procrustes analysis
Procrustes analysis rotates, scales, and reflects one ordination to match another as closely as possible. The permutation-based PROTEST (Peres-Neto and Jackson 2001) then tests whether the two ordinations agree more than expected by chance. Here, we compare the first two axes of principal coordinate analysis (PCoA) of each table.
pcoa_mb <- cmdscale(dist_mb, k = 2)
pcoa_mt <- cmdscale(dist_mt, k = 2)
set.seed(123)
res <- protest(pcoa_mb, pcoa_mt, permutations = 999)
res
##
## Call:
## protest(X = pcoa_mb, Y = pcoa_mt, permutations = 999)
##
## Procrustes Sum of Squares (m12 squared): 0.788
## Correlation in a symmetric Procrustes rotation: 0.46
## Significance: 0.001
##
## Permutation: free
## Number of permutations: 999The result can be visualized by plotting how much each sample shifts between the two ordinations (Figure 19.1).
plot(res)
19.4 Kernel test (MiRKAT)
MiRKAT is a kernel-based framework for testing associations between microbiome profiles and outcomes (Zhao et al. 2015). Its kernel RV (KRV) test (Zhan et al. 2017) assesses the association between the microbiome and a multivariate outcome, such as a metabolite table.
The original MiRKAT test takes a single outcome. By running it separately for each metabolite, we can see which metabolites are associated with the overall microbiome composition. Because we perform multiple tests, the p-values are adjusted for multiple testing (Benjamini and Hochberg 1995).
pvals <- apply(mat_mt, 2, function(y) {
MiRKAT(y = y, Ks = kernel_mb, out_type = "C", method = "davies")[["p_values"]]
})
padj <- p.adjust(pvals, method = "fdr")
res <- data.frame(p = pvals, p_adj = padj)
res <- res[order(res[["p_adj"]]), ]
res
## p p_adj
## Butyrate 0.000e+00 0.000e+00
## Glucose 0.000e+00 0.000e+00
## Nicotinate 3.292e-08 3.292e-07
## 1,3-dihydroxyacetone 3.752e-05 2.814e-04
## Uracil 1.385e-04 8.308e-04
## Propionate 1.107e-03 5.535e-03
## Glycerol 1.820e-03 7.801e-03
## Acetate 6.689e-03 2.041e-02
## Threonine 6.805e-03 2.041e-02
## Pyruvate 5.954e-03 2.041e-02
## Isovalerate 9.636e-03 2.628e-02
## Valerate 2.154e-02 5.385e-02
## Lactate 2.422e-02 5.588e-02
## Methionine 6.107e-02 1.309e-01
## Choline 9.073e-02 1.815e-01
## Formate 1.721e-01 3.036e-01
## Glycine 1.707e-01 3.036e-01
## Methylamine 2.487e-01 4.144e-01
## Phenylalanine 2.754e-01 4.348e-01
## Glutamate 3.967e-01 5.409e-01
## Ethanol 3.808e-01 5.409e-01
## Isoleucine 3.900e-01 5.409e-01
## Tyrosine 4.281e-01 5.584e-01
## Fumarate 5.536e-01 6.920e-01
## Proline 6.083e-01 7.150e-01
## Aspartate 6.197e-01 7.150e-01
## Trimethylamine 7.453e-01 8.281e-01
## Alanine 8.190e-01 8.775e-01
## Valine 9.466e-01 9.466e-01
## Succinate 9.466e-01 9.466e-01The next chapters investigate the associations between the omic layers in more detail.