用于简化CZ CELLxGENE Discover Census使用的API。有关API和项目的更多信息,请访问 https://github.com/chanzuckerberg/cellxgene-census/
项目描述
CZ CELLxGENE Discover Census
cellxgene_census
包提供了一个 API,以方便使用 CZ CELLxGENE Discover Census。有关 API 和项目的更多信息,请访问 chanzuckerberg/cellxgene-census GitHub 仓库。
更多帮助
如需更多帮助,请在仓库中提交问题,或通过 soma@chanzuckerberg.com 联系我们。
如果您认为发现了安全漏洞,我们将非常感谢您的通知。请发送电子邮件至 security@chanzuckerberg.com。
开发环境设置
- 使用
venv
或conda
创建虚拟环境 - 将
cd
切换到此仓库的根目录 pip install -e api/python/cellxgene_census
- 要安装 API 的 实验部分 所需的依赖项:
pip install -e 'api/python/cellxgene_census[experimental]'
。 pip install jupyterlab
- 测试它! 打开一个新的
jupyter
笔记本或python
解释器并运行此代码
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
输出是一个满足我们查询标准并选择列的 pandas.DataFrame
,包含超过 60 万个细胞
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]
- 通过阅读 notebooks 中的教程来了解更多关于 Census API 的信息
项目详情
下载文件
下载适合您平台的文件。如果您不确定要选择哪个,请了解有关 安装包 的更多信息。
源代码分发
cellxgene_census-1.16.1.tar.gz (124.2 kB 查看哈希值)
构建分发
关闭
cellxgene_census-1.16.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 86e89b81f093b171a7101405759f75a4de01c1f398099e12afd88986da449f8c |
|
MD5 | b27ce817a5d369132535be28f50e173a |
|
BLAKE2b-256 | 83078792cc9f039de4caa86615be03fa58745475ab4cd387b79967b9ea538fcd |
关闭
cellxgene_census-1.16.1-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e1b868fa5194488802fb6d57f28db1678745f94ebf67ca519550579215004bea |
|
MD5 | ea6073aeb932bbcc24d8e895d0daec38 |
|
BLAKE2b-256 | eb546103fa16c1a6cd1c68e2e6521375f2bfef49deee060d943b0cac515c640c |