Skip to main content

Grounding for biomedical entities with contextual disambiguation

Project description

Gilda: Grounding Integrating Learned Disambiguation

License Build Documentation PyPI version

Gilda is a Python package and REST service that grounds (i.e., finds appropriate identifiers in namespaces for) named entities in biomedical text.

Installation

Gilda is deployed as a web service at http://grounding.indra.bio/ (see Usage instructions below), however, it can also be used locally as a Python package.

The recommended method to install Gilda is through PyPI as

pip install gilda

Note that Gilda uses a single large resource file for grounding, which is automatically downloaded into the ~/.data/gilda/<version> folder during runtime (see pystow for options to configure the location of this folder).

Given some additional dependencies, the grounding resource file can also be regenerated locally by running python -m gilda.generate_terms.

Usage

Gilda can either be used as a REST web service or used programmatically via its Python API. An introduction Jupyter notebook for using Gilda is available at https://github.com/indralab/gilda/blob/master/notebooks/gilda_introduction.ipynb

Use as a Python package

For using Gilda as a Python package, the documentation at http://gilda.readthedocs.org provides detailed descriptions of each module of Gilda and their usage. A basic usage example is as follows

import gilda
scored_matches = gilda.ground('ER', context='Calcium is released from the ER.')

Use as a web service

The REST service accepts POST requests with a JSON header on the /ground endpoint. There is a public REST service running on AWS but the service can also be run locally as

python -m gilda.app

which, by default, launches the server at localhost:8001 (for local usage replace the URL in the examples below with this address).

Below is an example request using curl:

curl -X POST -H "Content-Type: application/json" -d '{"text": "kras"}' http://grounding.indra.bio/ground

The same request using Python's request package would be as follows:

import requests
requests.post('http://grounding.indra.bio/ground', json={'text': 'kras'})

Run web service with Docker

After cloning the repository locally, you can build and run a Docker image of Gilda using the following commands:

$ docker build -t gilda:latest .
$ docker run -d -p 8001:8001 gilda:latest

Alternatively, you can use docker-compose to do both the initial build and run the container based on the docker-compose.yml configuration:

$ docker-compose up

Citation

@article{gyori2021gilda,
  author = {Gyori, Benjamin M and Hoyt, Charles Tapley and Steppi, Albert},
  doi = {10.1101/2021.09.10.459803},
  journal = {bioRxiv},
  publisher = {Cold Spring Harbor Laboratory},
  title = {{Gilda: biomedical entity text normalization with machine-learned disambiguation as a service}},
  url = {https://www.biorxiv.org/content/10.1101/2021.09.10.459803v1},
  year = {2021}
}

Funding

The development of Gilda was funded under the DARPA Communicating with Computers program (ARO grant W911NF-15-1-0544) and the DARPA Young Faculty Award (ARO grant W911NF-20-1-0255).

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

gilda-0.8.2.tar.gz (158.7 kB view details)

Uploaded Source

Built Distribution

gilda-0.8.2-py3-none-any.whl (159.2 kB view details)

Uploaded Python 3

File details

Details for the file gilda-0.8.2.tar.gz.

File metadata

  • Download URL: gilda-0.8.2.tar.gz
  • Upload date:
  • Size: 158.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for gilda-0.8.2.tar.gz
Algorithm Hash digest
SHA256 99cccdf2cdbaa34eac39591e54efdf00abe725fb4a3a6857632a40740aae3294
MD5 8b94aea97718c8d4903ef232526d09f9
BLAKE2b-256 3cd68c7827ec3122a983bd13c12e611915646c126f7adde341042fdc37b37b91

See more details on using hashes here.

File details

Details for the file gilda-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: gilda-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 159.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for gilda-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c261dea2d7713dc951271dd94d5a19e6a1c8df9db58f67f7a93f2159c4fea04
MD5 a95c29fa4d3f9285589c8f01e0ca0282
BLAKE2b-256 943ab7683056e3c07f519b3d4f9f473b6f377d687a279820c7c54feb5b7c79fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page