Type: Package
Title: Network-Based Integration of Multi-Omics Data Using Sparse CCA
Version: 0.1.1
Author: Prem Prashant Chaudhary [aut, cre]
Maintainer: Prem Prashant Chaudhary <chaudharyp2@nih.gov>
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>).
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: stats, graphics, grDevices, ggplot2, igraph
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), mixOmics
VignetteBuilder: knitr
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2026-01-01 19:28:41 UTC; chaudharyp2
Repository: CRAN
Date/Publication: 2026-01-08 19:30:14 UTC

Align Multi-Omic Datasets

Description

Ensures that X and Y matrices have matching samples in the exact same order.

Usage

align_omics(X, Y)

Arguments

X

Matrix or data frame (Samples x Features).

Y

Matrix or data frame (Samples x Features).

Value

A list containing the aligned X and Y matrices.


Generate Dummy Multi-Omics Data

Description

Generates synthetic, linked RNA-seq and Metabolomics datasets.

Usage

generate_dummy_omics(
  n_samples = 50,
  n_genes = 1000,
  n_metabolites = 200,
  n_linked = 10
)

Arguments

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.

Value

A list containing X (RNA-seq matrix), Y (Metabolomics matrix), and metadata.


Perform Sparse Canonical Correlation Analysis (sCCA)

Description

Fits a sparse PLS model in canonical mode to identify shared variation.

Usage

omic_scca(X, Y, n_components = 2, penalty_X = 0.9, penalty_Y = 0.9)

Arguments

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).

Value

An object of class "OmicNetR_sCCA" (a named list) with:


Example Multi-Omics Dataset

Description

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.

Usage

omics_example

Format

A list with the following components:

X

A numeric matrix of gene expression values (samples in rows, genes in columns).

Y

A numeric matrix of metabolite abundances (samples in rows, metabolites in columns).

Details

The dataset is small by design and should not be used for biological inference. It is provided solely for examples, vignettes, and unit testing.

Source

Simulated data generated within the OmicNetR package.


Plot Bi-partite sCCA Weight Network

Description

Optimized version using Base-R igraph engine to prevent memory exhaustion.

Usage

plot_bipartite_network(
  net_data,
  gene_color = "#1F77B4",
  metabolite_color = "#FF7F0E",
  layout_type = "fr"
)

Arguments

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").

Value

A graph object (invisibly).


Global Gene-Metabolite Correlation Heatmap

Description

Visualizes the correlation matrix with a gradient color scale.

Usage

plot_correlation_heatmap(scca_model, X, Y, top_n = 20)

Arguments

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.

Value

(Invisible) A numeric matrix of correlations between the selected features in X and Y.


Canonical Loading Pathway Circle Plot

Description

Visualizes top feature importance in a radial layout.

Usage

plot_pathway_circle(scca_model, top_features = 40, pathway_db = "KEGG")

Arguments

scca_model

The result object from omic_scca().

top_features

Number of most weighted features to map.

pathway_db

Conceptual database name for labeling.

Value

A ggplot2 object.


Convert sCCA Loadings to Network Edges

Description

Generates an edge list for network plotting from sCCA loadings.

Usage

scca_to_network(scca_model, comp_select = 1, weight_threshold = 0.05)

Arguments

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.

Value

A data.frame of edges with one row per gene-metabolite pair passing the threshold, containing: