8000 Refactor network visualization to use pre-fetched statements by prasham21 · Pull Request #232 · gyorilab/indra_cogex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor network visualization to use pre-fetched statements #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 11, 2025

Conversation

prasham21
Copy link
Contributor

This PR refactors how network visualization data is generated, with two key improvements:

1. Single Query for Tabular and Network Views

Previously, the application executed duplicate database queries - one for the tabular statement display and another for the network visualization. This PR implements a more efficient approach:

  • Added a store_hashes_in_session parameter to render_statements to store statement hashes in the session
  • Updated route handlers for GO, paper, and subnetwork explorers to enable hash storage
  • Modified get_network to use statements from the session instead of executing a new query

2. Enhanced Relationship Display

The previous implementation showed only one relationship between entity pairs, hiding the rich diversity of biological interactions. This PR enhances relationship display:

  • Changed edge deduplication to use (source, target, statement_type) triplets instead of just (source, target) pairs
  • Modified statement matching to consider relationship types
  • Ensured all statements from the tabular view are properly represented in the network

@prasham21 prasham21 force-pushed the refactor-network-graphs branch from 24a2af3 to 0956e6b Compare May 15, 2025 13:04
@bgyori bgyori force-pushed the refactor-network-graphs branch from 49fcfbc to 4fbd11f Compare June 11, 2025 19:51
@bgyori bgyori merged commit 3ec9c58 into gyorilab:main Jun 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0