Python API
An API to facilitate use of the CZI Science CELLxGENE Census. The Census is a versioned container of single-cell data hosted at CELLxGENE Discover.
The API is built on the tiledbsoma SOMA API, and provides a number of helper functions including:
Open a named version of the Census, for use with the SOMA API
Get a list of available Census versions, and for each version, a description
Get a slice of the Census as an AnnData, for use with ScanPy
Get the URI for, or directly download, underlying data in H5AD format
For more information on the API, visit the cellxgene_census repo. For more information on SOMA, see the tiledbsoma repo.
Open/retrieve Cell Census data
Open the Census by version or URI. |
|
Return a |
|
Open the named version of the census, and return the URI for the |
|
Download the source H5AD dataset, for the given dataset_id, to the user-specified file name. |
Get slice as AnnData
Convenience wrapper around |
|
Get the observation metadata for a query on the census. |
|
Get the variable metadata for a query on the census. |
Feature presence matrix
Read the feature dataset presence matrix and return as a |
Versioning of Cell Census builds
Get release description for given Census version, from the Census release directory. |
|
Get the directory of Census versions currently available, optionally filtering by specified flags. |
Experimental: Machine Learning
|
Factory method for |
An |
|
Statistics about the data retrieved by |
|
Base class for |
|
Default encoder based on |
|
An encoder that concatenates and encodes several |
|
|
Abstract base class for methods to process CELLxGENE Census ExperimentAxisQuery results into a Hugging Face Dataset in which each item represents one cell. |
|
Generate a Hugging Face Dataset containing Geneformer token sequences for each cell in CELLxGENE Census ExperimentAxisQuery results (human). |
Experimental: Processing
Convience wrapper around |
|
Identify and annotate highly variable genes contained in the query results. |
|
Calculate mean and/or variance along the |
Experimental: Embeddings
Read cell (obs) embeddings and return as a dense |
|
Read embedding metadata and return as a Python dict. |
|
|
Return metadata for a specific embedding. |
Return a dictionary of all available embeddings for a given Census version. |
|
|
Get a list of all census versions that contain a specific embedding. |