Skip to main content

The new implementation for the OmniPath Python client

Project description

omnipath-client

Tests Codecov Docs PyPI Python License

Python client for the OmniPath molecular biology prior-knowledge web API.

Features

  • Export entities, interactions, and associations (complexes, pathways, reactions) as DataFrames
  • Ontology term lookup, search, and hierarchy trees
  • Multi-backend output: polars (default), pandas, or pyarrow
  • Optional graph conversion to annnet objects
  • Query validation against the API schema
  • Caching via download-manager

Installation

pip install omnipath-client

With polars (recommended default backend):

pip install omnipath-client polars

Quick start

import omnipath_client as op

# All interactions as a polars DataFrame
df = op.interactions()

# Directed interactions only
df = op.interactions(direction='directed')

# Human entities
df = op.entities(taxonomy_ids=['9606'])

# Interactions as an annnet graph
g = op.interactions(as_graph=True)

# Ontology term lookup
result = op.ontology_terms(['GO:0006915', 'MI:0326'])

# Choose a different backend
df = op.entities(backend='pandas')

For more examples, see the quickstart guide.

OmniPath Utils

The client provides access to the OmniPath Utils service for ID translation, taxonomy, and orthology:

from omnipath_client.utils import (
    map_name,           # translate identifiers
    translate_column,   # translate DataFrame columns
    ensure_ncbi_tax_id, # resolve organism names
    orthology_translate, # cross-species translation
)

# Gene symbol to UniProt
map_name('TP53', 'genesymbol', 'uniprot')  # {'P04637'}

# Organism resolution
ensure_ncbi_tax_id('mouse')  # 10090

# Cross-species translation
orthology_translate(['TP53'], source=9606, target=10090)
# {'TP53': {'Trp53'}}

Full API: utils.omnipathdb.org

Documentation

Full documentation: saezlab.github.io/omnipath-client

Data licensing

The data served by OmniPath is combined from many original resources, each with their own license terms. The OmniPath client software is BSD-3-Clause, but the data is subject to the licenses of the original sources. Some resources restrict commercial use. Tools and documentation for managing license-based access control will be provided in a future release.

Citation

If you use OmniPath in your research, please cite:

Türei D, Schaul J, Palacio-Escat N, Bohár B, Bai Y, Ceccarelli F, Çevrim E, Daley M, Darcan M, Dimitrov D, Doğan T, Domingo-Fernández D, Dugourd A, Gábor A, Gul L, Hall BA, Hoyt CT, Ivanova O, Klein M, Lawrence T, Mañanes D, Módos D, Müller-Dott S, Ölbei M, Schmidt C, Şen B, Theis FJ, Ünlü A, Ulusoy E, Valdeolivas A, Korcsmáros T, Saez-Rodriguez J. (2026) OmniPath: integrated knowledgebase for multi-omics analysis. Nucleic Acids Research 54(D1):D652-D660. doi:10.1093/nar/gkaf1126

License

The client software is licensed under BSD-3-Clause. See Data licensing above for information about the data.

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

omnipath_client-0.2.3.tar.gz (248.0 kB view details)

Uploaded Source

Built Distribution

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

omnipath_client-0.2.3-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file omnipath_client-0.2.3.tar.gz.

File metadata

  • Download URL: omnipath_client-0.2.3.tar.gz
  • Upload date:
  • Size: 248.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for omnipath_client-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6c1d75b73a4bf93b513fe71bf9b0a261d4a56efad66d61017e04865f4f97fc2f
MD5 789cbc7e323539e2e8dbab75b566a0a2
BLAKE2b-256 402b18bd66b0a1d547aed8cb349fb50a0ae94a40ac4720fe7a4b2bf2beb7c5ba

See more details on using hashes here.

File details

Details for the file omnipath_client-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: omnipath_client-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for omnipath_client-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cb410a0f470f63a7b5cd02633e179a75429e28e026e5505d1948d3537e263f1f
MD5 b6895c8f46cfcd2105ea72298f2e4ce2
BLAKE2b-256 6ea6f4524ea3affcfe61a7e607af7cfa3452230b80e85052fa47821d23ab9470

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