Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlphaPulldown-ModelCIF-Conversion
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Bienchen
AlphaPulldown-ModelCIF-Conversion
Commits
a28ca7de
Commit
a28ca7de
authored
1 year ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Get first protocol step
parent
9827ae0e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
convert_to_modelcif.py
+32
-5
32 additions, 5 deletions
convert_to_modelcif.py
with
32 additions
and
5 deletions
convert_to_modelcif.py
+
32
−
5
View file @
a28ca7de
...
...
@@ -246,17 +246,36 @@ def _get_modelcif_protocol_input(
return
input_data
def
_get_modelcif_protocol_output
(
output_data_group
,
model
):
"""
Assemble output data for a ModelCIF protocol step.
"""
if
output_data_group
==
"
model
"
:
output_data
=
model
elif
output_data_group
==
"
monomer_pickle_files
"
:
output_data
=
modelcif
.
data
.
DataGroup
(
[
modelcif
.
data
.
Data
(
"
Pickle files
"
,
details
=
"
Monomer feature/ MSA pickle files
"
)
]
)
else
:
raise
RuntimeError
(
f
"
Unknown protocol output:
'
{
output_data_group
}
'"
)
return
output_data
def
_get_modelcif_protocol
(
protocol_steps
,
target_entities
,
model
,
sw_dict
,
ref_dbs
):
"""
Create the protocol for the ModelCIF file.
"""
protocol
=
modelcif
.
protocol
.
Protocol
()
for
js_step
in
protocol_steps
:
# assemble input data
# assemble input
& output
data
input_data
=
_get_modelcif_protocol_input
(
js_step
[
"
input_data_group
"
],
target_entities
,
ref_dbs
,
model
)
output_data
=
_get_modelcif_protocol_output
(
js_step
[
"
output_data_group
"
],
model
)
# loop over software group and assemble software group from that
sw_grp
=
modelcif
.
SoftwareGroup
()
for
pss
in
js_step
[
"
software_group
"
]:
# protocol step software
...
...
@@ -277,7 +296,7 @@ def _get_modelcif_protocol(
protocol
.
steps
.
append
(
modelcif
.
protocol
.
Step
(
input_data
=
input_data
,
output_data
=
None
,
#
output_data,
output_data
=
output_data
,
name
=
js_step
[
"
step_name
"
],
details
=
js_step
[
"
details
"
],
software
=
sw_grp
,
...
...
@@ -285,7 +304,7 @@ def _get_modelcif_protocol(
)
print
(
"
modelcif.protocol.Step(
"
)
print
(
f
"
input_data=
{
input_data
}
,
"
)
#
output_data=output_data
,
print
(
f
"
output_data=
{
output_data
}
,
"
)
print
(
f
"
name=
{
js_step
[
'
step_name
'
]
}
,
"
)
print
(
f
"
details=
\"
{
js_step
[
'
details
'
]
}
\"
,
"
)
print
(
f
"
software=
{
sw_grp
}
,
"
)
...
...
@@ -697,7 +716,15 @@ def _get_software_data(meta_json: dict) -> list:
None
,
cite_hhsuite
,
),
"
hmmbuild
"
:
None
,
"
hmmbuild
"
:
modelcif
.
Software
(
"
hmmbuild
"
,
"
data collection
"
,
"
Building HMM search profiles
"
,
"
http://hmmer.org/
"
,
"
program
"
,
None
,
None
,
),
"
hmmsearch
"
:
None
,
"
jackhmmer
"
:
None
,
"
kalign
"
:
None
,
...
...
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