PDBE-3714: Add depth to funpdbe annotations call

parent 733068c8
......@@ -2325,11 +2325,11 @@ def get_uniprot_generic_annotations_api(uniprot_accession):
query = """
MATCH (unp:UniProt {ACCESSION:$uniprot_accession})-[:HAS_UNP_RESIDUE]->(unp_res:UNPResidue)<-[:MAP_TO_UNIPROT_RESIDUE]-(pdb_res:PDBResidue)
<-[res_rel:FUNPDBE_ANNOTATION_FOR]-(fun_group:FunPDBeResidueGroup)-[:FUNPDBE_RESIDUE_GROUP_OF]->(fun_entry:FunPDBeEntry)
WHERE (NOT fun_entry.DATA_RESOURCE IN ["dynamine", "depth", "FoldX", "3Dcomplex","MetalPDB","ChannelsDB","POPScomp_PDBML","Missense3D"]) AND (NOT (fun_entry.DATA_RESOURCE="p2rank" AND res_rel.CONFIDENCE_CLASSIFICATION <> "high" ))
WHERE (NOT fun_entry.DATA_RESOURCE IN ["dynamine", "FoldX", "3Dcomplex","MetalPDB","ChannelsDB","POPScomp_PDBML","Missense3D"]) AND (NOT (fun_entry.DATA_RESOURCE="p2rank" AND res_rel.CONFIDENCE_CLASSIFICATION <> "high" ))
WITH SPLIT(pdb_res.UNIQID, '_')[0] AS entry_id, SPLIT(pdb_res.UNIQID, '_')[1] AS entity_id, res_rel.CHAIN_LABEL AS auth_asym_id, fun_entry.DATA_RESOURCE AS data_resource,
fun_entry.RESOURCE_ENTRY_URL AS resource_url, unp_res.ID AS unp_res_id, unp_res.ONE_LETTER_CODE AS amino_acid_code, pdb_res.ID AS pdb_res_id
WITH DISTINCT data_resource, toInteger(unp_res_id) AS unp_res_id, entry_id, toInteger(entity_id) AS entity_id, auth_asym_id, amino_acid_code, resource_url ORDER BY unp_res_id
RETURN data_resource, resource_url, unp_res_id, amino_acid_code, entry_id, entity_id, COLLECT(auth_asym_id)
fun_entry.RESOURCE_ENTRY_URL AS resource_url, unp_res.ID AS unp_res_id, unp_res.ONE_LETTER_CODE AS amino_acid_code, pdb_res.ID AS pdb_res_id, fun_group.LABEL AS group_label
WITH DISTINCT data_resource, group_label, toInteger(unp_res_id) AS unp_res_id, entry_id, toInteger(entity_id) AS entity_id, auth_asym_id, amino_acid_code, resource_url ORDER BY unp_res_id
RETURN data_resource, group_label, resource_url, unp_res_id, amino_acid_code, entry_id, entity_id, COLLECT(auth_asym_id)
"""
annotations_mappings = list(graph.run(query, parameters={
......@@ -2344,7 +2344,11 @@ def get_uniprot_generic_annotations_api(uniprot_accession):
annotation_residue_dict = dict()
for annotations_mapping in annotations_mappings:
(data_resource, resource_url, unp_res_id, amino_acid_code, entry_id, entity_id, auth_asym_ids) = annotations_mapping
(data_resource, group_label, resource_url, unp_res_id, amino_acid_code, entry_id, entity_id, auth_asym_ids) = annotations_mapping
# PDBE-3714: Set data resource to specific group label in case of depth
if data_resource == "depth":
data_resource = group_label
if is_processed_protein:
unp_res_id -= processed_protein_start - 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment