Skip to content

Commit

Permalink
exclude singletons, go not in term graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Maluuck committed Oct 31, 2023
1 parent fb57357 commit d5e8ae6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def proteins_subgraph_api():
stopwatch.round("Setup")

if len(protein_ids) > 1:
_, source, target, score = queries.get_protein_associations(driver, protein_ids, threshold, species_id)
proteins, source, target, score = queries.get_protein_associations(driver, protein_ids, threshold, species_id)
else:
_, source, target, score = queries.get_protein_neighbours(driver, protein_ids, threshold, species_id)
proteins, source, target, score = queries.get_protein_neighbours(driver, protein_ids, threshold, species_id)

stopwatch.round("Neo4j")

Expand Down
2 changes: 2 additions & 0 deletions backend/src/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def get_terms_connected_by_overlap(driver: neo4j.Driver, term_ids: list[str], sp
MATCH (source:FT:{species})-[association:OVERLAP]->(target:FT:{species})
WHERE source.Term IN {term_ids}
AND target.Term IN {term_ids}
AND NOT source.Category IN ["GOCC", "GOMF", "GOBP"]
AND NOT target.Category IN ["GOCC", "GOMF", "GOBP"]
RETURN source, target, association.Score AS score;
"""
with driver.session() as session:
Expand Down

0 comments on commit d5e8ae6

Please sign in to comment.