tiledbsoma (R)

R implementation of the SOMA API specification.

Installation

From R-universe (recommended)

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

From Conda

Binary packages for multiple architectures are available from Conda:

conda install -c conda-forge -c tiledb r-tiledbsoma

From GitHub (development)

To install the latest development version from the main branch:

remotes::install_github("https://github.com/single-cell-data/TileDB-SOMA", subdir = "apis/r")

Requirements

Source installation requires:

All other R package dependencies are listed in DESCRIPTION and can be installed with:

remotes::install_deps(".", dependencies = TRUE)

Troubleshooting: fmt and spdlog conflicts

If you have system versions of fmt or spdlog installed, they can conflict with the versions vendored by TileDB.

Development

Setup

  1. Clone the repository:

    git clone https://github.com/single-cell-data/TileDB-SOMA.git
    cd TileDB-SOMA/apis/r
    
  2. Install R package dependencies:

    remotes::install_deps(".", dependencies = TRUE)
    
  3. 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")
      

Build and install

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

After editing source files

Once installed, the package sources can be edited and re-installed iteratively. Running ./cleanup before rebuilding ensures a full rebuild including libtiledbsoma.