Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve all drugs that bind to a list of proteins #81

Open
CryoSky opened this issue Apr 23, 2020 · 0 comments
Open

Retrieve all drugs that bind to a list of proteins #81

CryoSky opened this issue Apr 23, 2020 · 0 comments

Comments

@CryoSky
Copy link

CryoSky commented Apr 23, 2020

To whom it may concern,
I want to reproduce the report of a paper https://www.biorxiv.org/content/10.1101/2020.03.22.002386v1. In this paper, the authors find 322 proteins that interact with SARS-CoV-2 and find the drugs that related to these proteins. I already download the Uniprot ID for each of these proteins, and I have converted them to CHEMBL ID. Now I have a list file of CHEMBL ID that represents proteins, I want to find all phase 4 drugs that interact with these proteins. The following is my code.

from chembl_webresource_client.new_client import new_client
chembl_id = []
with open("chembd_list_human.txt", "r") as fopen:
lines = fopen.readlines()
for line in lines:
chembl_id.append(line.split()[0])
#chembl_id = ['CHEMBL1163125', 'CHEMBL2095186']
for node in chembl_id:
activities = new_client.mechanism.filter(target_chembl_id=node)
compound_ids = [x['molecule_chembl_id'] for x in activities]
approved_drugs = new_client.molecule.filter(molecule_chembl_id__in=compound_ids).filter(max_phase=4)
for drug in approved_drugs:
for key, value in drug.items():
if key=='molecule_chembl_id':
print(value)

However, from this code I only get a very little subset of the results that the paper represented. Could anyone give any suggestions how to get a better search strategy?
Best wishes,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant