jcrozum / pystablemotifs

Python library for attractor identification and control in Boolean networks
MIT License
28 stars 7 forks source link

More graceful fallback when missing pydot/graphviz #51

Closed jcrozum closed 3 years ago

jcrozum commented 3 years ago

In the Export plotting functions, the default is to use a pydot layout, which Windows users are less likely to have (because the installation process is a headache). If either pydot or graphviz is not installed, then we get an import error. We should fall back to a networkx built-in layout in these cases (planar layout?), possibly with a warning.

Related to this, the documentation is currently misleading; the pos argument should either be the string 'pydot' or a layout object e.g., pos=nx.spring_layout(G).

jcrozum commented 3 years ago

Resolved in (#53). We fall back to nx.planar_layout when we can't use pydot/graphviz.