Overview
Welcome to leo.sc! This guide outlines the
recommended steps to install the package and its dependencies. Since
leo.sc relies on various CRAN, Bioconductor, and
GitHub-hosted packages, a structured installation approach ensures a
smooth setup.
Prerequisites
Ensure you have a recent version of R (>= 4.1.0) installed. We highly recommend using RStudio or radian running inside VS Code as your integrated development environment (IDE).
You will need the pak package for a fast and reliable
installation experience:
if (!requireNamespace("pak", quietly = TRUE)) {
install.packages("pak", dependencies = TRUE)
}The most straightforward method to install leo.sc is
directly from GitHub using pak. It will automatically
resolve and install all CRAN, Bioconductor, and GitHub dependencies in
parallel.
pak::pkg_install("laleoarrow/leo.sc")Troubleshooting Dependencies
Bioinformatics packages often have complex dependency trees. If the standard installation fails due to missing packages, follow these targeted troubleshooting steps:
1. Bioconductor Dependencies
Several core functions in leo.sc depend on Bioconductor
infrastructure. You can install any missing ones like this:
bioc_deps <- c("clusterProfiler", "org.Hs.eg.db", "enrichplot")
missing_bioc <- bioc_deps[!vapply(bioc_deps, requireNamespace, quietly = TRUE, FUN.VALUE = logical(1))]
if (length(missing_bioc) > 0) {
pak::pkg_install(missing_bioc)
}2. GitHub-Hosted Dependencies
leo.sc relies on other custom packages, notably
leo.basic and DoubletFinder. If needed,
install them directly:
github_deps <- c("chris-mcginnis-ucsf/DoubletFinder", "laleoarrow/leo.sc")
# pak handles GitHub repositories automatically
pak::pkg_install(github_deps)Verification
Once the installation completes, verify that the package loads successfully into your R session:
library(leo.sc)
#> Warning: replacing previous import 'S4Arrays::makeNindexFromArrayViewport' by
#> 'DelayedArray::makeNindexFromArrayViewport' when loading 'SummarizedExperiment'
#>
#>
#> =================================================================================
#> ██╗ ███████╗ ██████╗ ███████╗ ███████╗
#> ██║ ██╔════╝ ██╔═══██╗ ██╔════╝ ██╔═════╝
#> ██║ █████╗ ██║ ██║ ██╗ ███████╗ ██║
#> ██║ ██╔══╝ ██║ ██║ ╚═╝ ╚════██║ ██║
#> ███████╗███████╗ ╚██████╔╝ ███████║ ╚███████╗
#> ╚══════╝╚══════╝ ╚═════╝ ╚══════╝ ╚══════╝
#> =================================================================================
#> >>> Device: Linux 6.14.0-1017-azure | AMD EPYC 7763 64-Core Processor | 4C/4T <<<
#> >>> Memory: 15.6G total | 3.2G used | 12.4G free <<<
#> >>> Welcome to leo.sc package (v0.1.0) <<<
#> >>> System Time: 2026-03-04 05:06:26 <<<
#> >>> Have fun with single cell data <<<
#>
#>
cli::cli_alert_success("leo.sc loaded successfully!")
#> ✔ leo.sc loaded successfully!If you encounter persistent issues during installation, please open an issue on the leo.sc GitHub repository.