Skip to content
Snippets Groups Projects
Commit 7aa4bdcd authored by Bienchen's avatar Bienchen
Browse files

Updated afdb_proteom_to_data_chunks.py to OST 2.6

parent 1240a82a
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment