PDBE-3712: Added category and resource url to variation call for missense

parent 19280bb0
......@@ -3238,8 +3238,8 @@ def get_uniprot_variation_api(uniprot_accession):
# PDBE-3712: Get Missense3D variation details
query = """
MATCH (unp:UniProt {ACCESSION: $uniprot_accession})-[:HAS_UNP_RESIDUE]->(unpRes:UNPResidue)<-[:MAP_TO_UNIPROT_RESIDUE]-(pdbRes:PDBResidue)<-[resRel:FUNPDBE_ANNOTATION_FOR]-(funGroup:FunPDBeResidueGroup)-[:FUNPDBE_RESIDUE_GROUP_OF]->(funEntry:FunPDBeEntry {DATA_RESOURCE:'Missense3D'})
WITH toInteger(unpRes.ID) AS unpRes, pdbRes.CHEM_COMP_ID AS pdbResCode, resRel.AA_VARIANT AS variant, resRel.AA_VARIANT_CAUSES AS causes, SPLIT(funEntry.SQL_ID, '_')[0] AS pdbId ORDER BY unpRes
RETURN unpRes, pdbResCode, variant, causes, pdbId
WITH toInteger(unpRes.ID) AS unpRes, pdbRes.CHEM_COMP_ID AS pdbResCode, resRel.AA_VARIANT AS variant, resRel.AA_VARIANT_CAUSES AS causes, SPLIT(funEntry.SQL_ID, '_')[0] AS pdbId, funEntry.RESOURCE_ENTRY_URL AS entryUrl, funGroup.LABEL AS label ORDER BY unpRes
RETURN unpRes, pdbResCode, variant, causes, pdbId, entryUrl, label
"""
missense_details = list(graph.run(query, parameters = {
......@@ -3247,7 +3247,7 @@ def get_uniprot_variation_api(uniprot_accession):
}))
for row in missense_details:
(unp_res_id, pdb_res_code, variant, variant_causes, pdb_id) = row
(unp_res_id, pdb_res_code, variant, variant_causes, pdb_id, entry_url, label) = row
result_data = {
"type": "VARIANT",
......@@ -3262,7 +3262,9 @@ def get_uniprot_variation_api(uniprot_accession):
"siftScore": None,
"consequenceType": variant_causes,
"genomicLocation": f"""Missense3D_{pdb_id}_{get_amino_three_to_one(pdb_res_code)}>{get_amino_three_to_one(variant)}""",
"sourceType": "prediction"
"sourceType": "prediction",
"category": label,
"resourceUrl": entry_url
}
api_result[uniprot_accession]["features"].append(result_data)
......
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