In cx format a number field like int can be set to null or NaN. The current graphml converter just pushes these values into the graphml xml format and exits, but that xml file cannot be loaded in networkx cause null/NaN is not a valid int. Either exclude that field since in the conversion or pick a default value and document on wiki which approach is used.
To reproduce download above network as cx first convert to graphml
# requires python 3.6+ and its easiest to use Anaconda or Miniconda
pip install ndex_webapp_python_exporters
cat network.cx | ndex_exporters.py graphml > result.graphml
Then in terminal with python 3.6+ and networkx 1.11 installed run the following:
In cx format a number field like int can be set to
null
orNaN
. The current graphml converter just pushes these values into the graphml xml format and exits, but that xml file cannot be loaded in networkx causenull/NaN
is not a valid int. Either exclude that field since in the conversion or pick a default value and document on wiki which approach is used.Example network that exhibits the error:
http://www.ndexbio.org/#/network/01b46d52-c3a5-11e5-8fbc-06603eb7f303
To reproduce download above network as cx first convert to graphml
Then in terminal with python 3.6+ and networkx 1.11 installed run the following: