This is a R implementation of the Unified Single-cell Data Model.
This branch, main
, implements the updated specfication. Please also see the main-old
branch which implements the original specification.
This code is hosted at R-universe, so you can do
$ install.packages('tiledbsoma', repos = c('https://tiledb-inc.r-universe.dev', 'https://cloud.r-project.org'))
- Source installation requires the
tiledb
R package (which in turn depends on thetiledb
Core library). - In general, source installation of TileDB and its packages may require
cmake
andgit
to be installed; these are common tools each operating system provides readily. - Other R package dependencies are listed in the DESCRIPTION file and can be installed via e.g.
remotes::install_deps(".", TRUE)
. In order to build vignettes,knitr
andrmarkdown
are required as istestthat
for testing. Iftestthat
is invoked directly thenpkgbuild
is also needed. - In addition, the R package also depends on the
libtiledbsoma
library -- which gets installed with the package as described in the next section.
- Clone this repository:
git clone https://github.com/single-cell-data/TileDB-SOMA.git
- Change into the R API package directory:
cd TileDB-SOMA/apis/r
- Optionally, clean the files in the repo:
./cleanup
(this is not needed the first time) - Access to more test data:
install.packages("pbmc3k.tiledb", repos="https://ghrr.github.io/drat")
` - Optionally, update the
libtiledbsoma
sources:./copy_source.sh
(which updates the includes tarball oflibtiledbsoma
). - If you have edited any
src/*.cpp
withRcppExport
then runRscript -e 'Rcpp::compileAttributes()'
- Build the R package source tarball from the repository sources:
R CMD build .
(which will also buildlibtiledbsoma
from source; other dependencies are required as described in the previous section) - If you have changed any signatures, run
Rscript -e 'roxygen2::roxygenise()'
- Check and test the package from the tarball:
R CMD check --no-vignettes --no-manual tiledbsoma_*.tar.gz
- For quicker iteration, run
Rscript -e 'testthat::test_local("tests/testthat")'
- For quicker iteration, run
- Install the package from the tarball:
R CMD INSTALL tiledbsoma_*.tar.gz
Once installed successfully, the package sources can be edited and re-installed.
The optional clean step ensures a full rebuild, and the optional copy of libtiledbsoma
ensures it is updated too.
Please see https://github.com/single-cell-data/TileDB-SOMA/issues.
Please see the TileDB-SOMA wiki.