dhimmel / integrate

Scripts and resources to create Hetionet v1.0, a heterogeneous network for drug repurposing
https://doi.org/10.15363/thinklab.4
31 stars 16 forks source link

Support hetio v0.2.3: duplicate edge fix, remove self loops #12

Closed dhimmel closed 7 years ago

dhimmel commented 7 years ago

See https://github.com/dhimmel/hetio/issues/10. hetio v0.2.3 raises an error if a duplicate edge is added as well as enables support for self loops. Previously, biderectional self loops would get filtered. This PR explicitly filters biderectional self loops to replicate the old behavior / hetnet.

dhimmel commented 7 years ago

I didn't track changes to:

    modified:   data/edges-10.sif
    modified:   data/edges-5k.sif.gz
    modified:   data/edges.sif.gz
    modified:   data/hetnet.json.bz2
    modified:   data/metagraph.json
    modified:   data/summary/degrees.xlsx
    modified:   viz/degrees.pdf
    modified:   data/edges-10.sif
    modified:   data/edges-5k.sif.gz
    modified:   data/edges.sif.gz
    modified:   data/hetnet.json.bz2
    modified:   data/metagraph.json
    modified:   data/summary/degrees.xlsx
    modified:   viz/degrees.pdf

It's a real bummer that these files changed. I don't think any of the changes are functional per se. Lot's of them I presume have to do with arbitrary dictionary ordering. This is a good reason to upgrade to Python 3.6 in the future, so dictionaries cease causing diff chaos.

dhimmel commented 7 years ago

@veleritas if you port the changes where I've mentioned you to your modified .ipynb, I think you will be able to use hetio v0.2.3 without issue. This is my suggestion for solving https://github.com/dhimmel/hetio/issues/10. Let me know if you see any issues with this PR, otherwise I will merge.

dhimmel commented 7 years ago

@veleritas, I confirmed that this pull requests results in the exact same edges as Hetionet v1.0. I did not verify that edge properties are the same, but I think they should be.

Am going to merge. Let us know if porting the changes where I mention you resolves dhimmel/hetio#10 for you.