Skip to content
Snippets Groups Projects
Commit 19e89983 authored by B13nch3n's avatar B13nch3n
Browse files

Fix names

parent f7731da4
Branches
No related tags found
No related merge requests found
......@@ -24,7 +24,8 @@ COPY requirements.txt ${SRC_DIR}
WORKDIR ${SRC_DIR}
RUN set -e pipefail; \
apt-get update -y; \
apt-get install -y git pip; \
# for development, install venv
apt-get install -y git pip python3.8-venv; \
pip install -r requirements.txt; \
# for development, install black & PyLint
pip install black pylint; \
......
#! /usr/local/bin/ost
"""Translate models from Tara/ Xabi from PDB + extra data into ModelCIF."""
# ToDo [internal]: Add software group for ColabFold and AF2-Multimer
# ToDo [internal]: get DB versions in - https://colabfold.mmseqs.com, scroll
# down to "Database Information"
......@@ -57,7 +56,6 @@ def _parse_args():
class _GlobalPTM(modelcif.qa_metric.Global, modelcif.qa_metric.PTM):
"""Predicted accuracy according to the TM-score score in [0,1]."""
# ToDo [input]: Add software
name = "pTM"
software = None
......@@ -220,9 +218,10 @@ def _check_model_extra_files_present(model_dir, pdb_file):
def _get_audit_authors():
"""Return the list of authors that produced this model."""
# ToDo: tell Xabi that his name can't have a á in mmCIF
return (
"Bartolec T",
"Vázquez-Campos X",
"Vazquez-Campos X",
"Johnson M",
"Norman A",
"Payne R",
......@@ -267,7 +266,7 @@ def _get_protocol_steps_and_software(cnfg_file):
"year": 2022,
"authors": [
"Mirdita M",
"Schütze K",
"Schuetze K",
"Moriwaki Y",
"Heo L",
"Ovchinnikov S",
......@@ -294,7 +293,7 @@ def _get_protocol_steps_and_software(cnfg_file):
"authors": [
"Mirdita M",
"Steinegger M",
"Söding J",
"Soeding J",
],
"doi": "10.1093/bioinformatics/bty1057",
},
......@@ -321,7 +320,7 @@ def _get_protocol_steps_and_software(cnfg_file):
"Antropova N",
"Senior A",
"Green T",
"Žídek A",
"Zidek A",
"Bates R",
"Blackwell S",
"Yim J",
......@@ -613,16 +612,20 @@ def _get_modelcif_protocol(protocol_steps, target_entities, model):
for sft in js_step["software"]:
sftwre.append(_assemble_modelcif_software(sft))
sftwre = modelcif.SoftwareGroup(elements=sftwre)
# if js_step['software_parameters']:
# params = []
# # ToDo [internal]: handle lists!
# for k, v in js_step['software_parameters'].items():
# params.append(
# modelcif.SoftwareParameter(k, v)
# )
# sftwre = modelcif.SoftwareGroup(
# elements=(sftwre,), parameters=params
# )
# ToDo [internal]: add software parameters
if js_step['software_parameters']:
params = []
# ToDo [internal]: handle lists!
for k, v in js_step['software_parameters'].items():
params.append(
modelcif.SoftwareParameter(k, v)
)
if isinstance(sftwre, modelcif.SoftwareGroup):
sftwre.parameters = params
else:
sftwre = modelcif.SoftwareGroup(
elements=(sftwre,), parameters=params
)
if js_step["input"] == "target_sequences":
input_data = modelcif.data.DataGroup(target_entities)
......@@ -710,7 +713,7 @@ def _store_as_modelcif(interaction_name, data_json, ost_ent, file_prfx):
# write modelcif System to file
print(" write to disk...", end="", flush=True)
pstart = timer()
with open(f"{file_prfx}.cif", "w", encoding="utf8") as mmcif_fh:
with open(f"{file_prfx}.cif", "w", encoding="ascii") as mmcif_fh:
modelcif.dumper.write(mmcif_fh, [system])
print(f" ({timer()-pstart:.2f}s)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment