Skip to content
Snippets Groups Projects
Commit 3b525a1a authored by Bienchen's avatar Bienchen
Browse files

Add sequence source

parent fb58f416
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment