API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit https://github.com/chanzuckerberg/cellxgene-census/
Project Links
Meta
Author: Chan Zuckerberg Initiative Foundation
Requires Python: <3.13,>=3.10
Classifiers
Development Status
- 4 - Beta
Intended Audience
- Developers
- Information Technology
- Science/Research
License
- OSI Approved :: MIT License
Programming Language
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
Topic
- Scientific/Engineering :: Bio-Informatics
Operating System
- POSIX :: Linux
- MacOS :: MacOS X
CZ CELLxGENE Discover Census
The cellxgene_census
package provides an API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit the chanzuckerberg/cellxgene-census GitHub repo.
For More Help
For more help, please file a issue on the repo, or contact us at soma@chanzuckerberg.com.
If you believe you have found a security issue, we would appreciate notification. Please send email to security@chanzuckerberg.com.
Development Environment Setup
- Create a virtual environment using
venv
orconda
cd
to the root of this repositorypip install -e api/python/cellxgene_census
- To install dependencies needed to work on the experimental portion of the API:
pip install -e 'api/python/cellxgene_census[experimental]'
. pip install jupyterlab
- Test it! Either open up a new
jupyter
notebook or thepython
interpreter and run this code:
import cellxgene_census
with cellxgene_census.open_soma() as census:
cell_metadata = cellxgene_census.get_obs(
census,
"homo_sapiens",
value_filter = "sex == 'female' and cell_type in ['microglial cell', 'neuron']",
column_names = ["assay", "cell_type", "tissue", "tissue_general", "suspension_type", "disease"]
)
cell_metadata
The output is a pandas.DataFrame
with over 600K cells meeting our query criteria and the selected columns:
The "stable" release is currently 2023-12-15. Specify 'census_version="2023-12-15"' in future calls to open_soma() to ensure data consistency.
assay cell_type tissue tissue_general suspension_type disease sex
0 Smart-seq v4 microglial cell middle temporal gyrus brain nucleus normal female
1 Smart-seq v4 microglial cell middle temporal gyrus brain nucleus normal female
2 Smart-seq v4 microglial cell middle temporal gyrus brain nucleus normal female
3 Smart-seq v4 microglial cell middle temporal gyrus brain nucleus normal female
4 Smart-seq v4 microglial cell middle temporal gyrus brain nucleus normal female
... ... ... ... ... ... ... ...
607636 microwell-seq neuron adrenal gland adrenal gland cell normal female
607637 microwell-seq neuron adrenal gland adrenal gland cell normal female
607638 microwell-seq neuron adrenal gland adrenal gland cell normal female
607639 microwell-seq neuron adrenal gland adrenal gland cell normal female
607640 microwell-seq neuron adrenal gland adrenal gland cell normal female
[607641 rows x 7 columns]
- Learn more about the Census API by going through the tutorials in the notebooks
Apr 02, 2025
1.17.0
Oct 07, 2024
1.16.2
Sep 10, 2024
1.16.1
Sep 09, 2024
1.16.0
Jul 11, 2024
1.15.0
Jun 05, 2024
1.14.1
May 28, 2024
1.14.0
May 08, 2024
1.13.1
Apr 03, 2024
1.13.0
Mar 28, 2024
1.12.0
Mar 13, 2024
1.11.1
Mar 12, 2024
1.11.0
Feb 13, 2024
1.10.2
Feb 05, 2024
1.10.1
Feb 02, 2024
1.10.0
Dec 13, 2023
1.9.1
Dec 08, 2023
1.9.0
Nov 20, 2023
1.8.0
Oct 25, 2023
1.7.0
Sep 07, 2023
1.6.0
Aug 08, 2023
1.5.1
Aug 06, 2023
1.5.0
Jul 28, 2023
1.4.0
Jul 20, 2023
1.3.1
Jun 30, 2023
1.3.0
Jun 17, 2023
1.2.1
Jun 07, 2023
1.2.0
May 31, 2023
1.1.0
May 23, 2023
1.0.2
May 10, 2023
1.0.1
May 03, 2023
1.0.0
May 03, 2023
1.0.0rc4
May 03, 2023
1.0.0rc3
May 01, 2023
1.0.0rc2
Apr 27, 2023
1.0.0rc1
Apr 04, 2023
0.13.0
Wheel compatibility matrix
Files in release
Extras:
Dependencies:
(>=1.15.3)
tiledbsoma
(>=1.23)
numpy
(>=2021.06.1)
s3fs