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
fa3473b8
Commit
fa3473b8
authored
3 years ago
by
B13nch3n
Browse files
Options
Downloads
Patches
Plain Diff
Draft of protocol
parent
a7f1fdfe
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
translate2modelcif.py
+131
-48
131 additions, 48 deletions
translate2modelcif.py
with
131 additions
and
48 deletions
translate2modelcif.py
+
131
−
48
View file @
fa3473b8
...
@@ -240,7 +240,10 @@ def _get_protocol_steps_and_software(cnfg_file):
...
@@ -240,7 +240,10 @@ def _get_protocol_steps_and_software(cnfg_file):
step
=
{
step
=
{
"
method_type
"
:
"
modeling
"
,
"
method_type
"
:
"
modeling
"
,
"
name
"
:
"
ma_protocol_step.step_name
"
,
"
name
"
:
"
ma_protocol_step.step_name
"
,
"
details
"
:
"
ma_protocol_step.details
"
,
"
details
"
:
"
Model using AlphaFold-Multimer (AlphaFold v2.2.0),
"
+
"
without amber relaxation and producing 5 models with up to 3
"
+
"
recycles each, starting from paired and unparied MSAs for the
"
+
"
dimers using MMseqs2.
"
,
}
}
# get input data
# get input data
# Must refer to data already in the JSON, so we try keywords
# Must refer to data already in the JSON, so we try keywords
...
@@ -249,31 +252,99 @@ def _get_protocol_steps_and_software(cnfg_file):
...
@@ -249,31 +252,99 @@ def _get_protocol_steps_and_software(cnfg_file):
# Must refer to existing data, so we try keywords
# Must refer to existing data, so we try keywords
step
[
"
output
"
]
=
"
model
"
step
[
"
output
"
]
=
"
model
"
# get software
# get software
step
[
"
software
"
]
=
{
step
[
"
software
"
]
=
[
"
name
"
:
"
ColabFold
"
,
{
"
classification
"
:
"
model building
"
,
"
name
"
:
"
ColabFold
"
,
"
description
"
:
"
software.description
"
,
"
classification
"
:
"
model building
"
,
"
citation
"
:
{
# ToDo: Get description for ColabFold
"
pmid
"
:
None
,
"
description
"
:
"
software.description
"
,
"
title
"
:
"
ColabFold - Making protein folding accessible to all
"
,
"
citation
"
:
{
"
journal
"
:
"
bioRxiv
"
,
"
pmid
"
:
None
,
"
volume
"
:
None
,
"
title
"
:
"
ColabFold - Making protein folding accessible to all
"
,
"
page_range
"
:
None
,
"
journal
"
:
"
bioRxiv
"
,
"
year
"
:
2022
,
"
volume
"
:
None
,
"
authors
"
:
[
"
page_range
"
:
None
,
"
Mirdita M
"
,
"
year
"
:
2022
,
"
Schütze K
"
,
"
authors
"
:
[
"
Moriwaki Y
"
,
"
Mirdita M
"
,
"
Heo L
"
,
"
Schütze K
"
,
"
Ovchinnikov S
"
,
"
Moriwaki Y
"
,
"
Steinegger M
"
,
"
Heo L
"
,
],
"
Ovchinnikov S
"
,
"
doi
"
:
"
10.1101/2021.08.15.456425
"
,
"
Steinegger M
"
,
],
"
doi
"
:
"
10.1101/2021.08.15.456425
"
,
},
"
location
"
:
"
https://github.com/sokrypton/ColabFold
"
,
"
type
"
:
"
package
"
,
"
version
"
:
"
1.2.0
"
,
},
},
"
location
"
:
"
https://github.com/sokrypton/ColabFold
"
,
{
"
type
"
:
"
package
"
,
"
name
"
:
"
MMseqs2
"
,
"
version
"
:
"
1.2.0
"
,
"
classification
"
:
"
data collection
"
,
}
"
description
"
:
"
Many-against-Many sequence searching
"
,
"
citation
"
:
{
"
pmid
"
:
"
30615063
"
,
"
title
"
:
"
MMseqs2 desktop and local web server app for fast,
"
+
"
interactive sequence searches
"
,
"
journal
"
:
"
Bioinformatics
"
,
"
volume
"
:
35
,
"
page_range
"
:
(
2856
,
2858
),
"
year
"
:
2019
,
"
authors
"
:
[
"
Mirdita M
"
,
"
Steinegger M
"
,
"
Söding J
"
,
],
"
doi
"
:
"
10.1093/bioinformatics/bty1057
"
,
},
"
location
"
:
"
https://github.com/soedinglab/mmseqs2
"
,
"
type
"
:
"
package
"
,
"
version
"
:
None
,
},
{
"
name
"
:
"
AlphaFold-Multimer
"
,
"
classification
"
:
"
model building
"
,
"
description
"
:
"
Structure prediction
"
,
"
citation
"
:
{
"
pmid
"
:
None
,
"
title
"
:
"
Protein complex prediction with
"
+
"
AlphaFold-Multimer.
"
,
"
journal
"
:
"
bioRxiv
"
,
"
volume
"
:
None
,
"
page_range
"
:
None
,
"
year
"
:
2021
,
"
authors
"
:
[
"
Evans R
"
,
"
O
'
Neill M
"
,
"
Pritzel A
"
,
"
Antropova N
"
,
"
Senior A
"
,
"
Green T
"
,
"
Žídek A
"
,
"
Bates R
"
,
"
Blackwell S
"
,
"
Yim J
"
,
"
Ronneberger O
"
,
"
Bodenstein S
"
,
"
Zielinski M
"
,
"
Bridgland A
"
,
"
Potapenko A
"
,
"
Cowie A
"
,
"
Tunyasuvunakool K
"
,
"
Jain R
"
,
"
Clancy E
"
,
"
Kohli P
"
,
"
Jumper J
"
,
"
Hassabis D
"
,
],
"
doi
"
:
"
10.1101/2021.10.04.463034
"
,
},
"
location
"
:
"
https://github.com/deepmind/alphafold
"
,
"
type
"
:
"
package
"
,
"
version
"
:
"
2.1.1
"
,
},
]
# get parameters
# get parameters
with
open
(
cnfg_file
,
encoding
=
"
utf8
"
)
as
jfh
:
with
open
(
cnfg_file
,
encoding
=
"
utf8
"
)
as
jfh
:
step
[
"
software_parameters
"
]
=
json
.
load
(
jfh
)
step
[
"
software_parameters
"
]
=
json
.
load
(
jfh
)
...
@@ -285,11 +356,14 @@ def _get_protocol_steps_and_software(cnfg_file):
...
@@ -285,11 +356,14 @@ def _get_protocol_steps_and_software(cnfg_file):
step
=
{
step
=
{
"
method_type
"
:
"
model selection
"
,
"
method_type
"
:
"
model selection
"
,
"
name
"
:
"
ma_protocol_step.step_name
"
,
"
name
"
:
"
ma_protocol_step.step_name
"
,
"
details
"
:
"
ma_protocol_step.details
"
,
"
details
"
:
"
Select best model, which is either the top-ranked model
"
+
"
as determined by the ColabFold pipeline
"
+
"
(iptmscore*0.8+ptmscore*0.2), or else the model with best
"
+
"
congruence with crosslinks reported in the related study.
"
,
}
}
step
[
"
input
"
]
=
"
model
"
step
[
"
input
"
]
=
"
model
"
step
[
"
output
"
]
=
"
model
"
step
[
"
output
"
]
=
"
model
"
step
[
"
software
"
]
=
{}
step
[
"
software
"
]
=
[]
step
[
"
software_parameters
"
]
=
{}
step
[
"
software_parameters
"
]
=
{}
protocol
.
append
(
step
)
protocol
.
append
(
step
)
...
@@ -504,37 +578,46 @@ def _get_modelcif_entities(target_ents, source, asym_units, system):
...
@@ -504,37 +578,46 @@ def _get_modelcif_entities(target_ents, source, asym_units, system):
system
.
target_entities
.
append
(
mdlcif_ent
)
system
.
target_entities
.
append
(
mdlcif_ent
)
def
_assemble_modelcif_software
(
soft_dict
):
"""
Create a modelcif.Software instance from dictionary.
"""
return
modelcif
.
Software
(
soft_dict
[
"
name
"
],
soft_dict
[
"
classification
"
],
soft_dict
[
"
description
"
],
soft_dict
[
"
location
"
],
soft_dict
[
"
type
"
],
soft_dict
[
"
version
"
],
citation
=
ihm
.
Citation
(
pmid
=
soft_dict
[
"
citation
"
][
"
pmid
"
],
title
=
soft_dict
[
"
citation
"
][
"
title
"
],
journal
=
soft_dict
[
"
citation
"
][
"
journal
"
],
volume
=
soft_dict
[
"
citation
"
][
"
volume
"
],
page_range
=
soft_dict
[
"
citation
"
][
"
page_range
"
],
year
=
soft_dict
[
"
citation
"
][
"
year
"
],
authors
=
soft_dict
[
"
citation
"
][
"
authors
"
],
doi
=
soft_dict
[
"
citation
"
][
"
doi
"
],
),
)
def
_get_modelcif_protocol
(
protocol_steps
,
target_entities
,
model
):
def
_get_modelcif_protocol
(
protocol_steps
,
target_entities
,
model
):
"""
Create the protocol for the ModelCIF file.
"""
"""
Create the protocol for the ModelCIF file.
"""
protocol
=
modelcif
.
protocol
.
Protocol
()
protocol
=
modelcif
.
protocol
.
Protocol
()
for
js_step
in
protocol_steps
:
for
js_step
in
protocol_steps
:
sftwre
=
None
sftwre
=
None
# ToDo [input]: Turn into software group if parameters are available
# ToDo [input]: Turn into software group if parameters are available
# ToDo [input]: Get software.description
if
js_step
[
"
software
"
]:
if
js_step
[
"
software
"
]:
sftwre
=
modelcif
.
Software
(
if
len
(
js_step
[
"
software
"
])
==
1
:
js_step
[
"
software
"
][
"
name
"
],
sftwre
=
_assemble_modelcif_software
(
js_step
[
"
software
"
][
0
])
js_step
[
"
software
"
][
"
classification
"
],
else
:
js_step
[
"
software
"
][
"
description
"
],
sftwre
=
[]
js_step
[
"
software
"
][
"
location
"
],
for
sft
in
js_step
[
"
software
"
]:
js_step
[
"
software
"
][
"
type
"
],
sftwre
.
append
(
_assemble_modelcif_software
(
sft
))
js_step
[
"
software
"
][
"
version
"
],
sftwre
=
modelcif
.
SoftwareGroup
(
elements
=
sftwre
)
citation
=
ihm
.
Citation
(
pmid
=
js_step
[
"
software
"
][
"
citation
"
][
"
pmid
"
],
title
=
js_step
[
"
software
"
][
"
citation
"
][
"
title
"
],
journal
=
js_step
[
"
software
"
][
"
citation
"
][
"
journal
"
],
volume
=
js_step
[
"
software
"
][
"
citation
"
][
"
volume
"
],
page_range
=
js_step
[
"
software
"
][
"
citation
"
][
"
page_range
"
],
year
=
js_step
[
"
software
"
][
"
citation
"
][
"
year
"
],
authors
=
js_step
[
"
software
"
][
"
citation
"
][
"
authors
"
],
doi
=
js_step
[
"
software
"
][
"
citation
"
][
"
doi
"
],
),
)
# if js_step['software_parameters']:
# if js_step['software_parameters']:
# params = []
# params = []
# # ToDo [internal]: handle lists!
# # ToDo [internal]: handle lists!
# for k, v in js_step['software_parameters'].items():
# for k, v in js_step['software_parameters'].items():
# print(k, v.__class__)
# params.append(
# params.append(
# modelcif.SoftwareParameter(k, v)
# modelcif.SoftwareParameter(k, v)
# )
# )
...
@@ -711,4 +794,4 @@ if __name__ == "__main__":
...
@@ -711,4 +794,4 @@ if __name__ == "__main__":
# LocalWords: mdlcf mdlcif asym AsymUnit init kwargs atm pos het hetatom pTM
# LocalWords: mdlcf mdlcif asym AsymUnit init kwargs atm pos het hetatom pTM
# LocalWords: biso ujson GlobalPTM pLDDT ptm jfh numpy np GlobalPLDDT lDDT
# LocalWords: biso ujson GlobalPTM pLDDT ptm jfh numpy np GlobalPLDDT lDDT
# LocalWords: plddt LocalPLDDT timeit PAE MetricType LocalPairwisePAE lpae
# LocalWords: plddt LocalPLDDT timeit PAE MetricType LocalPairwisePAE lpae
# LocalWords: nd pae qa pstart
# LocalWords: nd pae qa pstart
ColabFold
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