Getting Started with NOVA
Zaoqu Liu
2026-01-26
Source:vignettes/getting_started.Rmd
getting_started.RmdIntroduction
NOVA (Network Of Versatile cell-cell communication Analysis) is a high-performance R package designed for inferring and visualizing ligand-receptor mediated cell-to-cell communication networks from single-cell and bulk transcriptomic data.
Key Features
- Comprehensive LR Database: Utilizes connectomeDB2020 with 2,293 literature-curated ligand-receptor pairs
- Specificity-weighted Scoring: Identifies biologically relevant communication signals
- Multi-species Support: 21 species via NCBI HomoloGene orthology mapping
- Seurat Integration: Native support for Seurat V4 and V5 objects
- High Performance: Vectorized operations with C++ acceleration
- Rich Visualization: Heatmaps, networks, chord diagrams, and more
Installation
# From R-universe (recommended)
install.packages("NOVA", repos = "https://zaoqu-liu.r-universe.dev")
# From GitHub
remotes::install_github("Zaoqu-Liu/NOVA")Quick Start
Simulating Example Data
For demonstration, we’ll create simulated single-cell expression data:
set.seed(42)
# Create expression matrix (genes x cells)
n_genes <- 500
n_cells <- 300
gene_names <- paste0("Gene", 1:n_genes)
cell_names <- paste0("Cell", 1:n_cells)
# Simulate sparse expression
expr <- matrix(0, nrow = n_genes, ncol = n_cells,
dimnames = list(gene_names, cell_names))
# Add expression for ~30% of entries
expressed <- sample(length(expr), size = length(expr) * 0.3)
expr[expressed] <- abs(rnorm(length(expressed), mean = 2, sd = 1))
# Convert to sparse matrix for efficiency
expr <- Matrix::Matrix(expr, sparse = TRUE)
# Create cluster annotation
clusters <- sample(c("T_cells", "B_cells", "Macrophages", "Fibroblasts"),
n_cells, replace = TRUE)
names(clusters) <- cell_names
annotation <- data.frame(cell = cell_names, cluster = clusters)Loading LR Database
# Load the curated ligand-receptor database
lr_db <- GetLRDatabase("lrc2p")
head(lr_db)
#> ligand receptor
#> <char> <char>
#> 1: A2M LRP1
#> 2: AANAT MTNR1A
#> 3: AANAT MTNR1B
#> 4: ACE BDKRB2
#> 5: ADAM10 EPHA3
#> 6: ADAM11 ITGA4
cat("Total LR pairs:", nrow(lr_db), "\n")
#> Total LR pairs: 2293Running NOVA Analysis
# Note: In real analysis, use actual gene symbols that match the LR database
# Here we simulate matching genes for demonstration
ligands <- unique(lr_db$ligand)[1:20]
receptors <- unique(lr_db$receptor)[1:20]
rownames(expr)[1:20] <- ligands
rownames(expr)[21:40] <- receptors
# Run NOVA
result <- ExtractEdges(
expression = expr,
annotation = annotation,
species = "human",
database = "lrc2p",
min_pct = 0.1
)
# View results
print(result)Working with Seurat Objects
NOVA seamlessly integrates with Seurat:
# Convert Seurat object to NOVA input
nova_input <- SeuratToNOVA(
seurat_obj,
assay = "RNA",
slot = "data",
cluster_col = "cell_type"
)
# Run analysis
result <- ExtractEdges(
expression = nova_input$expression,
annotation = nova_input$annotation,
species = "mouse"
)
# Store results back in Seurat object
seurat_obj <- AddNOVAResults(seurat_obj, result)Basic Visualization
Communication Heatmap
# Create heatmap of communication strength
PlotHeatmap(result, metric = "count")
PlotHeatmap(result, metric = "specificity")Network Graph
# Network visualization
PlotNetwork(result, layout = "circle")Session Info
sessionInfo()
#> R version 4.4.0 (2024-04-24)
#> Platform: aarch64-apple-darwin20
#> Running under: macOS 15.6.1
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
#>
#> locale:
#> [1] C
#>
#> time zone: Asia/Shanghai
#> tzcode source: internal
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] NOVA_1.0.0
#>
#> loaded via a namespace (and not attached):
#> [1] Matrix_1.7-4 gtable_0.3.6 jsonlite_2.0.0 dplyr_1.1.4
#> [5] compiler_4.4.0 Rcpp_1.1.1 tidyselect_1.2.1 parallel_4.4.0
#> [9] dichromat_2.0-0.1 jquerylib_0.1.4 systemfonts_1.3.1 scales_1.4.0
#> [13] textshaping_1.0.4 yaml_2.3.12 fastmap_1.2.0 lattice_0.22-7
#> [17] ggplot2_4.0.1 R6_2.6.1 generics_0.1.4 knitr_1.51
#> [21] htmlwidgets_1.6.4 tibble_3.3.1 desc_1.4.3 bslib_0.9.0
#> [25] pillar_1.11.1 RColorBrewer_1.1-3 rlang_1.1.7 cachem_1.1.0
#> [29] xfun_0.56 fs_1.6.6 sass_0.4.10 S7_0.2.1
#> [33] otel_0.2.0 cli_3.6.5 pkgdown_2.2.0 magrittr_2.0.4
#> [37] digest_0.6.39 grid_4.4.0 lifecycle_1.0.5 vctrs_0.7.1
#> [41] data.table_1.18.0 evaluate_1.0.5 glue_1.8.0 farver_2.1.2
#> [45] ragg_1.5.0 rmarkdown_2.30 tools_4.4.0 pkgconfig_2.0.3
#> [49] htmltools_0.5.9Citation
If you use NOVA in your research, please cite:
Liu, Z. (2026). NOVA: Network Of Versatile Cell-Cell Communication Analysis. R package version 1.0.0. https://github.com/Zaoqu-Liu/NOVA