I am trying to parse some additional attributes in the networkx gml file for use later and I am having a problem.
When a gml file is specified from Cytoscape, networkx displays a gml file that it cannot read.
those. Cytoscape -> Into networkx -> Output -> Into networkx -> Error:
pyparsing.ParseException: Expected "]" (at char 1116756), (line:71732, col:3)
Now this error requests an additional] after the nodes (AKA makes the graph ignore the edges), if you do, the graph works. However, he no longer has ribs.
To fully test this, I did "Cytoscape -> Into networkx -> Output" without changing the code, simply:
DG = nx.read_gml("KeggComplete.gml", relabel = True) nx.write_gml(DG, "KeggCompleteEng.gml") exit()
and then type:
BasicGraph = nx.read_gml("KeggCompleteEng.gml", relabel = True)
And the error is still reproducible. Therefore, I assume that this is due to the way networkx writes gml files.
Two files that I use:
If someone can give some idea of why this might happen, it will be very helpful!
source share