
Archive the on-disk counts for cold storage
archive_sc_exp.RdCompresses counts_cells.bin into counts.bxa with zstd. The gene-based
file is not archived, as it is a transpose of the cell-based one. Normalised
values are only kept where they cannot be recomputed from the raw counts.
load_existing() restores both binaries automatically when it finds only
the archive. Save the in-memory data first with save_sc_exp_to_disk().
Arguments
- object
SingleCellsclass.- level
Integer. zstd compression level, between 1 and 22. Higher levels compress more and take longer; decompression speed barely changes.
- remove_bins
Boolean. Delete
counts_cells.binandcounts_genes.binonce the archive is written.- .verbose
Boolean. Controls verbosity of the function.
Examples
sc <- demo_single_cells()
dir <- sc@dir_data
save_sc_exp_to_disk(sc, type = "rds")
archive_sc_exp(sc, .verbose = FALSE)
sc <- load_existing(SingleCells(dir_data = dir), .verbose = FALSE)
unlink(dir, recursive = TRUE, force = TRUE)