Commit 6ba82452 authored by Nurul Nadzirin's avatar Nurul Nadzirin

rename OPERATOR to SYM_OPERATOR

parent 8c7a9586
......@@ -1022,18 +1022,18 @@ def get_bound_molecules(pdb_id, bm_id=None, branched_only=False, exclude_branche
MATCH (e:Entry {ID:$pdb_id})-[:HAS_BOUND_MOLECULE]->(bm:BoundMolecule###1)<-[r:IS_PART_OF]-(bl1:BoundLigand)<-[:IS_AN_INSTANCE_OF]-(entity1:Entity{###2###4})
OPTIONAL MATCH (bl1)-[:IS_CONNECTED_TO]-(bl2:BoundLigand)<-[:IS_AN_INSTANCE_OF]-(entity2:Entity{###3###4})
OPTIONAL MATCH (bl1)-[y:HAS_ARP_CONTACT]->(x)
RETURN DISTINCT bm.AU_FALLBACK, bm.ID, entity1.ID, entity1.POLYMER_TYPE, bl1.CHEM_COMP_ID, bl1.AUTH_ASYM_ID, toInteger(bl1.AUTH_SEQ_ID), bl1.PDB_INS_CODE, r.OPERATOR,
RETURN DISTINCT bm.AU_FALLBACK, bm.ID, entity1.ID, entity1.POLYMER_TYPE, bl1.CHEM_COMP_ID, bl1.AUTH_ASYM_ID, toInteger(bl1.AUTH_SEQ_ID), bl1.PDB_INS_CODE, r.SYM_OPERATOR,
CASE
WHEN r.OPERATOR IS NOT NULL and bm.AU_FALLBACK = "false"
THEN bl1.AUTH_ASYM_ID+r.OPERATOR+bl1.AUTH_SEQ_ID
WHEN r.SYM_OPERATOR IS NOT NULL and bm.AU_FALLBACK = "false"
THEN bl1.AUTH_ASYM_ID+r.SYM_OPERATOR+bl1.AUTH_SEQ_ID
WHEN bm.AU_FALLBACK = "true"
THEN bl1.AUTH_ASYM_ID+bl1.AUTH_SEQ_ID
ELSE bl1.AUTH_ASYM_ID+"None"+ bl1.AUTH_SEQ_ID
END AS bl1name,
entity2.ID, entity2.POLYMER_TYPE, bl2.CHEM_COMP_ID, bl2.AUTH_ASYM_ID, bl2.AUTH_SEQ_ID, bl2.PDB_INS_CODE,
CASE
WHEN r.OPERATOR IS NOT NULL and bm.AU_FALLBACK = "false"
THEN bl2.AUTH_ASYM_ID+r.OPERATOR+bl2.AUTH_SEQ_ID
WHEN r.SYM_OPERATOR IS NOT NULL and bm.AU_FALLBACK = "false"
THEN bl2.AUTH_ASYM_ID+r.SYM_OPERATOR+bl2.AUTH_SEQ_ID
WHEN bm.AU_FALLBACK = "true"
THEN bl2.AUTH_ASYM_ID+bl2.AUTH_SEQ_ID
ELSE bl2.AUTH_ASYM_ID+"None"+ bl2.AUTH_SEQ_ID
......@@ -1187,7 +1187,7 @@ def fetch_high_level_interactions(pdb_id, bm_id, entity_id=None):
query = """
MATCH (e:Entry {ID:$pdb_id})-[:HAS_BOUND_MOLECULE]->(bm:BoundMolecule {ID:$bm_id})<-[r:IS_PART_OF]-(bl1:BoundLigand)<-[:IS_AN_INSTANCE_OF]-(entity1:Entity###)
OPTIONAL MATCH (bl1)-[contact:HAS_ARP_CONTACT]-(x)
WHERE COALESCE(r.OPERATOR,'--') = COALESCE(contact.SYM_OP_1,'--')
WHERE COALESCE(r.SYM_OPERATOR,'--') = COALESCE(contact.SYM_OP_1,'--')
RETURN bm.AU_FALLBACK, entity1.ID, bl1.CHEM_COMP_ID, contact.AUTH_ASYM_ID_1, bl1.PDB_INS_CODE, contact.AUTH_SEQ_ID_1, contact.SYM_OP_1, contact.ATOM_1, x.CHEM_COMP_ID,
contact.AUTH_SEQ_ID_2, contact.AUTH_ASYM_ID_2, x.PDB_INS_CODE, contact.SYM_OP_2, contact.ATOM_2,
contact.CONTACT_TYPE, contact.INTERACTION_TYPE,
......
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