Installation#
Audience: everyone
Time: 5–15 minutes (depending on your setup)
Goal: install Cellucid for R, verify version 0.9.7, and choose the correct
source for current registry availability
Note
Active package version: 0.9.7. Version 0.9.7 is the CRAN submission
release. The
CRAN package index
is authoritative for registry availability. Use the CRAN command below when
the index lists cellucid 0.9.7; otherwise install the active source from the
official GitHub repository.
Requirements#
R:
cellucidtargets R ≥ 4.1.0 (checked on R 4.1, 4.2, 4.3, oldrel, release and devel).Hard dependencies:
jsonlite, and for the viewerhttpuv,laterandcurlOptional:
Matrix(sparse expression matrices and neighbour graphs; recommended),SeuratObjectandSingleCellExperiment/SummarizedExperiment(each only to read its own objects),DelayedArray(assays kept on disk, such as HDF5Array),BPCells(matrices kept on disk; from https://bnprks.r-universe.dev, not CRAN)Source builds: Rtools on Windows, the Xcode Command Line Tools on macOS, or a C toolchain plus the R and zlib development headers on Linux (for example
r-base-dev, which bringszlib1g-dev, on Debian and Ubuntu)
Note
cellucid-r does not require Seurat or SingleCellExperiment: it reads their
objects when they are installed, and works from matrices and data frames when
they are not.
Install Cellucid#
From CRAN when version 0.9.7 is listed#
When the CRAN package index lists cellucid 0.9.7, install it with:
install.packages("cellucid")
If the index does not list version 0.9.7 yet, use the official source installation below.
From the official source repository#
These routes compile Cellucid’s small C routines (the CRC-32 of the
.zarr.zip writer, the SHA-256 that checks the downloaded web app, the
latent-space outlier quantiles, one-pass matrix checks, and the decoders of a
saved session, linked against zlib) and therefore require the source-build
toolchain listed above. A platform CRAN
binary, when available, does not require a local compiler.
Option A: remotes (simple, common)#
install.packages("remotes")
remotes::install_github("theislab/cellucid-r")
Option B: pak (often faster, better resolver)#
install.packages("pak")
pak::pak("theislab/cellucid-r")
Verify the installation#
library(cellucid)
packageVersion("cellucid")
You should see:
No error on
library(cellucid)Version
0.9.7frompackageVersion
Optional dependencies (recommended)#
Matrix#
If you plan to write:
sparse gene expression matrices (common), or
a neighbour graph (
connectivities=),
install Matrix:
install.packages("Matrix")
Seurat / SingleCellExperiment (only for their objects)#
cellucid_prepare(data = ) and cellucid_view() read a Seurat object with
SeuratObject and a SingleCellExperiment or SummarizedExperiment with
SingleCellExperiment / SummarizedExperiment; each is loaded only when an
object of its class arrives, and a missing one is named with the line that
installs it.
On R older than 4.4, install.packages("SeuratObject") fails because
SeuratObject 5 needs Matrix 1.6-4 or later and CRAN’s current Matrix needs
R 4.4. Install Matrix 1.6-5, the last release for those R versions, first:
remotes::install_version("Matrix", version = "1.6-5")
install.packages("SeuratObject")
Troubleshooting installation#
Symptom: “package ‘jsonlite’ is not available”#
Likely causes
You are using an R environment without CRAN configured.
You are offline or behind a restrictive proxy.
How to confirm
Run
getOption("repos")and verify you have a CRAN mirror set.
Fix
options(repos = c(CRAN = "https://cloud.r-project.org"))
install.packages("jsonlite")
Symptom: GitHub install fails (“HTTP error 401/403”, “rate limit”)#
Likely causes
Corporate proxy / blocked GitHub
GitHub API rate limiting
Fix options
Try
pak(often more resilient).If needed, configure a GitHub PAT:
Sys.setenv(GITHUB_PAT = "...")
Symptom: “there is no package called ‘Matrix’”#
Fix
install.packages("Matrix")
Symptom: you installed but library(cellucid) loads the wrong version#
How to confirm
find.package("cellucid")
packageVersion("cellucid")
Fix
Restart R (RStudio: Session → Restart R).
Reinstall with:
remotes::install_github("theislab/cellucid-r", force = TRUE)
Next steps#
Ready to write your first store? Go to Quick Start (3 Levels).