Skip to main content

Python client for the Interop DB Registry API

Project description

interopdb

Python client and CLI for the Interop DB Registry API.

Interop DB is a federated registry that assigns unified identifiers to genes and strains across multiple biological databases, enabling cross-database queries with a single search. It integrates data from:

  • ALEdb -- Adaptive Laboratory Evolution Database
  • BiGGr -- Knowledgebase of genome-scale metabolic network reconstructions
  • PanKB -- Pangenome Knowledge Base (genes, strains, pangenomics)
  • PMkbase -- Phenotype MicroArray Knowledge Base (strains, phenotypes)

Installation

pip install interopdb

Python API

from interopdb import InteropClient

client = InteropClient()

# Query a gene
result = client.get_gene("rpoB")
print(result["uid"], result["attributes"])

# Query a strain
result = client.get_strain("511145")

# Query a gene-strain pair
result = client.get_pair("rpoB", "511145")
for source in result["sources"]:
    print(source["source"], source["data"])

# Save result to JSON
client.save_json(result, "output.json")

CLI

# Query entities
interopdb gene rpoB
interopdb strain 511145

# Query a gene-strain pair
interopdb pair rpoB 511145

# Save to file
interopdb gene rpoB -o result.json

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

interopdb-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

interopdb-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file interopdb-0.1.0.tar.gz.

File metadata

  • Download URL: interopdb-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for interopdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5a567c2ca11972825b996f939e65fa16d6a9365090b885a4495e08961625c523
MD5 b50edf87486b2f241b769941c8998cbf
BLAKE2b-256 c353fca5fd6bf28062a86c8f094f2297dee68a6933a01d1020dc3d0fc6ab8020

See more details on using hashes here.

File details

Details for the file interopdb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: interopdb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for interopdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adc504664bf97da2fdc20d711a24bc1c14a13dac65bb4b1f51fcbd27b3bbf885
MD5 8d623c3f63d04796342c62ff0d5d2cf5
BLAKE2b-256 85e57d16ac9d299fb790a6297f5a4e420be664bd20926c8048763488a06f3e4c

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