R implementation of the SOMA API specification.
R-universe serves macOS binaries and source packages for other Unix-like platforms.
install.packages("tiledbsoma", repos = c("https://tiledb-inc.r-universe.dev",
"https://cloud.r-project.org"))
Installing from source on Unix-like platforms requires cmake, git, and a C++ compiler with C++20 support (e.g., g++ 13+).
Binary packages for multiple architectures are available from Conda:
conda install -c conda-forge -c tiledb r-tiledbsoma
To install the latest development version from the main branch:
remotes::install_github("https://github.com/single-cell-data/TileDB-SOMA", subdir = "apis/r")
Source installation requires:
tiledb R package, which depends on a local installation of TileDB Core or its provided build artifactscmake and git
libtiledbsoma, which is built automatically during package installation or can be provided as a system library (see the libtiledbsoma directory for manual installation)All other R package dependencies are listed in DESCRIPTION and can be installed with:
remotes::install_deps(".", dependencies = TRUE)
fmt and spdlog conflictsIf you have system versions of fmt or spdlog installed, they can conflict with the versions vendored by TileDB.
undefined symbol: _ZTIN3fmt2v912format_errorE: Uninstall your system versions of fmt and spdlog. On Linux, verify removal with dpkg -l | egrep "lib(spdlog|fmt)".fatal error: spdlog/spdlog.h: No such file or directory: Remove the leftover cmake config directory at /usr/local/lib/cmake/spdlog, which the system uninstall of spdlog fails to clean up.Clone the repository:
git clone https://github.com/single-cell-data/TileDB-SOMA.git
cd TileDB-SOMA/apis/r
Install R package dependencies:
remotes::install_deps(".", dependencies = TRUE)
Optionally, install additional data packages used by tests:
pbmc3k provides single-cell data for SingleCellExperiment and SummarizedExperiment ingestion tests:
install.packages("pbmc3k", repos = "https://tiledb-inc.r-universe.dev")
pbmc3k.tiledb provides pre-built SOMA test data:
install.packages("pbmc3k.tiledb", repos = "https://ghrr.github.io/drat")
# Clean previous build artifacts (not needed on first build)
./cleanup
# Build the source tarball (includes libtiledbsoma via symlink)
R CMD build .
# Check the package (skipping vignettes and manual, which require texlive)
R CMD check --no-vignettes --no-manual tiledbsoma_*.tar.gz
# Install
R CMD INSTALL tiledbsoma_*.tar.gz
During installation, TileDB Core is downloaded if needed and libtiledbsoma is built if a system installation is not found.
src/*.cpp function signatures: Run Rscript -e 'Rcpp::compileAttributes()' to update Rcpp-generated glue code.Rscript -e 'roxygen2::roxygenise()' to update the corresponding R files.Once installed, the package sources can be edited and re-installed iteratively. Running ./cleanup before rebuilding ensures a full rebuild including libtiledbsoma.