From 9555b26b6ee5806df74d5419420402f6ab6c7bf0 Mon Sep 17 00:00:00 2001 From: roshan Date: Wed, 17 Sep 2025 16:29:46 +0100 Subject: [PATCH 1/5] updated dependencies in pyproject.toml and poetry.lock --- poetry.lock | 26 +++++++++++++------------- pyproject.toml | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8b1293e..4f3e1b2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -786,23 +786,23 @@ xml = ["lxml (>=4.9.2)"] [[package]] name = "pdbeccdutils" -version = "0.8.6" +version = "1.0.0" description = "Toolkit to parse and process small molecules in wwPDB" optional = false -python-versions = "<4.0,>=3.10" +python-versions = "<4,>=3.10" files = [ - {file = "pdbeccdutils-0.8.6-py3-none-any.whl", hash = "sha256:916006926c907aeed7d04a8faac2cb5014dc89b6f2731c0334999ae4b33a36f2"}, - {file = "pdbeccdutils-0.8.6.tar.gz", hash = "sha256:58b97d6b3aa517177ee6e7bb4bd442fd3ed5c978944dd5abf5259450ed1c94eb"}, + {file = "pdbeccdutils-1.0.0-py3-none-any.whl", hash = "sha256:dcc6bcb363f9cb0f9be15c465abf2a56809926d8275ccdc50d4f8438ab776c7b"}, + {file = "pdbeccdutils-1.0.0.tar.gz", hash = "sha256:d32ba6772a4224e5e2727afc25fc8d08590a64b853ffe8351412fff465ab8fd9"}, ] [package.dependencies] -gemmi = ">=0.6.6,<0.7.0" -networkx = ">=3.3,<4.0" -numpy = ">=1.26.4,<1.27.0" -pillow = ">=10.4.0,<11.0.0" -rdkit = "2023.9.6" -requests = ">=2.32.3,<3.0.0" -scipy = ">=1.14.1,<2.0.0" +gemmi = ">=0.6.6" +networkx = ">=3.3" +numpy = ">=1.26.4" +pillow = ">=10.4.0" +rdkit = ">=2023.9.6" +requests = ">=2.32.3" +scipy = ">=1.14.1" [[package]] name = "pillow" @@ -1534,5 +1534,5 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "9065b89cf46987100ed21a5cb351edf1b6c5c6a30a0f0edadaf1980d878935a0" +python-versions = ">=3.10,<4" +content-hash = "c38ff05e73d46cce75dcf77fa044fc4ee49ce3323514193c771279140719c23b" diff --git a/pyproject.toml b/pyproject.toml index 3e12e1f..14af75b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,11 +19,11 @@ classifiers = [ [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10,<4" click = "8.1.7" -pdbeccdutils = "^0.8.6" +pdbeccdutils = ">=1.0.0" sparqlwrapper = "^2.0.0" -pandas = "^2.2.3" +pandas = ">=2.2.3" From 97e9a00df7e9779b8bf8a2f29a3a8a52c522450f Mon Sep 17 00:00:00 2001 From: roshan Date: Wed, 17 Sep 2025 16:33:06 +0100 Subject: [PATCH 2/5] version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14af75b..a159465 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pdberellig" -version = "1.0.1" +version = "1.0.2" description = "A toolkit for functional annotation of ligands in the PDB" authors = ["Ibrahim Roshan Kunnakkattu "] readme = "README.md" From 8b1c82532d6efda48f75a385163ae33f34ce7d08 Mon Sep 17 00:00:00 2001 From: roshan Date: Wed, 17 Sep 2025 17:03:36 +0100 Subject: [PATCH 3/5] updated dependencies in pyproject.toml and poetry.lock --- poetry.lock | 26 +++++++++++++------------- pyproject.toml | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8b1293e..4f3e1b2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -786,23 +786,23 @@ xml = ["lxml (>=4.9.2)"] [[package]] name = "pdbeccdutils" -version = "0.8.6" +version = "1.0.0" description = "Toolkit to parse and process small molecules in wwPDB" optional = false -python-versions = "<4.0,>=3.10" +python-versions = "<4,>=3.10" files = [ - {file = "pdbeccdutils-0.8.6-py3-none-any.whl", hash = "sha256:916006926c907aeed7d04a8faac2cb5014dc89b6f2731c0334999ae4b33a36f2"}, - {file = "pdbeccdutils-0.8.6.tar.gz", hash = "sha256:58b97d6b3aa517177ee6e7bb4bd442fd3ed5c978944dd5abf5259450ed1c94eb"}, + {file = "pdbeccdutils-1.0.0-py3-none-any.whl", hash = "sha256:dcc6bcb363f9cb0f9be15c465abf2a56809926d8275ccdc50d4f8438ab776c7b"}, + {file = "pdbeccdutils-1.0.0.tar.gz", hash = "sha256:d32ba6772a4224e5e2727afc25fc8d08590a64b853ffe8351412fff465ab8fd9"}, ] [package.dependencies] -gemmi = ">=0.6.6,<0.7.0" -networkx = ">=3.3,<4.0" -numpy = ">=1.26.4,<1.27.0" -pillow = ">=10.4.0,<11.0.0" -rdkit = "2023.9.6" -requests = ">=2.32.3,<3.0.0" -scipy = ">=1.14.1,<2.0.0" +gemmi = ">=0.6.6" +networkx = ">=3.3" +numpy = ">=1.26.4" +pillow = ">=10.4.0" +rdkit = ">=2023.9.6" +requests = ">=2.32.3" +scipy = ">=1.14.1" [[package]] name = "pillow" @@ -1534,5 +1534,5 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "9065b89cf46987100ed21a5cb351edf1b6c5c6a30a0f0edadaf1980d878935a0" +python-versions = ">=3.10,<4" +content-hash = "c38ff05e73d46cce75dcf77fa044fc4ee49ce3323514193c771279140719c23b" diff --git a/pyproject.toml b/pyproject.toml index 3e12e1f..a159465 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pdberellig" -version = "1.0.1" +version = "1.0.2" description = "A toolkit for functional annotation of ligands in the PDB" authors = ["Ibrahim Roshan Kunnakkattu "] readme = "README.md" @@ -19,11 +19,11 @@ classifiers = [ [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10,<4" click = "8.1.7" -pdbeccdutils = "^0.8.6" +pdbeccdutils = ">=1.0.0" sparqlwrapper = "^2.0.0" -pandas = "^2.2.3" +pandas = ">=2.2.3" From 49db7225465e1ac594063299de4f8844f2b0a22c Mon Sep 17 00:00:00 2001 From: roshan Date: Mon, 20 Oct 2025 11:21:32 +0100 Subject: [PATCH 4/5] update pdbe api url and chebi file url --- pdberellig/conf/conf.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdberellig/conf/conf.ini b/pdberellig/conf/conf.ini index 86b8125..2af788d 100644 --- a/pdberellig/conf/conf.ini +++ b/pdberellig/conf/conf.ini @@ -2,7 +2,7 @@ reactants_threshold=0.7 similarities_threshold=0.6 minimal_ligand_size=5 -api_base_url=https://wwwdev.ebi.ac.uk/pdbe/aggregated-api +api_base_url=https://www.ebi.ac.uk/pdbe/aggregated-api [cofactor] template_path=cofactors/templates @@ -11,4 +11,4 @@ details=cofactors/cofactors_details.json ec=cofactors/cofactor_ec.csv [reactant] -chebi_structure_file=https://ftp.ebi.ac.uk/pub/databases/chebi/Flat_file_tab_delimited/structures.csv.gz +chebi_structure_file=https://ftp.ebi.ac.uk/pub/databases/chebi/flat_files/structures.tsv.gz From 0cb36a0a2849b1c8dd9fb27174e121ae495d0dac Mon Sep 17 00:00:00 2001 From: roshan Date: Mon, 20 Oct 2025 11:28:50 +0100 Subject: [PATCH 5/5] update chebi flat file column names --- pdberellig/core/reactants.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pdberellig/core/reactants.py b/pdberellig/core/reactants.py index bdc986a..39e4adc 100644 --- a/pdberellig/core/reactants.py +++ b/pdberellig/core/reactants.py @@ -162,25 +162,27 @@ def parse_chebi(self, chebi_ids: list[str]) -> list[CompareObj]: self.chebi = pd.read_csv(chebi_structure_file, dtype=str) self.chebi = self.chebi.loc[ - (self.chebi["COMPOUND_ID"].isin(chebi_ids)) - & (self.chebi["TYPE"] == "mol") - & (self.chebi["DEFAULT_STRUCTURE"] == "Y"), - ["COMPOUND_ID", "STRUCTURE"], + (self.chebi["compound_id"].isin(chebi_ids)) + & (self.chebi["status_id"] == 1) # include only ChEBI curated entires + & ( + self.chebi["default_structure"] == "TRUE" + ), # include only with structure + ["compound_id", "molfile"], ] for _, row in self.chebi.iterrows(): try: - chebi_mol = Chem.MolFromMolBlock(row["STRUCTURE"]) + chebi_mol = Chem.MolFromMolBlock(row["molfile"]) chebi_mol_no_h = Chem.RemoveHs(chebi_mol) if len(chebi_mol_no_h.GetAtoms()) < self.args.minimal_ligand_size: # chebi is too small. - self.log.debug(f"""Number of atoms in {row["COMPOUND_ID"]} is less + self.log.debug(f"""Number of atoms in {row["compound_id"]} is less than {self.args.minimal_ligand_size}, hence skipping""") else: - templates.append(CompareObj(row["COMPOUND_ID"], chebi_mol_no_h)) + templates.append(CompareObj(row["compound_id"], chebi_mol_no_h)) except Exception: - self.log.warn(f"Couldn't parse {row['COMPOUND_ID']} using RDKit") + self.log.warn(f"Couldn't parse {row['compound_id']} using RDKit") return templates