GCSanndataR is an R package that extends anndataR to provide Google Cloud Storage-backed AnnData functionality. This package allows users to work with AnnData objects stored in Google Cloud Storage without downloading the entire file, enabling efficient access to large single-cell datasets directly from the cloud.
# Install from GitHub
# remotes::install_github("mkanai/GCSanndataR")
install.packages("GCSanndataR", repos = c('https://mkanai.r-universe.dev', 'https://cloud.r-project.org'))
GCSanndataR::install_gcs_anndata()
library(GCSanndataR)
# Read an AnnData file from Google Cloud Storage
# This will automatically use GCSAnnData backend
gcs_adata <- read_h5ad("gs://my-bucket/my-file.h5ad")
# Access specific rows and columns
gcs_adata$X[1:10, 1:5]
# Access using names
gcs_adata$X[c("cell1", "cell2"), c("gene1", "gene2")]
MIT