Skip to main content

Simple drug linking

Project description

DrugLinker

This package is a simple tool to obtain all unique drug identifiers that match a given input string. It does so by matching the input term with DrugBank open-data vocabulary : https://www.drugbank.ca/releases/latest#open-data. It is useful to process candidate drug tokens after drug named-entity recognition (NER) or to directly match sentences after tokenization,

To install the package run:

git clone https://github.com/fgh95/DrugLinker
cd DrugLinker
pip install .

Example of use:

from druglinker import dbsearch
dbsearch.get_ids("amox")
# output: ["DB01060"]
dbsearch.get_ids("amoxicillin")
# output: ["DB01060"]
dbsearch.get_ids("vancomycin")
# output: ["DB00512"]

# Simple sentence tagging:

text = "20mg of midazolam were administered intravenously"
for term in string.split():
    ids = dbsearch.get_ids(term)
    if ids:
        print(term)
        print(ids)

# output:
# midazolam
# ['DB00683']

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

druglinker-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

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

druglinker-0.1.0-py3-none-any.whl (715.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: druglinker-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for druglinker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 670e0394a537709d004b9d8828db4c68093f516822e6dfd9738445907e2486fa
MD5 614270982d7594c60c3b2b9231d7113f
BLAKE2b-256 d83100e9eb704b9913a2e83d21ebbb032822e725d9d1fc165848e67a4e944647

See more details on using hashes here.

File details

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

File metadata

  • Download URL: druglinker-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 715.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for druglinker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9deab878c1e5054eac075c8ba0a78879cf2a5a95b267baec96e864241784bece
MD5 eed95392877599ce5b92e9bde7f2feaf
BLAKE2b-256 711dc713f61b50cde9986c225f0bd8343e3d422d7d3666c9a4ebc267de3f75e8

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