{"id":25843089,"url":"https://github.com/incatools/pandasaurus_cxg","last_synced_at":"2026-04-07T05:31:11.536Z","repository":{"id":168329752,"uuid":"630561665","full_name":"INCATools/pandasaurus_cxg","owner":"INCATools","description":"Ontology enrichment tool for CxG standard AnnData files","archived":false,"fork":false,"pushed_at":"2025-08-19T09:06:09.000Z","size":4481,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T11:21:41.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/INCATools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-20T16:37:39.000Z","updated_at":"2025-08-19T09:02:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f85c2498-1d60-4d3b-acb5-699f81650882","html_url":"https://github.com/INCATools/pandasaurus_cxg","commit_stats":null,"previous_names":["incatools/pandasaurus_cxg"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/INCATools/pandasaurus_cxg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Fpandasaurus_cxg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Fpandasaurus_cxg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Fpandasaurus_cxg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Fpandasaurus_cxg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/INCATools","download_url":"https://codeload.github.com/INCATools/pandasaurus_cxg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INCATools%2Fpandasaurus_cxg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-01T06:38:07.882Z","updated_at":"2026-04-07T05:31:11.508Z","avatar_url":"https://github.com/INCATools.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pandasaurus_cxg\n\nSTATUS: early Beta\n\nA 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/).\n\nSlide summarising intended functionality\n![image](https://github.com/INCATools/pandasaurus_cxg/assets/112839/3082dcd2-dd2f-469d-9076-4eabcc83130d)\n\n## Installation\n\nAvailable on [PyPi](https://pypi.org/project/pandasaurus-cxg)\n\n$ pip3 install pandasaurus_cxg\n\n#### Detailed installation guide for pygraphviz issue\n\nDuring package installation, sometimes the pygraphviz package installation is failing on **macOS** due to Graphviz may be \ninstalled in a location that is not on the default search path. In this case, it may be necessary to manually \nspecify the path to the graphviz include and/or library directories. To do that use following instructions and install \npygraphviz manually.\n\n```\nbrew install graphviz\nexport CFLAGS=\"-I$(brew --prefix graphviz)/include\"\nexport LDFLAGS=\"-L$(brew --prefix graphviz)/lib\"\npip install pygraphviz\n```\n\n## Usage\n\nThe `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`.\n\n### Using AnndataEnricher and AnndataAnalyzer Individually\n\nYou 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.\n\n```python\nfrom pandasaurus_cxg.anndata_enricher import AnndataEnricher\nade = AnndataEnricher.from_file_path(\"test/data/modified_human_kidney.h5ad\")\nade.simple_enrichment()\nade.minimal_slim_enrichment([\"blood_and_immune_upper_slim\"])\n```\n\n```python\nfrom pandasaurus_cxg.anndata_analyzer import AnndataAnalyzer\nada = AnndataAnalyzer.from_file_path(\"./immune_example.h5ad\", author_cell_type_list = ['subclass.full', 'subclass.l3', 'subclass.l2', 'subclass.l1', 'class', 'author_cell_type'])\nada.co_annotation_report()\n```\n\n### Using AnndataEnrichmentAnalyzer Wrapper\n\nThe AnndataEnrichmentAnalyzer class wraps the functionality of both AnndataEnricher and AnndataAnalyzer, offering a seamless way to perform enrichment and analysis in one go.\n\n```python\nfrom pandasaurus_cxg.enrichment_analysis import AnndataEnrichmentAnalyzer\nfrom pandasaurus_cxg.graph_generator.graph_generator import GraphGenerator\naea = AnndataEnrichmentAnalyzer(\"test/data/modified_human_kidney.h5ad\")\naea.contextual_slim_enrichment()\naea.co_annotation_report()\ngg = GraphGenerator(aea)\ngg.generate_rdf_graph()\ngg.set_label_adding_priority([\"class\", \"cell_type\", \"subclass.l1\", \"subclass.l1\", \"subclass.full\", \"subclass.l2\", \"subclass.l3\"])\ngg.add_label_to_terms()\ngg.enrich_rdf_graph()\ngg.save_rdf_graph(file_name=\"kidney_new\", _format=\"ttl\")\n```\nMore examples and detailed explanation can be found in jupyter notebook given in [Snippets](#Snippets)\n\n## Snippets\n\nhttps://github.com/INCATools/pandasaurus_cxg/blob/main/walkthrough.ipynb\n\n## Library Documentation\n\nhttps://incatools.github.io/pandasaurus_cxg/\n\n## Roadmap\n\nhttps://github.com/INCATools/pandasaurus_cxg/blob/main/ROADMAP.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincatools%2Fpandasaurus_cxg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fincatools%2Fpandasaurus_cxg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincatools%2Fpandasaurus_cxg/lists"}