The sciNOME package provides an extensive suite of
academic-grade plotting functions for Single-Cell RNA, Epigenetic, and
Multi-Omics integrated data.
In this vignette, we demonstrate the usage of these functions using minimal mock datasets to ensure rapid compilation without relying on external large data files.
We first create a tiny mock RNA object.
set.seed(42)
# Mock metadata
mock_meta <- data.frame(
orig.ident = rep(c("Tumor", "Normal"), each = 20),
nFeature_RNA = runif(40, 200, 2500),
nCount_RNA = runif(40, 500, 8000),
percent_mt = runif(40, 0, 10),
Auto_Cluster = rep(c("C1", "C2", "C3", "C4"), each = 10)
)
rownames(mock_meta) <- paste0("Cell_", 1:40)
# Mock UMAP coordinates
mock_umap <- matrix(rnorm(80), ncol = 2)
rownames(mock_umap) <- rownames(mock_meta)
colnames(mock_umap) <- c("UMAP_1", "UMAP_2")
# Mock Pseudotime
mock_pt <- list(
pseudotime = runif(40, 0, 1),
dr_method = "umap",
group_col = "Auto_Cluster",
algorithm = "cluster",
start_clus = "C1",
curve_coords = data.frame(Dim1 = rnorm(40), Dim2 = rnorm(40))
)
# Assemble RNA object
mock_rna_obj <- list(
meta.data = mock_meta,
filter_meta.data = mock_meta,
reductions = list(umap = mock_umap, pseudotime = mock_pt)
)
class(mock_rna_obj) <- "RNA"Set show_cluster = TRUE to plot custom groups alongside
unsupervised clusters.
if (requireNamespace("patchwork", quietly = TRUE)) {
PlotDimRed_RNA(mock_rna_obj, reduction = "umap", group_col = "orig.ident", show_cluster = TRUE)
}mock_dea <- data.frame(
gene = paste0("Gene_", 1:50),
avg_log2FC = rnorm(50, 0, 1.5),
p_val_adj = runif(50, 0, 0.1)
)
mock_dea$avg_log2FC[1:5] <- runif(5, 2, 4)
mock_dea$p_val_adj[1:5] <- runif(5, 1e-6, 1e-3)
if (requireNamespace("ggrepel", quietly = TRUE)) {
PlotVolcano_RNA(mock_dea, fc_cut = 1, p_cut = 0.05, top_n = 5)
}We simulate a small methylation .level matrix and its
corresponding metadata.
set.seed(123)
mock_epi_mat <- matrix(runif(200, min = 0, max = 1), nrow = 10, ncol = 20)
colnames(mock_epi_mat) <- paste0("Sample_", 1:20)
rownames(mock_epi_mat) <- paste0("Region_", 1:10)
mock_epi_meta <- data.frame(
SampleID = paste0("Sample_", 1:20),
Condition = rep(c("Tumor", "Normal"), each = 10)
)if (requireNamespace("ggridges", quietly = TRUE)) {
PlotLandscape_Epi(
mat = mock_epi_mat,
meta = mock_epi_meta,
sample_col = "SampleID",
group_col = "Condition"
)
}mock_epi_dr <- data.frame(
Dim1 = rnorm(20),
Dim2 = rnorm(20),
Condition = rep(c("Tumor", "Normal"), each = 10)
)
PlotDimRed_Epi(mock_epi_dr, group_col = "Condition", method = "PCA")mock_epi_dea <- data.frame(
chrdata = paste0("chr1:", 1001:1050),
Diff = rnorm(50, mean = 0, sd = 1),
P.Value = runif(50, min = 0, max = 0.5)
)
mock_epi_dea$Diff[1:3] <- c(1.5, 2.0, -1.8)
mock_epi_dea$P.Value[1:3] <- c(0.001, 0.0005, 0.002)
if (requireNamespace("ggrepel", quietly = TRUE)) {
PlotVolcano_Epi(mock_epi_dea, metric_col = "Diff", th_effect = 1.0, top_n = 3)
}Finally, we simulate an integrated dataframe containing RNA Expression, CpG Methylation, and GpC Accessibility.
set.seed(42)
mock_multi <- data.frame(
RNA_Exp = rnorm(40, mean = 10, sd = 2),
CpG_level = runif(40, 0, 1),
GpC_level = runif(40, 0, 1)
)
# Add some artificial correlation
mock_multi$RNA_Exp <- mock_multi$RNA_Exp - (mock_multi$CpG_level * 3)sessionInfo()
#> R version 4.6.0 (2026-04-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.4 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.26.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] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] ggplot2_4.0.3 dplyr_1.2.1 data.table_1.18.4 sciNOME_0.99.0
#> [5] BiocStyle_2.41.0
#>
#> loaded via a namespace (and not attached):
#> [1] gtable_0.3.6 xfun_0.58 bslib_0.11.0
#> [4] ggrepel_0.9.8 rstatix_0.7.3 lattice_0.22-9
#> [7] vctrs_0.7.3 tools_4.6.0 generics_0.1.4
#> [10] stats4_4.6.0 parallel_4.6.0 tibble_3.3.1
#> [13] pkgconfig_2.0.3 Matrix_1.7-5 RColorBrewer_1.1-3
#> [16] S7_0.2.2 S4Vectors_0.51.3 ggridges_0.5.7
#> [19] lifecycle_1.0.5 compiler_4.6.0 farver_2.1.2
#> [22] Seqinfo_1.3.0 carData_3.0-6 htmltools_0.5.9
#> [25] sys_3.4.3 buildtools_1.0.0 sass_0.4.10
#> [28] yaml_2.3.12 Formula_1.2-5 pillar_1.11.1
#> [31] car_3.1-5 ggpubr_0.6.3 jquerylib_0.1.4
#> [34] tidyr_1.3.2 MASS_7.3-65 cachem_1.1.0
#> [37] abind_1.4-8 nlme_3.1-169 tidyselect_1.2.1
#> [40] digest_0.6.39 purrr_1.2.2 splines_4.6.0
#> [43] maketools_1.3.2 labeling_0.4.3 fastmap_1.2.0
#> [46] grid_4.6.0 cli_3.6.6 magrittr_2.0.5
#> [49] patchwork_1.3.2 broom_1.0.13 withr_3.0.2
#> [52] scales_1.4.0 backports_1.5.1 rmarkdown_2.31
#> [55] igraph_2.3.2 otel_0.2.0 ggsignif_0.6.4
#> [58] pbapply_1.7-4 evaluate_1.0.5 knitr_1.51
#> [61] GenomicRanges_1.65.0 IRanges_2.47.2 viridisLite_0.4.3
#> [64] mgcv_1.9-4 rlang_1.2.0 Rcpp_1.1.1-1.1
#> [67] glue_1.8.1 BiocManager_1.30.27 BiocGenerics_0.59.7
#> [70] jsonlite_2.0.0 R6_2.6.1