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 description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cellxgene_census-1.16.2.tar.gz
.
File metadata
- Download URL: cellxgene_census-1.16.2.tar.gz
- Upload date:
- Size: 124.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c007031b1e42b320a191ff1f20ea4099ea935fe5416dffcd710b0e4a94c28ce1 |
|
MD5 | 50c16ebce6bc410f27a16c3a51cd6938 |
|
BLAKE2b-256 | f53e5482ec97c597853106172293341e7592fdcea4d1c89f592d0083899a7d49 |
Provenance
File details
Details for the file cellxgene_census-1.16.2-py3-none-any.whl
.
File metadata
- Download URL: cellxgene_census-1.16.2-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a8694fea8ee6a9e93157540b22eddbf59c5b23997b583f08505c4b57d92e3bf |
|
MD5 | c7df588a4d3d4ced5308b4aea0c5f2e3 |
|
BLAKE2b-256 | 72cd698e57ba5e2780f94dcd1fc0580236b9e5f5be090413316afa2292ee23b5 |