A tool to resolve messy drug names in biomedical datasets to standard identifiers
Project description
Drug Resolver
This package offers a simple way to resolve drug names to their corresponding PubChem entries.
This is useful for identifying unknown drug synonyms or matching drug synonyms across different datasets in an automated way.
Installation
pip install drug-resolver
Usage
from drug_resolver import resolve_drug
d1 = resolve_drug("tetracycline hcl")
print(d1)
"""
ResolvedDrug(
name='Tetracycline hydrochloride',
pubchem_compound_id='54704426',
pubchem_substance_id='103591391',
smiles='CN(C)C1C(=O)C(C(N)=O)=C(O)C2(O)C(=O)C3=C(O)c4c(O)cccc4C(C)(O)C3CC12.Cl',
drug_classes=None,
fda_approval=<FDAApprovalStatus.APPROVED: 'APPROVED'>,
pubchem_parent_compound_id='54675776')
"""
d2 = resolve_drug("Sumycin")
print(d2)
"""
ResolvedDrug(
name='Tetracycline',
pubchem_compound_id='54675776',
pubchem_substance_id='124766046',
smiles='CN(C)C1C(=O)C(C(N)=O)=C(O)C2(O)C(=O)C3=C(O)c4c(O)cccc4C(C)(O)C3CC12',
drug_classes=frozenset({'Established Pharmacologic Class [EPC] - Tetracycline-class Antimicrobial'}),
fda_approval=<FDAApprovalStatus.APPROVED: 'APPROVED'>,
pubchem_parent_compound_id=None)
"""
assert d1 == d2 # True
The equality operator between ResolvedDrug objects will return True under the following conditions:
- The
pubchem_compound_idattribute is the same - The
pubchem_substance_idattribute is the same - The
smilesstrings refer to the same molecule - Two compounds share the same
pubchem_parent_compound_idor thepubchem_compound_idis the same as thepubchem_parent_compound_idof the other compound.
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
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 drug_resolver-0.0.4.tar.gz.
File metadata
- Download URL: drug_resolver-0.0.4.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b633932553f070e0dce240627a0b56ab38e8460e61e72762385a27e0dbaeab9
|
|
| MD5 |
597f7b9646c6537cf27a29a1467c20c2
|
|
| BLAKE2b-256 |
30d08f7325f6569bf4f1984b1bd42b7e22f21387319e0c387990bb8afadf8c26
|
Provenance
The following attestation bundles were made for drug_resolver-0.0.4.tar.gz:
Publisher:
release.yml on tansey-lab/drug-resolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drug_resolver-0.0.4.tar.gz -
Subject digest:
6b633932553f070e0dce240627a0b56ab38e8460e61e72762385a27e0dbaeab9 - Sigstore transparency entry: 167275991
- Sigstore integration time:
-
Permalink:
tansey-lab/drug-resolver@2c38316b65419b56d8043f0ed853a88c860a7a2b -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/tansey-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c38316b65419b56d8043f0ed853a88c860a7a2b -
Trigger Event:
push
-
Statement type:
File details
Details for the file drug_resolver-0.0.4-py3-none-any.whl.
File metadata
- Download URL: drug_resolver-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df935d86f13c009dbc0490ea38f7d6f34257f358f3e6d34e3b2f7a2aed34b8d4
|
|
| MD5 |
ce51be3e1f71d411c05dd778534a8c87
|
|
| BLAKE2b-256 |
d1be01fba8eb7fa74bba87319da6e284a0508e0c16721c6ef88f828122a2bb35
|
Provenance
The following attestation bundles were made for drug_resolver-0.0.4-py3-none-any.whl:
Publisher:
release.yml on tansey-lab/drug-resolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drug_resolver-0.0.4-py3-none-any.whl -
Subject digest:
df935d86f13c009dbc0490ea38f7d6f34257f358f3e6d34e3b2f7a2aed34b8d4 - Sigstore transparency entry: 167275992
- Sigstore integration time:
-
Permalink:
tansey-lab/drug-resolver@2c38316b65419b56d8043f0ed853a88c860a7a2b -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/tansey-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c38316b65419b56d8043f0ed853a88c860a7a2b -
Trigger Event:
push
-
Statement type: