# pandasaurus_cxg
STATUS: early Beta
A library for retrieving and leveraging the semantic context of ontology annotation in [CxG standard](https://github.com/chanzuckerberg/single-cell-curation/blob/main/schema/3.0.0/schema.md) [AnnData files](https://anndata.readthedocs.io/en/latest/).
Slide summarising intended functionality

## Installation
Available on [PyPi](https://pypi.org/project/pandasaurus-cxg/0.1.1/)
$ pip3 install pandasaurus_cxg
#### Detailed installation guide for pygraphviz issue
During package installation, sometimes the pygraphviz package installation is failing on **macOS** due to Graphviz may be
installed in a location that is not on the default search path. In this case, it may be necessary to manually
specify the path to the graphviz include and/or library directories. To do that use following instructions and install
pygraphviz manually.
```
brew install graphviz
export CFLAGS="-I $(brew --prefix graphviz)/include"
export LDFLAGS="-L $(brew --prefix graphviz)/lib"
pip install pygraphviz
```
## Usage
The `AnndataEnricher` and `AnndataAnalyzer` classes can be used both individually and in conjunction with the `AnndataEnrichmentAnalyzer` wrapper class. The `AnndataEnrichmentAnalyzer` class serves as a convenient way to leverage the functionalities of both `AnndataEnricher` and `AnndataAnalyzer`.
### Using AnndataEnricher and AnndataAnalyzer Individually
You can use the `AnndataEnricher` and `AnndataAnalyzer` classes separately to perform specific tasks on your data. For instance, `AnndataEnricher` facilitates data enrichment, while `AnndataAnalyzer` provides various analysis tools for Anndata objects.
```python
from pandasaurus_cxg.anndata_enricher import AnndataEnricher
ade = AnndataEnricher.from_file_path("test/data/modified_human_kidney.h5ad")
ade.simple_enrichment()
ade.minimal_slim_enrichment(["blood_and_immune_upper_slim"])
```
```python
from pandasaurus_cxg.anndata_analyzer import AnndataAnalyzer
ada = AnndataAnalyzer.from_file_path("./immune_example.h5ad", author_cell_type_list = ['subclass.full', 'subclass.l3', 'subclass.l2', 'subclass.l1', 'class', 'author_cell_type'])
ada.co_annotation_report()
```
### Using AnndataEnrichmentAnalyzer Wrapper
The AnndataEnrichmentAnalyzer class wraps the functionality of both AnndataEnricher and AnndataAnalyzer, offering a seamless way to perform enrichment and analysis in one go.
```python
from pandasaurus_cxg.enrichment_analysis import AnndataEnrichmentAnalyzer
from pandasaurus_cxg.graph_generator.graph_generator import GraphGenerator
aea = AnndataEnrichmentAnalyzer("test/data/modified_human_kidney.h5ad")
aea.contextual_slim_enrichment()
aea.co_annotation_report()
gg = GraphGenerator(aea)
gg.generate_rdf_graph()
gg.set_label_adding_priority(["class", "cell_type", "subclass.l1", "subclass.l1", "subclass.full", "subclass.l2", "subclass.l3"])
gg.add_label_to_terms()
gg.enrich_rdf_graph()
gg.save_rdf_graph(file_name="kidney_new", _format="ttl")
```
More examples and detailed explanation can be found in jupyter notebook given in [Snippets](#Snippets)
## Snippets
https://github.com/INCATools/pandasaurus_cxg/blob/main/walkthrough.ipynb
## Roadmap
https://github.com/INCATools/pandasaurus_cxg/blob/main/ROADMAP.md
没有合适的资源?快使用搜索试试~ 我知道了~
pandasaurus_cxg-0.1.5.tar.gz
需积分: 1 0 下载量 185 浏览量
2024-03-09
13:48:53
上传
评论
收藏 20KB GZ 举报
温馨提示
Python库是一组预先编写的代码模块,旨在帮助开发者实现特定的编程任务,无需从零开始编写代码。这些库可以包括各种功能,如数学运算、文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
资源推荐
资源详情
资源评论






























收起资源包目录
























共 18 条
- 1
资源评论


程序员Chino的日记
- 粉丝: 4237
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 选修三:现代生物科技专题基因工程:精品练习.doc
- 进化算法与其在数值计算中应用.ppt
- 一个完整的项目管理流程.doc
- 计算机系统故障诊疗和维护常见故障和排除.pptx
- 软件测试名词解释、简答题以及综合题(含答案).doc
- 通信工程施工安全生产操作规范培训用材料.doc
- 基于PLC的变频恒压供水控制系统设计.doc
- 项目管理流程(精).ppt
- 实训7-操作系统安装和磁盘管理实训报告磁盘管理实训报告.docx
- 电子商务概论电子杜江萍专业知识讲座.ppt
- 软件开发试用期工作总结(多篇).docx
- 项目管理考核办法实施细则.doc
- 项目十五消防报警及联动控制系统集成.pptx
- 网络多媒体控制系统.docx
- 数字通信原理试卷及答案.doc
- 计算机控制系统的发展历程.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
