Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
ma-wilkins-import
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
ma-wilkins-import
Commits
19e89983
Commit
19e89983
authored
2 years ago
by
B13nch3n
Browse files
Options
Downloads
Patches
Plain Diff
Fix names
parent
f7731da4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+2
-1
2 additions, 1 deletion
Dockerfile
translate2modelcif.py
+20
-17
20 additions, 17 deletions
translate2modelcif.py
with
22 additions
and
18 deletions
Dockerfile
+
2
−
1
View file @
19e89983
...
...
@@ -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; \
...
...
This diff is collapsed.
Click to expand it.
translate2modelcif.py
+
20
−
17
View file @
19e89983
#! /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
"
,
"
V
a
zquez-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
"
,
"
Sch
ue
tze 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
"
,
"
S
oe
ding 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
"
,
"
Zi
dek 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
:
.
2
f
}
s)
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment