Biolookup
Get metadata and ontological information about biomedical entities.
🔍 Querying the Biolookup Service
The Biolookup Service has an endpoint /api/lookup/<curie> for retrieving metadata and ontological
information about a biomedical entity via its compact identifier (CURIE).
import requests
res = requests.get("http://localhost:5000/api/lookup/doid:14330").json()
assert res["name"] == "Parkinson's disease"
assert res["identifier"] == "14330"
assert res["prefix"] == "doid"
assert res["definition"] is not None # not shown for brevity
The INDRA Lab hosts an instance of the Biolookup Service at
http://biolookup.io, so you can alternatively use http://biolookup.io/api/lookup/doid:14330.
The same can be accomplished using the biolookup package:
import biolookup
res = biolookup.lookup("doid:14330")
assert res["name"] == "Parkinson's disease"
# ... same as before
If you've configured the BIOLOOKUP_SQLALCHEMY_URI environment variable (or any other valid way
with pystow to point directly at the database for an instance
of the Biolookup Service, it will make a direct connection to the database instead of using the
web-based API.
🕸️ Running the Lookup App
You can run the lookup app in local mode with:
$ biolookup web --lazy
This means that the in-memory data from pyobo are used. If you have a large external database, you
can run in remote mode with the --sql flag:
$ biolookup web --sql --uri postgresql+psycopg2://postgres:biolookup@localhost:5434/biolookup
If --uri is not given for the web subcommand, it
uses pystow.get_config("biolookup", "sqlalchemy_uri)to look up from BIOLOOKUP_SQLALCHEMY_URI or
in ~/.config/biolookup.ini. If none is given, it defaults to a SQLite database
in ~/.data/biolookup/biolookup.db.
🗂️ Load the Database
$ biolookup load --uri postgresql+psycopg2://postgres:biolookup@localhost:5434/biolookup
If --uri is not given for the load subcommand, it
uses pystow.get_config("biolookup", "sqlalchemy_uri)to look up from BIOLOOKUP_SQLALCHEMY_URI or
in ~/.config/biolookup.ini. If none is given, it creates a defaults a SQLite database
at ~/.data/biolookup/biolookup.db.
🚀 Installation
The most recent release can be installed from PyPI with:
$ pip install biolookup
The most recent code and data can be installed directly from GitHub with:
$ pip install git+https://github.com/biopragmatics/biolookup.git
To install in development mode, use the following:
$ git clone git+https://github.com/biopragmatics/biolookup.git
$ cd biolookup
$ pip install -e .
👐 Contributing
Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.rst for more information on getting involved.
👀 Attribution
⚖️ License
The code in this package is licensed under the MIT License.
🎁 Support
The Biolookup Service was developed by the INDRA Lab, a part of the Laboratory of Systems Pharmacology and the Harvard Program in Therapeutic Science (HiTS) at Harvard Medical School.
💰 Funding
This project has been supported by the following grants:
| Funding Body | Program | Grant |
|---|---|---|
| DARPA | Automating Scientific Knowledge Extraction (ASKE) | HR00111990009 |
🍪 Cookiecutter
This package was created with @audreyfeldroy's cookiecutter package using @cthoyt's cookiecutter-snekpack template.
Release files for biolookup 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| biolookup-0.2.0.tar.gz | 128.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| biolookup-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 257.2 kB
Release files / biolookup-0.2.0.tar.gz
| Download URL | biolookup-0.2.0.tar.gz |
|---|---|
| Size | 128.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b8043ecf1e41b45d94c581874d9bd92a3825c7be6963a969015254967343412
|
|
BLAKE2b-256 checksum How to use checksums |
c9359ff9a4d25b2d9c20c45a73b84138f3c5278c9833d14d21f91d35cd1f8a1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / biolookup-0.2.0-py3-none-any.whl
| Download URL | biolookup-0.2.0-py3-none-any.whl |
|---|---|
| Size | 128.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5e60f8237b58c40c7000e86dfd1b0f38373ba201b31ea9e7daf789ec692a329
|
|
BLAKE2b-256 checksum How to use checksums |
c73c8053f2669163174b574869c2f0abf40d1592baabb7ca283eff70fe2a55f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|