Last active
August 29, 2015 14:15
-
-
Save mnowotka/a1bb14ef0f71be76a051 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from chembl_webresource_client.new_client import new_client | |
# Get Molecules with ATC 'A10' classification | |
molecules = new_client.molecule.filter(atc_classifications__level5__startswith='A10') | |
molecule_ids = list(set(map(lambda d: d['molecule_chembl_id'], molecules))) | |
print molecule_ids | |
# Get Targets for Molecules | |
activities = new_client.activity.filter(molecule_chembl_id__in=molecule_ids).filter(pchembl_value__gte=6) | |
target_ids = list(set(map(lambda d: d['target_chembl_id'], activities))) | |
print target_ids | |
assert(len(target_ids)==59) | |
# Get TargetComponents for Targets | |
# Get UniProt accessions for TargetComponents |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment