Skip to contents

Open the Census

Usage

open_soma(
  census_version = "stable",
  uri = NULL,
  tiledbsoma_ctx = NULL,
  mirror = NULL
)

Arguments

census_version

The version of the Census, e.g., "stable".

uri

A URI containing the Census SOMA objects to open instead of a released version. (If supplied, takes precedence over census_version.)

tiledbsoma_ctx

A tiledbsoma::SOMATileDBContext built using new_SOMATileDBContext_for_census(). Optional (created automatically) if using census_version and the context does not need to be reused.

mirror

The Census mirror to access; one of names(get_census_mirror_directory()).

Value

Top-level tiledbsoma::SOMACollection object. After use, the census should be closed to release memory and other resources, usually with on.exit(census$close(), add = TRUE). Closing the top-level census will also close all SOMA objects accessed through it.

Examples

census <- open_soma()
#> The stable Census release is currently 2023-12-15. Specify census_version = "2023-12-15" in future calls to open_soma() to ensure data consistency.
as.data.frame(census$get("census_info")$get("summary")$read()$concat())
#>   soma_joinid                      label      value
#> 1           0      census_schema_version      1.2.0
#> 2           1          census_build_date 2023-10-23
#> 3           2     dataset_schema_version      3.1.0
#> 4           3           total_cell_count   68683222
#> 5           4          unique_cell_count   40356133
#> 6           5 number_donors_homo_sapiens      15588
#> 7           6 number_donors_mus_musculus       1990
census$close()