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
- PMkbase -- Phenotype MicroArray Knowledge Base
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"])
# Search entities by local ID, UID, or synonym
result = client.search_entities("dnaA")
for entity in result["entities"]:
print(entity["local_id"], entity["source_db_name"])
# Search gene-strain relationships by a gene or strain
result = client.search_relationships("rpoB")
for rel in result["relationships"]:
print(rel["gene_local_id"], rel["strain_local_id"])
# 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
# Search entities
interopdb search-entities dnaA
# Search relationships
interopdb search-relationships GCF_031662355.1
# Save to file
interopdb gene rpoB -o result.json
Project details
Release history Release notifications | RSS feed
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.2.0.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interopdb-0.2.0.tar.gz.
File metadata
- Download URL: interopdb-0.2.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f573dad87849b1447ab153d8d7cbf71213fa13167b53efa46e18d8a14a34364
|
|
| MD5 |
e60a31216fefa6f085033b691443e8a5
|
|
| BLAKE2b-256 |
9369b46746ea503ff0c11f5670138b5188e15a08739408439c719d7e10b8bc02
|
File details
Details for the file interopdb-0.2.0-py3-none-any.whl.
File metadata
- Download URL: interopdb-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a2c86266d583e7cef88422be6ada9483c00026ee5d6b87a6a8eb080584f14c
|
|
| MD5 |
7803f8b1bd472d96aedc6892af454828
|
|
| BLAKE2b-256 |
440a71a73ed47d53276ff1411e115439f84dbc613f14f66365c4dd05a7559ad6
|