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
3b525a1a
Commit
3b525a1a
authored
3 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Add sequence source
parent
fb58f416
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
+11
-2
11 additions, 2 deletions
translate2modelcif.py
with
11 additions
and
2 deletions
translate2modelcif.py
+
11
−
2
View file @
3b525a1a
...
...
@@ -7,6 +7,7 @@ import sys
import
requests
import
ihm
import
modelcif
import
modelcif.dumper
import
modelcif.reference
...
...
@@ -236,12 +237,18 @@ def _store_as_modelcif(interaction_name, data_json, file_prfx):
id
=
interaction_name
.
upper
(),
model_details
=
data_json
[
"
model_details
"
],
)
# create target entities, references, ...
# create target entities, references, source...
# for source we assume all chains come from the same taxon
source
=
ihm
.
source
.
Natural
(
ncbi_taxonomy_id
=
data_json
[
"
target_entities
"
][
0
][
"
up_ncbi_taxid
"
],
scientific_name
=
data_json
[
"
target_entities
"
][
0
][
"
up_organism
"
],
)
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
"
,
source
=
source
,
references
=
[
modelcif
.
reference
.
UniProt
(
cif_ent
[
"
up_id
"
],
...
...
@@ -258,8 +265,10 @@ def _store_as_modelcif(interaction_name, data_json, file_prfx):
)
],
)
system
.
entities
.
append
(
mdlcif_ent
)
system
.
target_entities
.
append
(
mdlcif_ent
)
# audit_authors
system
.
authors
.
extend
(
data_json
[
"
audit_authors
"
])
...
...
@@ -327,5 +336,5 @@ if __name__ == "__main__":
# LocalWords: struct cif utf mmcif fh datetime ost io ToDo chn lst rn idx aa
# 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: seqlen crc ISOFORM DT dt flds isoforms isoform ent LoadPDB
ihm
# 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