Skip to content
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

Add node names instead of node IDs to networkx graph #316

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

michellemli
Copy link
Collaborator

@michellemli michellemli commented Sep 24, 2024

Problem: Each node id (x_id and y_id) is node type specific. For example, a node ID of "1" for a disease node is different from a node ID of "1" for a gene/protein node. This is (likely) not an issue for training a GNN. However, it can be an issue if users want to do network analysis on PrimeKG because the current to_nx() function does not consider node type.

Solution: Instead of adding pairs of node IDs as edges, add pairs of node names because they are unique.

@kexinhuang12345
Copy link
Collaborator

LGTM! @amva13 any additional check to perform?

@amva13 amva13 merged commit 45cc094 into mims-harvard:main Sep 24, 2024
3 checks passed
@amva13
Copy link
Member

amva13 commented Sep 24, 2024

Lgtm. The change will deploy in the next package release.

amva13 added a commit that referenced this pull request Sep 24, 2024
This reverts commit 45cc094, reversing
changes made to 80acefc.
amva13 added a commit that referenced this pull request Sep 24, 2024
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.

3 participants