TriGer detects modules of features that are densely associated across two omics layers measured on the same samples, for example gene expression and metabolite abundance. A module is a set of X features (first layer) and a set of Y features (second layer) such that the cross-omics associations between the two sets are strong and each set is coherent within its own layer. The method uses three matrices, the three graphs of the triple-graph model:
For a non-negative X-Y matrix \(W\), a row set \(A\) and a column set \(B\), the penalized density of the submatrix is
\[ d_\lambda(A, B) = \frac{\sum_{i \in A, j \in B} W_{ij}}{(|A|\,|B|)^{\lambda / 2}}, \]
and for a symmetric within-omics matrix \(S\) and a feature set \(A\) it is \(\sum_{i, j \in A} S_{ij} / |A|^{\lambda}\). The size penalty \(\lambda\), typically between 1 and 2, controls the size of the detected sets: higher values give smaller, denser sets.
TriGer finds modules in three steps:
The method is described in Yu, Lin and Chen (2026), Structured cross-omics interaction discovery with a triple-graph model, bioRxiv, doi:10.64898/2026.09.10.749540.
We simulate 120 samples with 200 genes and 80 metabolites. Two modules share latent factors across the layers:
All other features are independent noise.
set.seed(2026)
N <- 120
m <- 200
n <- 80
f1 <- rnorm(N)
f2 <- rnorm(N)
f3 <- rnorm(N)
genes <- matrix(rnorm(N * m), N)
mets <- matrix(rnorm(N * n), N)
genes[, 1:20] <- genes[, 1:20] + f1
genes[, 21:40] <- genes[, 21:40] + f2
mets[, 1:15] <- mets[, 1:15] + 0.7 * (f1 + f2)
genes[, 41:60] <- genes[, 41:60] + 0.8 * f3
mets[, 16:25] <- mets[, 16:25] + 0.8 * f3
dimnames(genes) <- list(paste0("sample", seq_len(N)),
paste0("gene", seq_len(m)))
dimnames(mets) <- list(paste0("sample", seq_len(N)),
paste0("met", seq_len(n)))Omics data in Bioconductor are usually stored in
SummarizedExperiment objects, with features in rows and
samples in columns.
se_genes <- SummarizedExperiment(assays = list(expression = t(genes)))
se_mets <- SummarizedExperiment(assays = list(abundance = t(mets)))
se_genes
#> class: SummarizedExperiment
#> dim: 200 120
#> metadata(0):
#> assays(1): expression
#> rownames(200): gene1 gene2 ... gene199 gene200
#> rowData names(0):
#> colnames(120): sample1 sample2 ... sample119 sample120
#> colData names(0):triger() accepts two SummarizedExperiment
objects or two numeric matrices with samples in rows. When both layers
carry sample names, the samples are matched by name. X_size
and Y_size give, for each side, the minimum number of
features a block must exceed to be kept and the number of features above
which that side is refined.
res <- triger(se_genes, se_mets, lambda1 = 1.3, lambda2 = 1.5,
lambda3 = 1.5, X_size = c(5, 30), Y_size = c(5, 30))
length(res$modules)
#> [1] 2
vapply(res$modules, function(b) c(X = length(b$X), Y = length(b$Y)),
numeric(2))
#> [,1] [,2]
#> X 34 20
#> Y 15 9Each module contains the indices and names of its features and the penalized density of the step-1 block.
mod <- res$modules[[1]]
head(mod$X_names)
#> [1] "gene10" "gene5" "gene11" "gene13" "gene19" "gene8"
mod$Y_names
#> [1] "met1" "met2" "met3" "met4" "met5" "met6" "met7" "met8" "met9"
#> [10] "met10" "met11" "met12" "met13" "met14" "met15"The first step-1 block contained more than 30 genes, so its X side
was refined. Grouping its genes by the simulated factor shows the two
within-omics communities, which appear one after the other in
mod$X:
truth <- cut(mod$X, c(0, 20, 40, 60, m), labels = c("f1", "f2", "f3",
"noise"))
rle(as.character(truth))
#> Run Length Encoding
#> lengths: int [1:2] 18 16
#> values : chr [1:2] "f1" "f2"The second module recovers genes 41-60 and most of metabolites 16-25:
plot3in1_v1() shows the cross-omics correlations of the
module features as a square heatmap, with the within-omics correlations
of the same features as triangles above (X) and to the right (Y). The
red boxes mark the modules.
R <- res$R
x_idx <- seq_len(res$m)
y_idx <- res$m + seq_len(res$n)
plot3in1_v1(R[x_idx, x_idx], R[y_idx, y_idx], R[x_idx, y_idx],
res$modules, line = TRUE, step = c(10, 5), bar = TRUE,
cbar_pos = "right")Higher penalties give smaller, denser blocks. Typical values are
1.1-1.6 for the cross-omics penalty \(\lambda_1\) and 1.4-1.9 for the
within-omics penalties \(\lambda_2\)
and \(\lambda_3\). With correlation
matrices, a single feature has within-omics density 1, so a large
within-omics penalty can split a small block into single features; these
are discarded (argument min_community_size of
greedy_3step()), and if no community remains the side is
kept unrefined.
sizes <- vapply(c(1.1, 1.3, 1.5), function(l1) {
r <- triger(se_genes, se_mets, lambda1 = l1, lambda2 = 1.5,
lambda3 = 1.5, X_size = c(5, 30), Y_size = c(5, 30))
b <- r$modules[[1]]
c(lambda1 = l1, X = length(b$X), Y = length(b$Y))
}, numeric(3))
sizes
#> [,1] [,2] [,3]
#> lambda1 1.1 1.3 1.5
#> X 39.0 34.0 26.0
#> Y 15.0 15.0 15.0The steps of TriGer are also available separately, which is useful when the association matrices are computed by other means, for example from partial correlations or after covariate adjustment.
triger_association() computes the signed correlation
matrix R and the -log10 p-value matrix P over
the features of both layers.greedy_3step() runs the three steps on precomputed
P and R.greedy_peeling_XY_one() and
greedy_peeling_XY_all() peel blocks from a cross-omics
matrix; greedy_peeling_X_one() and
greedy_peeling_X_all() peel communities from a within-omics
matrix.sort_result() and sort_result_XandY()
order the features within blocks.sessionInfo()
#> R version 4.6.2 (2026-10-29)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 26.04.1 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [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: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats4 stats graphics grDevices utils datasets methods
#> [8] base
#>
#> other attached packages:
#> [1] SummarizedExperiment_1.43.0 Biobase_2.73.2
#> [3] GenomicRanges_1.65.4 Seqinfo_1.3.2
#> [5] IRanges_2.47.5 S4Vectors_0.51.10
#> [7] BiocGenerics_0.59.13 generics_0.1.4
#> [9] MatrixGenerics_1.25.0 matrixStats_1.5.0
#> [11] TriGer_0.99.0 BiocStyle_2.41.0
#>
#> loaded via a namespace (and not attached):
#> [1] Matrix_1.7-6 jsonlite_2.0.0 compiler_4.6.2
#> [4] BiocManager_1.30.27 jquerylib_0.1.4 yaml_2.3.12
#> [7] fastmap_1.2.0 lattice_0.23-1 XVector_0.53.0
#> [10] R6_2.6.1 S4Arrays_1.13.3 knitr_1.52
#> [13] DelayedArray_0.39.8 maketools_1.3.2 bslib_0.12.0
#> [16] rlang_1.3.0 cachem_1.1.0 xfun_0.62
#> [19] sass_0.5.0 sys_3.4.3 otel_0.3.0
#> [22] SparseArray_1.13.5 cli_3.6.6 digest_0.6.39
#> [25] grid_4.6.2 lifecycle_1.0.5 evaluate_1.0.5
#> [28] buildtools_1.0.0 abind_1.4-8 rmarkdown_2.32
#> [31] tools_4.6.2 htmltools_0.5.9