jeromekelleher / sc2ts

Infer a succinct tree sequence from SARS-COV-2 variation data
MIT License
4 stars 3 forks source link

Bug in `plot_subgraph` #149

Open hyanwong opened 1 year ago

hyanwong commented 1 year ago

At the moment, we get the external edges to plot before removing internal unary nodes. This sometimes causes the plotting function to fail with a KeyError e.g.

 1732                 [node_positions[parent][0], node_positions[parent][0] + dx],
...
KeyError: 64514

This can be avoided by setting exterior_edge_len=0 in when calling plot_subgraph. It will be solved once #132 is fixed, so I'm not inclined to fix it right now.