diff --git a/Dockerfile b/Dockerfile index fd187295b82a6aacc308402f20325fff1a63fbd6..9eb82c88340928f1df58c97a41271c5ecf804369 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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) diff --git a/translate2modelcif.py b/translate2modelcif.py index 8b91dcfdbffe1bd6042f4a812d40e7b51dcf831b..b0ff7fe28eeda8df3380f174207b5f1b4a5e7f67 100644 --- a/translate2modelcif.py +++ b/translate2modelcif.py @@ -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)