When installing momi2 into a conda environment, the installation process automatically installs some dependent modules, including one called networkx. In October 2019 version 2.4 of networkx was released, and this new version introduced the attribute nodes to a graph object to replace the old attribute node. Because momi2 seems to continue using networkx's old attribute-calling syntax, when it is performing optimization, functions in the events.py (./momi/events.py) script depending on graph construction will fail to run when called.
Concretely, this might result in errors like
AttributeError: 'DiGraph' object has no attribute 'node'
which I ran into a couple of times.
The syntax for momi2 scripts that rely on networkx should be updated to keep up with version 2.4's syntax. Alternatively, I resolved my problem by first installing an older version of networkx (e.g., version 2.2 will do) and then installing momi2:
Run conda install networkx==2.2
Run conda install momi -c conda-forge -c bioconda -c jackkamm
You might have to tell the installation engine to not update networkx in Step 2.
When installing
momi2
into a conda environment, the installation process automatically installs some dependent modules, including one callednetworkx
. In October 2019 version 2.4 ofnetworkx
was released, and this new version introduced the attributenodes
to a graph object to replace the old attributenode
. Becausemomi2
seems to continue usingnetworkx
's old attribute-calling syntax, when it is performing optimization, functions in the events.py (./momi/events.py
) script depending on graph construction will fail to run when called.Concretely, this might result in errors like
which I ran into a couple of times.
The syntax for
momi2
scripts that rely onnetworkx
should be updated to keep up with version 2.4's syntax. Alternatively, I resolved my problem by first installing an older version ofnetworkx
(e.g., version 2.2 will do) and then installingmomi2
:conda install networkx==2.2
conda install momi -c conda-forge -c bioconda -c jackkamm
networkx
in Step 2.