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

Return list of HPO links #20

Open
PabloBotas opened this issue Apr 28, 2021 · 0 comments
Open

Return list of HPO links #20

PabloBotas opened this issue Apr 28, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@PabloBotas
Copy link
Contributor

Users are requesting to be able to get/download a list of links from the HPO ontology. This is currently not implemented.

The following functions should be included in the https://github.com/foundation29org/RareCrowds/blob/main/rarecrowds/utils/ontograph.py file. The functionality could be based on https://networkx.org/documentation/stable/reference/classes/generated/networkx.DiGraph.edges.html?highlight=edges#networkx.DiGraph.edges.

def get_edges(starting_term=None):
    # If starting_term is provided, then the search should start there
    # Then just rely on self.Graph.edges.data() to do the trick
    # Return set of edges: {('HP:0000118', 'HP:0040064'), (...), ...}

def save_edges(out_file, starting_term=None):
    l = self.get_edges(starting_term)
    # Write list to out_file. Format:
    # HP:0000118\tHP:0040064
    # HP:0000118\tHP:0040064
    # HP:0000118\tHP:0040064
    # ...
@PabloBotas PabloBotas added the enhancement New feature or request label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant