Skip to content

Commit

Permalink
Removing :Deprecated Site/API notes from xrefs and DB
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 authored Jul 22, 2024
1 parent efd8ca4 commit 3c3e8b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vfb_connect/neo/query_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def get_dbs(self):
:return: list of VFB IDs."""
query = "MATCH (i:Individual) " \
"WHERE 'Site' in labels(i) OR 'API' in labels(i)" \
"WHERE NOT I::Deprecated AND ('Site' in labels(i) OR 'API' in labels(I))" \
"return i.short_form"
return [d['i.short_form'] for d in self._query(query)]

Expand Down Expand Up @@ -288,7 +288,7 @@ def vfb_id_2_xrefs(self, vfb_id: iter, db='', id_type='', reverse_return=False):
"""
vfb_id = list(set(vfb_id))
match = "MATCH (s:Individual)<-[r:database_cross_reference]-(i:Entity) " \
"WHERE i.short_form in %s" % str(vfb_id)
"WHERE i.short_form in %s AND NOT s:Deprecated" % str(vfb_id)
clause1 = ''
if db:
clause1 = "AND s.short_form = '%s'" % db
Expand Down Expand Up @@ -324,7 +324,7 @@ def xref_2_vfb_id(self, acc=None, db='', id_type='', reverse_return=False):
Return if `reverse_return` is `True`:
dict { VFB_id : [{ db: <db> : acc : <acc> }
"""
match = "MATCH (s:Individual)<-[r:database_cross_reference]-(i:Entity) WHERE"
match = "MATCH (s:Individual)<-[r:database_cross_reference]-(i:Entity) WHERE NOT s:Deprecated AND"
conditions = []
if not (acc is None):
acc = [str(a) for a in set(acc)]
Expand Down

0 comments on commit 3c3e8b7

Please sign in to comment.