From 076eb242f909ed23d05dd29cbdfc35e7976c60d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kerem=20=C3=96rer?= <161973110+thecubedaryl@users.noreply.github.com> Date: Sun, 8 Mar 2026 23:25:44 +0300 Subject: [PATCH 1/2] Update data_processing.py --- data_processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_processing.py b/data_processing.py index e288957..ffda517 100644 --- a/data_processing.py +++ b/data_processing.py @@ -451,7 +451,7 @@ def get_chembl_from_uniprot(uniprot_id: str) -> list: r = requests.get(url) r.raise_for_status() data = r.json().get('targets', []) - return [t['target_id'] for t in data] + return [t['target_chembl_id'] for t in data] # 6) Fetch inactive compounds for a ChEMBL target @@ -459,7 +459,7 @@ def fetch_inactive_compounds(chembl_target_id, pchembl_threshold) -> list: print("fetch_inactive_compounds started") url = "https://www.ebi.ac.uk/chembl/api/data/activity.json" params = { - 'target_id': chembl_target_id, + 'target_chembl_id': chembl_target_id, 'pchembl_value__lt': pchembl_threshold, 'limit': 10000 } From 1e1a0e6346594024ae1628d6a4ca6f305b61d9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kerem=20=C3=96rer?= <161973110+thecubedaryl@users.noreply.github.com> Date: Sun, 8 Mar 2026 23:28:40 +0300 Subject: [PATCH 2/2] Update chembl_downloading.py --- chembl_downloading.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chembl_downloading.py b/chembl_downloading.py index 6851eb7..35d6930 100644 --- a/chembl_downloading.py +++ b/chembl_downloading.py @@ -71,10 +71,10 @@ async def fetch_activities_async(self, session: aiohttp.ClientSession, target_id base_url = "https://www.ebi.ac.uk/chembl/api/data/activity.json" params = { - 'target_id__in': ','.join(target_ids), + 'target_chembl_id__in': ','.join(target_ids), 'assay_type__in': ','.join(assay_types), 'pchembl_value__isnull': 'false', - 'only': 'molecule_chembl_id,pchembl_value,target_id,bao_label' + 'only': 'molecule_chembl_id,pchembl_value,target_chembl_id,bao_label' } # First request to get total count and setup pagination @@ -208,7 +208,7 @@ async def fetch_all_protein_targets_async(self) -> List[str]: base_url = "https://www.ebi.ac.uk/chembl/api/data/target.json" params = { 'target_type': 'SINGLE PROTEIN', - 'only': 'target_id' + 'only': 'target_chembl_id' } async with await self.create_session() as session: @@ -377,4 +377,4 @@ def download_target(args): args = parser.parse_args() - download_target(args) \ No newline at end of file + download_target(args)