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

Allow multiple chains per entity

parent d2de4edd
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ ENV SRC_DIR="/tmp" \
LABEL org.openstructure.base-image="${VERSION_OST}"
LABEL org.openstructure.translate2modelcif="2022-04-08.1"
LABEL org.openstructure.translate2modelcif="2022-11-09.1"
LABEL maintainer="Stefan Bienert <stefan.bienert@unibas.ch>"
LABEL vendor1="Schwede Group (schwedelab.org)"
LABEL vendor2="SIB - Swiss Institute of Bioinformatics (sib.swiss)"
......@@ -37,7 +37,8 @@ RUN set -e pipefail; \
python3 setup.py build; \
python3 setup.py install; \
rm -rf ${SRC_DIR}/modelcif.git; \
apt-get remove -y git pip
apt-get remove -y git pip; \
apt-get -y autoremove
# switch to development version via build-arg
ARG ADD_DEV
......@@ -46,6 +47,7 @@ RUN set -e pipefail; \
apt-get install -y pip emacs; \
pip install black pylint; \
apt-get remove -y pip; \
apt-get -y autoremove; \
fi
## Copy tool(s)
......
......@@ -662,14 +662,13 @@ def _get_upkb_for_sequence(sqe, up_ac):
def _get_entities(pdb_file, up_acs):
"""Gather data for the mmCIF (target) entities."""
entities = []
ost_ent = io.LoadPDB(pdb_file)
for i, chn in enumerate(ost_ent.chains):
cif_ent = {}
sqe = _get_sequence(chn)
upkb = _get_upkb_for_sequence(sqe, up_acs[i])
cif_ent["pdb_sequence"] = sqe
cif_ent["pdb_chain_id"] = chn.name
cif_ent["pdb_chain_id"] = [chn.name]
cif_ent["description"] = (
f"{upkb['up_organism']} {upkb['up_gn']} " f"({upkb['up_ac']})"
)
......@@ -712,7 +711,8 @@ def _get_modelcif_entities(target_ents, source, asym_units, system):
)
],
)
asym_units[cif_ent["pdb_chain_id"]] = modelcif.AsymUnit(mdlcif_ent)
for pdb_chain_id in cif_ent["pdb_chain_id"]:
asym_units[pdb_chain_id] = modelcif.AsymUnit(mdlcif_ent)
system.target_entities.append(mdlcif_ent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment