pybel / pybel-tools

A PyBEL extension for analyzing BEL graphs
http://pybel-tools.readthedocs.io/
MIT License
5 stars 5 forks source link

Collapse nodes with the same name (doesnt matter to which one) #137

Closed ddomingof closed 5 years ago

ddomingof commented 5 years ago

@jmarinllao

Relabel nodes with the same name and combine them

cthoyt commented 5 years ago

Shouldn't be so bad except for nodes appearing in complexes, composites, fusions, and reactants will be tricky

cthoyt commented 5 years ago

@jmarinllao It's a crude first step, but give https://github.com/pybel/pybel-tools/commit/815a98afd45dd58e20e5a0060a1b6a972a1ad31a a try.

If/when it doesn't work, you can re-open this issue, write more unit tests corresponding to the situations, and I can update the implementation.