Skip to main content

ariadnePy: a Python interface to the ariadne database network

issues pulls tests

ariadnePy brings the biological database integration and graph-theory tools of the R package ariadne to Python users. It downloads biological resources (Gene Ontology, KEGG, UniProt, BugSigDB, ChocoPhlAn, and more) from Zenodo and assembles them into a single igraph Graph that can be queried, filtered, and visualised directly in Python.


Installation

pip install ariadnepy

RDS-backed resources (e.g. MSigDB) are supported out of the box — pyreadr is installed as a core dependency.

To also use the AnnData integration helpers (add_modules, get_modules, process_gene_families):

pip install "ariadnepy[anndata]"

For development:

git clone https://github.com/Minotau-R/ariadnePy
cd ariadnePy
pip install -e ".[dev]"

Quick start

import ariadnepy

# Build the knowledge graph using default resource versions
# (downloads GML files from Zenodo on first run; cached locally afterwards)
graph = ariadnepy.ariadne()

print(graph)
# IGRAPH U--- <N vertices> <M edges> --

# List all available resource versions
df = ariadnepy.list_resource_versions()
print(df.head())

# Select specific versions
graph = ariadnepy.ariadne(versions={"GO": "2026-01-23", "KEGG": "latest"})

# Explore a few candidate paths between two resources
ariadnepy.search_path(graph, "ko ~ ec", k=3)

# Weave a linkmap along a chosen path
linkmap = ariadnepy.weave_path(graph, "taxname ~ bugsig", init=["s__Bacteroides_fragilis"])

# weave_path / weave_complex also accept an existing pathway DataFrame
# (e.g. from draw_path(), or the bundled pathMeta example) instead of the
# full graph, skipping path search entirely and re-running just those steps:
pathmeta = ariadnepy.load_pathmeta()
chebi2gmm = ariadnepy.weave_path(pathmeta, init=[15377, 30616, 4167])

# Visualise a path on the graph
fig = ariadnepy.plot_path(graph, "ko ~ ec", k=1)
fig.savefig("path.png")

Supported resources

Resource Description
GO Gene Ontology
KEGG KEGG Pathways & Modules
UniProt UniProt protein database
OTT Open Tree of Life Taxonomy
Rhea Rhea biochemical reactions
WoL Web of Life phylogenetic tree
TIGRFAMs TIGRFAM protein families
GM Gut Metabolic Modules
BugSigDB Bug Signatures Database
ChocoPhlAn MetaPhlAn gene families
MSigDB Molecular Signatures Database

Run ariadnepy.list_resource_versions() for the exact versions available at any time.


Project structure

ariadnePy/
├── src/
│   └── ariadnepy/
│       ├── __init__.py        # public API
│       ├── core/               # ariadne() graph builder, GML download/cache, resource versions
│       ├── graph/               # weave_path, weave_complex, draw_path, search_path, link_names
│       ├── io/                  # SPARQL (UniProt/Rhea) and Open Tree of Life query backends
│       ├── plot/                 # plot_path, add_resource
│       ├── resources/             # resource file caching/parsing, bundled example datasets
│       ├── anndata/                # AnnData integration (add_modules, get_modules, process_gene_families)
│       └── exceptions.py
├── tests/                          # mirrors the src/ package layout
├── pyproject.toml
└── README.md

Running tests

pytest

License

Artistic License 2.0, matching the ariadne R package.

Metadata

Release files for ariadnepy 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ariadnepy 0.2.1
File Size Uploaded
ariadnepy-0.2.1.tar.gz 56.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ariadnepy 0.2.1
File Interpreter ABI Platform
ariadnepy-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 108.9 kB

Release files / ariadnepy-0.2.1.tar.gz

Download URL ariadnepy-0.2.1.tar.gz
Size 56.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8278d34da7fc927fb35206978e7dc1a7236687e5b608008ccbd9f44aae64ddcb
BLAKE2b-256 checksum
How to use checksums
292379aaa7c335ff17718ee5648754cbb9fe0871dd42ce01ba901347f636722f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release files / ariadnepy-0.2.1-py3-none-any.whl

Download URL ariadnepy-0.2.1-py3-none-any.whl
Size 52.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2fb76c603ef6c48fe44e94826855f60df4c4eb823c263733b0c1a122a66a5b5
BLAKE2b-256 checksum
How to use checksums
e7b5d79688d03af20eda64dd5126f731e8d86a81a81d42e916b5ff9e89dbd14f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page