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
fb58f416
Commit
fb58f416
authored
3 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Add target entities
parent
bc1eae2a
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
translate2modelcif.py
+25
-17
25 additions, 17 deletions
translate2modelcif.py
with
25 additions
and
17 deletions
translate2modelcif.py
+
25
−
17
View file @
fb58f416
...
...
@@ -230,28 +230,36 @@ def _get_entities(pdb_file, up_acs):
def
_store_as_modelcif
(
interaction_name
,
data_json
,
file_prfx
):
"""
Mix all the data into a ModelCIF file.
"""
# create target references, ...
for
cif_ent
in
data_json
[
"
target_entities
"
]:
# 'cif_sequence'
ref
=
modelcif
.
reference
.
UniProt
(
cif_ent
[
"
up_id
"
],
cif_ent
[
"
up_ac
"
],
# careful: alignments are just that easy because of equal sequences!
align_begin
=
1
,
align_end
=
cif_ent
[
"
up_seqlen
"
],
isoform
=
cif_ent
[
"
up_isoform
"
],
ncbi_taxonomy_id
=
cif_ent
[
"
up_ncbi_taxid
"
],
organism_scientific
=
cif_ent
[
"
up_organism
"
],
sequence_version_date
=
cif_ent
[
"
up_last_mod
"
],
sequence_crc64
=
cif_ent
[
"
up_crc64
"
],
)
# create system to gather all the data
system
=
modelcif
.
System
(
title
=
data_json
[
"
title
"
],
id
=
interaction_name
.
upper
(),
model_details
=
data_json
[
"
model_details
"
],
)
# create target entities, references, ...
for
cif_ent
in
data_json
[
"
target_entities
"
]:
# ToDo [input]: Get entity description
mdlcif_ent
=
modelcif
.
Entity
(
cif_ent
[
"
cif_sequence
"
],
description
=
"
entity.pdbx_description
"
,
references
=
[
modelcif
.
reference
.
UniProt
(
cif_ent
[
"
up_id
"
],
cif_ent
[
"
up_ac
"
],
# Careful: alignments are just that easy because of equal
# sequences!
align_begin
=
1
,
align_end
=
cif_ent
[
"
up_seqlen
"
],
isoform
=
cif_ent
[
"
up_isoform
"
],
ncbi_taxonomy_id
=
cif_ent
[
"
up_ncbi_taxid
"
],
organism_scientific
=
cif_ent
[
"
up_organism
"
],
sequence_version_date
=
cif_ent
[
"
up_last_mod
"
],
sequence_crc64
=
cif_ent
[
"
up_crc64
"
],
)
],
)
system
.
entities
.
append
(
mdlcif_ent
)
system
.
target_entities
.
append
(
mdlcif_ent
)
# audit_authors
system
.
authors
.
extend
(
data_json
[
"
audit_authors
"
])
...
...
@@ -320,4 +328,4 @@ if __name__ == "__main__":
# LocalWords: sqe olc ACDEFGHIKLMNPQRSTVWY RuntimeError upkb txt pylint iter
# LocalWords: rspns unicode startswith sline len elif NCBI TaxID ncbi taxid
# LocalWords: seqlen crc ISOFORM DT dt flds isoforms isoform ent LoadPDB
# LocalWords: mdlcf
# LocalWords: mdlcf
mdlcif
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