| Title: | Network-Based Integration of Multi-Omics Data Using Sparse CCA |
|---|---|
| Description: | Provides an end-to-end workflow for integrative analysis of two omics layers using sparse canonical correlation analysis (sCCA), including sample alignment, feature selection, network edge construction, and visualization of gene-metabolite relationships. The underlying methods are based on penalized matrix decomposition and sparse CCA (Witten, Tibshirani and Hastie (2009) <doi:10.1093/biostatistics/kxp008>), with design principles inspired by multivariate integrative frameworks such as mixOmics (Rohart et al. (2017) <doi:10.1371/journal.pcbi.1005752>). |
| Authors: | Prem Prashant Chaudhary [aut, cre] |
| Maintainer: | Prem Prashant Chaudhary <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-08 07:59:55 UTC |
| Source: | https://github.com/cran/OmicNetR |
Ensures that X and Y matrices have matching samples in the exact same order.
align_omics(X, Y)align_omics(X, Y)
X |
Matrix or data frame (Samples x Features). |
Y |
Matrix or data frame (Samples x Features). |
A list containing the aligned X and Y matrices.
Generates synthetic, linked RNA-seq and Metabolomics datasets.
generate_dummy_omics( n_samples = 50, n_genes = 1000, n_metabolites = 200, n_linked = 10 )generate_dummy_omics( n_samples = 50, n_genes = 1000, n_metabolites = 200, n_linked = 10 )
n_samples |
Number of samples (rows). |
n_genes |
Number of genes (columns in X). |
n_metabolites |
Number of metabolites (columns in Y). |
n_linked |
Number of features linked by a hidden variable. |
A list containing X (RNA-seq matrix), Y (Metabolomics matrix), and metadata.
Fits a sparse PLS model in canonical mode to identify shared variation.
omic_scca(X, Y, n_components = 2, penalty_X = 0.9, penalty_Y = 0.9)omic_scca(X, Y, n_components = 2, penalty_X = 0.9, penalty_Y = 0.9)
X |
Normalized RNA-seq matrix (Samples x Features). |
Y |
Normalized Metabolomics matrix (Samples x Features). |
n_components |
Number of components. |
penalty_X |
Sparsity for X (0 to 1, where 1 is most sparse). |
penalty_Y |
Sparsity for Y (0 to 1, where 1 is most sparse). |
An object of class "OmicNetR_sCCA" (a named list) with:
canonical_correlations: numeric vector of per-component correlations/variance explained from the fitted model.
loadings: list with matrices X and Y (feature weights) for each component.
variates: list with matrices X and Y (sample scores) for each component.
penalties: list with penalty_X and penalty_Y used to set sparsity.
A simulated multi-omics dataset included in the OmicNetR package. This dataset is intended for demonstrating data alignment, sparse CCA analysis, and network visualization functions.
omics_exampleomics_example
A list with the following components:
A numeric matrix of gene expression values (samples in rows, genes in columns).
A numeric matrix of metabolite abundances (samples in rows, metabolites in columns).
The dataset is small by design and should not be used for biological inference. It is provided solely for examples, vignettes, and unit testing.
Simulated data generated within the OmicNetR package.
Optimized version using Base-R igraph engine to prevent memory exhaustion.
plot_bipartite_network( net_data, gene_color = "#1F77B4", metabolite_color = "#FF7F0E", layout_type = "fr" )plot_bipartite_network( net_data, gene_color = "#1F77B4", metabolite_color = "#FF7F0E", layout_type = "fr" )
net_data |
The edge list data frame from scca_to_network(). |
gene_color |
Color for gene nodes. |
metabolite_color |
Color for metabolite nodes. |
layout_type |
igraph layout to use (default "fr"). |
A graph object (invisibly).
Visualizes the correlation matrix with a gradient color scale.
plot_correlation_heatmap(scca_model, X, Y, top_n = 20)plot_correlation_heatmap(scca_model, X, Y, top_n = 20)
scca_model |
The result object from omic_scca(). |
X |
Aligned RNA-seq matrix. |
Y |
Aligned Metabolomics matrix. |
top_n |
Number of top features from each omic to include. |
(Invisible) A numeric matrix of correlations between the selected features in X and Y.
Visualizes top feature importance in a radial layout.
plot_pathway_circle(scca_model, top_features = 40, pathway_db = "KEGG")plot_pathway_circle(scca_model, top_features = 40, pathway_db = "KEGG")
scca_model |
The result object from omic_scca(). |
top_features |
Number of most weighted features to map. |
pathway_db |
Conceptual database name for labeling. |
A ggplot2 object.
Generates an edge list for network plotting from sCCA loadings.
scca_to_network(scca_model, comp_select = 1, weight_threshold = 0.05)scca_to_network(scca_model, comp_select = 1, weight_threshold = 0.05)
scca_model |
The result object from omic_scca(). |
comp_select |
Which canonical component to use. |
weight_threshold |
Minimum absolute product of weights to include an edge. |
A data.frame of edges with one row per gene-metabolite pair passing the threshold, containing:
Gene: character, feature name from X.
Metabolite: character, feature name from Y.
Weight_Product: numeric, product of the selected loadings (edge weight).
Interaction_Type: character, "Positive" or "Negative" based on the sign of Weight_Product.