Commit 7ffa4d72 authored by Sreenath Sasidharan Nair's avatar Sreenath Sasidharan Nair

Merge branch 'production_ready' into 'master'

PDBE-3670: Supported superposition calls for PRO ids

See merge request pdbe-kb/services/pdbe-graph-api!384
parents 04038a59 2a445b13
......@@ -2896,6 +2896,22 @@ def get_superposition_api(uniprot_accession):
}) AS clusters ORDER BY startResId
if uniprot_accession.startswith("PRO_"):
query = """
MATCH (:UniProt {ACCESSION:$uniprot_accession})<-[rel:IS_A_POLYPROTEIN_OF]-(u:UniProt)
WITH u, toInteger(rel.UNP_START) AS unpStart, toInteger(rel.UNP_END) AS unpEnd
MATCH (u)-[:HAS_STRUCTURAL_CLUSTER]->(cluster:StructuralCluster)
MATCH (cluster)-[:SEGMENT_START]->(startRes:UNPResidue), (cluster)-[:SEGMENT_END]->(endRes:UNPResidue) WHERE unpStart <= toInteger(startRes.ID) AND unpEnd >= toInteger(endRes.ID)
WITH cluster.ID AS clusterId, toInteger(startRes.ID) AS startResId , toInteger(endRes.ID) AS endResId,
[(cluster)<-[:IS_PART_OF]-(chain:Chain) | chain] AS chains,
[(cluster)-[:HAS_REPRESENTATIVE]->(repChain:Chain) | repChain.UNIQID][0] AS repChain
RETURN startResId, endResId, COLLECT({
cluster: clusterId,
chains: chains,
repChain: repChain
}) AS clusters ORDER BY startResId
superpositions = list(, parameters={
"uniprot_accession": uniprot_accession
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