callahantiff / PheKnowLator

PheKnowLator: Heterogeneous Biomedical Knowledge Graphs and Benchmarks Constructed Under Alternative Semantic Models
https://github.com/callahantiff/PheKnowLator/wiki
Apache License 2.0
165 stars 29 forks source link

Enhancement: Improve Networkx MultiDiGraph Metadata #62

Closed callahantiff closed 3 years ago

callahantiff commented 4 years ago

TASK

Task Type: CODEBASE

Improve the node and edge metadata when outputting the Networkx MultiDiGraph versions of each build. Thanks to @rkboyce, who suggested that we could make very small changes to the current Network graph and drastically improve the usability of the output structure.

TODO

Impacted Scripts:

Needed Functionality:


@rkboyce, can you please verify that I have covered the needed changes that we discussed this week correctly above?

I will also be implementing a few changes to the OWL-NETS architecture (issue #56) and will be storing the collapsed semantic information from the full graph as attributes of the transformed OWL-NETS graph, likely in the form of edge and and node dictionary entries.

rkboyce commented 3 years ago

Hi @callahantiff - I agree with the summary for the most part. My suggestion is to make the key some identifier unique across the knowledge graph. Could be just an incremented integer unique to each relation with respect to the triple that it occurs in. I like to use 'predicate' for the URIRef that represents the edge relationship (which will likely be from an ontology e.g. RO and not unique), and weight should be 0.0 as you indicated.

callahantiff commented 3 years ago

Thanks so much @rkboyce, that's exactly what I needed to know!

callahantiff commented 3 years ago

Done! Note that this representation now includes keys for nodes and edges and has a default weight of 0.0:

callahantiff commented 3 years ago

Completed as part of #84