Skip to content

Commit

Permalink
Added Cross-cutting concerns to GA blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
john681611 committed Oct 17, 2023
1 parent df857aa commit eb99783
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,17 +422,17 @@ def link_CRE_to_Node(self, CRE_id, node_id, link_type):
@classmethod
def gap_analysis(self, name_1, name_2):
base_standard = NeoStandard.nodes.filter(name=name_1)

blacklist = [["Cross-cutting concerns"]]
path_records_all, _ = db.cypher_query(
"""
OPTIONAL MATCH (BaseStandard:NeoStandard {name: $name1})
OPTIONAL MATCH (CompareStandard:NeoStandard {name: $name2})
OPTIONAL MATCH p = shortestPath((BaseStandard)-[*..20]-(CompareStandard))
WITH p
WHERE length(p) > 1 AND ALL(n in NODES(p) WHERE n:NeoCRE or n = BaseStandard or n = CompareStandard)
WHERE length(p) > 1 AND ALL(n in NODES(p) WHERE (n:NeoCRE or n = BaseStandard or n = CompareStandard) AND NOT n.name in $blacklist)
RETURN p
""",
{"name1": name_1, "name2": name_2},
{"name1": name_1, "name2": name_2, "blacklist": blacklist},
resolve_objects=True,
)

Expand All @@ -442,10 +442,10 @@ def gap_analysis(self, name_1, name_2):
OPTIONAL MATCH (CompareStandard:NeoStandard {name: $name2})
OPTIONAL MATCH p = shortestPath((BaseStandard)-[:(LINKED_TO|CONTAINS)*..20]-(CompareStandard))
WITH p
WHERE length(p) > 1 AND ALL(n in NODES(p) WHERE n:NeoCRE or n = BaseStandard or n = CompareStandard)
WHERE length(p) > 1 AND ALL(n in NODES(p) WHERE (n:NeoCRE or n = BaseStandard or n = CompareStandard) AND NOT n.name in $blacklist)
RETURN p
""",
{"name1": name_1, "name2": name_2},
{"name1": name_1, "name2": name_2, "blacklist": blacklist},
resolve_objects=True,
)

Expand Down

0 comments on commit eb99783

Please sign in to comment.