From 7aa4bdcdb45c1dd1da5bd385101755a2986f7568 Mon Sep 17 00:00:00 2001
From: Stefan Bienert <stefan.bienert@unibas.ch>
Date: Mon, 4 Dec 2023 16:51:14 +0100
Subject: [PATCH] Updated afdb_proteom_to_data_chunks.py to OST 2.6

---
 .../afdb_modelling/afdb_proteom_to_data_chunks.py           | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/extras/data_generation/afdb_modelling/afdb_proteom_to_data_chunks.py b/extras/data_generation/afdb_modelling/afdb_proteom_to_data_chunks.py
index 895d7e44..9107df01 100644
--- a/extras/data_generation/afdb_modelling/afdb_proteom_to_data_chunks.py
+++ b/extras/data_generation/afdb_modelling/afdb_proteom_to_data_chunks.py
@@ -53,7 +53,7 @@ def iterate_proteom(tarball):
                                                           process=True)
             yield (tar_info.name, ent, mmcif_info, seqres)
 
-def process_proteom(tarball, ca_only=False):
+def process_proteom(tarball, ca_only=False, omf_max_error=0.0):
     """ Helper: Creates list of entries for one proteom
 
     :param tarball: Path to proteom tarball
@@ -63,7 +63,7 @@ def process_proteom(tarball, ca_only=False):
     :returns: :class: list of :class:`tuple` in format required by
               :func:`FromDataChunks`
     """
-    omf_opts = io.OMFOption.DEFAULT_PEPLIB | io.OMFOption.LOSSY | \
+    omf_opts = io.OMFOption.DEFAULT_PEPLIB | \
                io.OMFOption.AVG_BFACTORS | io.OMFOption.ROUND_BFACTORS | \
                io.OMFOption.SKIP_SS | io.OMFOption.INFER_PEP_BONDS
 
@@ -80,7 +80,7 @@ def process_proteom(tarball, ca_only=False):
             ent = mol.CreateEntityFromView(ent, False)
         ent_name = f"{uniprot_ac} {fragment} {version}"
         ent.SetName(ent_name)
-        omf = io.OMF.FromMMCIF(ent, entry[2], omf_opts)
+        omf = io.OMF.FromEntity(ent, max_error=omf_max_error, options=omf_opts)
         omf = gzip.compress(omf.ToBytes())
         entries.append([uniprot_ac, fragment, version, omf])
     return entries
-- 
GitLab