Prior-Informed Conditional Gaussian Graphical Models

Estimates Gaussian graphical models whose mean and precision matrix depend linearly on sample-level covariates, while integrating prior knowledge on the network structure. A typical application is the reconstruction of personalised protein-protein interaction networks from proteomics data, with clinical or demographic variables as covariates and interaction confidence scores from the 'STRING' database as prior knowledge. Prior knowledge enters through a weighted sparse-group lasso penalty that is applied only to the population-level network, so that covariate-specific changes remain entirely data-driven. Node-wise regressions are fitted with 'glmnet' and 'sparsegl'; the penalty and the structural hyperparameters are selected per node by the Bayesian information criterion of the least-squares refit (or, optionally, by its extended version, cross-validation or stability selection), the selected edges are refitted by least squares, and personalised networks can be predicted for new individuals from their covariates. Estimation runs sequentially, in parallel on a single machine, or as 'SLURM' array jobs on computing clusters. The method is described in Mapelli et al. (2026) .


prCGGM

Prior-informed conditional Gaussian graphical models for reconstructing personalised molecular networks, such as protein-protein interaction networks, from omics data.

prCGGM estimates a Gaussian graphical model whose mean and precision matrix depend linearly on subject-level covariates, Ω(X) = Δ₀ + Σₕ Xₕ Δₕ, and integrates prior knowledge on edges (for example 'STRING' confidence scores) through a weighted sparse-group lasso penalty applied only to the population-level network Δ₀. Covariate-specific changes Δₕ stay entirely data-driven. Personalised networks of new individuals are obtained from their covariates.

The method is described in:

Mapelli, A., Massi, M. C., Cuccuru, G., Di Angelantonio, E. and Ieva, F. (2026). Prior-informed conditional Gaussian graphical models: an application to protein interaction network reconstruction. arXiv:2606.31805.

Installation

install.packages("prCGGM")

Usage

library(prCGGM)
data(prcggm_example)

set.seed(1)
fit <- prcggm(prcggm_example$x,
              covariates = prcggm_example$covariates,
              prior = prcggm_example$prior)
summary(fit)
plot(fit)                        # baseline network
plot(fit, component = "x1_1")    # change associated with x1 = 1

# Personalised networks of new individuals
nets <- predict(fit, data.frame(x1 = factor(c("0", "1"))))
compare_networks(nets$Subject_1, nets$Subject_2, method = "frobenius")

Depending on the inputs, prcggm() fits a standard GGM (x only), a prior-weighted GGM (prior), a conditional GGM (covariates) or the full prior-informed conditional GGM (both). Node-wise regressions run sequentially, in parallel (ncores), or as SLURM array jobs with prcggm_slurm_prepare(), prcggm_node() and prcggm_slurm_collect().

Selection of the network

By default (since version 0.2.0), the penalty and the hyperparameters of each node-wise regression are chosen by the BIC of the least-squares refit (selection = "bic_relaxed"), the selected edges are refitted by least squares (refit = TRUE), and an edge is kept only if both of its node-wise regressions select it (symm_method = "AND"). The selection argument also offers the extended BIC, BIC on the penalised fit, cross-validation and stability selection. The guidelines of the paper:

Setting Recommended rule
n of 5000 or more selection = "bic_relaxed", symm_method = "AND" (default)
n around 1000 selection = "ebic_relaxed", symm_method = "OR"
P / n ≥ 0.5, with P = (p − 1)(q + 1) predictors per node regression selection = "stability_bic", symm_method = "OR"

selection = "cv_min", refit = FALSE, symm_method = "OR" reproduces version 0.1.0. See NEWS.md for all changes.

See vignette("prCGGM") for a complete walk-through.

Reproducing the paper

The scripts used for the simulation study and the UK Biobank application are available at https://github.com/AlessiaMapelli/Prior-informed-conditional-GGMs.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("prCGGM")

0.2.0 by Alessia Mapelli, 6 days ago


https://github.com/AlessiaMapelli/prCGGM


Report a bug at https://github.com/AlessiaMapelli/prCGGM/issues


Browse source code at https://github.com/cran/prCGGM


Authors: Alessia Mapelli [aut, cre] , Francesca Ieva [ths] , Politecnico di Milano [cph]


Documentation:   PDF Manual  


GPL-3 license


Imports glmnet, graphics, grDevices, parallel, sparsegl, stats, utils

Suggests corrplot, knitr, rmarkdown, testthat


See at CRAN