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
5ae17c64
Commit
5ae17c64
authored
1 year ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Foxed gathering entities
parent
45ffa009
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
+8
-10
8 additions, 10 deletions
convert_to_modelcif.py
with
8 additions
and
10 deletions
convert_to_modelcif.py
+
8
−
10
View file @
5ae17c64
...
...
@@ -289,8 +289,6 @@ def _store_as_modelcif(
# the JSON data/ does the JSON data look different for each mode?
# - are the scores only calculated by alpha-analysis.sif or do they
# come out of run_multimer_jobs.py? Does this go into its own step?
# - could Jupyter notebooks be included as associated file or do they
# require the pickle files?
# - what about including the tabular summary?
# - model selection: only if just a certain model is translated to
# ModelCIF, or mix it with scoring step?
...
...
@@ -442,12 +440,8 @@ def _get_entities(
structure
=
PDBParser
().
get_structure
(
"
_
"
.
join
(
cmplx_name
),
pdb_file
)
cif_json
[
"
target_entities
"
]
=
[]
already_seen
=
[]
# ToDo: skip using chains to make it safe for models with ligands. Chains
# are only used for the chain ID. That can be obtained from the first
# residue in the sequence: seq[0].parent.id
for
chn
,
seq
in
zip
(
structure
.
get_chains
(),
PPBuilder
().
build_peptides
(
structure
)
):
for
seq
in
PPBuilder
().
build_peptides
(
structure
):
chn_id
=
seq
[
0
].
parent
.
id
seq
=
seq
.
get_sequence
()
seq_md5
=
hashlib
.
md5
(
seq
.
encode
()).
hexdigest
()
cif_ent
=
{}
...
...
@@ -456,10 +450,10 @@ def _get_entities(
except
ValueError
:
pass
else
:
cif_json
[
"
target_entities
"
][
e_idx
][
"
pdb_chain_id
"
].
append
(
chn
.
id
)
cif_json
[
"
target_entities
"
][
e_idx
][
"
pdb_chain_id
"
].
append
(
chn
_
id
)
continue
cif_ent
[
"
pdb_sequence
"
]
=
seq
cif_ent
[
"
pdb_chain_id
"
]
=
[
chn
.
id
]
cif_ent
[
"
pdb_chain_id
"
]
=
[
chn
_
id
]
cif_ent
[
"
description
"
]
=
sequences
[
seq_md5
]
cif_json
[
"
target_entities
"
].
append
(
cif_ent
)
already_seen
.
append
(
sequences
[
seq_md5
])
...
...
@@ -710,5 +704,9 @@ if __name__ == "__main__":
# ToDo: where to store which model was chosen? Should be in Tara's models.
# ToDo: make sure all functions come with types
# From former discussions:
# - including Jupyter notebooks would require adding the pickle files to the
# associated files (too much storage needed for that)
# LocalWords: ToDo AlphaPulldown PAEs dir struct coevolution MSA py modeling
# LocalWords: multimer sif Jupyter aa MSAs
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