Skip to main content

Ontology enrichment tool for CxG standard AnnData files.

Project description

pandasaurus_cxg

STATUS: early Beta

A library for retreiving and leveraging the semantic context of ontogy annotation in CxG standard AnnData files.

Slide summarising intended functionality image

Installation

Available on PyPi

$ pip3 install pandasaurus_cxg

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.

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"])
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.

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

https://github.com/INCATools/pandasaurus_cxg/blob/roadmap/walkthrough.ipynb

Roadmap

https://github.com/INCATools/pandasaurus_cxg/blob/roadmap/ROADMAP.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandasaurus_cxg-0.1.2.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pandasaurus_cxg-0.1.2-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file pandasaurus_cxg-0.1.2.tar.gz.

File metadata

  • Download URL: pandasaurus_cxg-0.1.2.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.17 Darwin/22.5.0

File hashes

Hashes for pandasaurus_cxg-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2576c0854054f159b933be113fab71c2e1544fe034dc24c49b585921583970d1
MD5 edd1c231ff2712a675a4623cb65f73f1
BLAKE2b-256 b7a42bfab027fa5fe5f077e02a134751238d89adb5d918c3b1b0cfb8fdcd25c3

See more details on using hashes here.

File details

Details for the file pandasaurus_cxg-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pandasaurus_cxg-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.17 Darwin/22.5.0

File hashes

Hashes for pandasaurus_cxg-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 36947d488dd66d0a9d5a9ba751eb0e4d81e52761353d81b02df3ef0dc96efa2d
MD5 ea6887f2e80b18e160d5c676094ee2c0
BLAKE2b-256 a6c32d367fdcc2b1c75b9e380c96c6ebffd868a72e483fc239baf2e1d2229f3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page