[Biopython-dev] [Biopython (old issues only) - Bug #3134] (Resolved) to_networkx returns weird stuff

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Thu Jan 19 17:08:49 UTC 2017


Issue #3134 has been updated by Peter Cock.

Description updated
Status changed from New to Resolved
% Done changed from 0 to 100

I looks like this was resolved but the issue left open. Closing now as resolved.

----------------------------------------
Bug #3134: to_networkx returns weird stuff
https://redmine.open-bio.org/issues/3134#change-15392

* Author: John empty
* Status: Resolved
* Priority: Normal
* Assignee: Biopython Dev Mailing List
* Category: Main Distribution
* Target version: 1.55b
* URL: 
----------------------------------------
Hi,

I tried to read 
http://www.phylosoft.org/archaeopteryx/examples/data/multiple_supports.xml 
and convert it using to_networkx(). Strangely, all nodes in the resulting graph are named Clade, and when using networkx.write_dot() I get a file with a single clade node, although the number of nodes in the graph object is correct. Also using networkx.to_agraph() does not help.

tree = Phylo.read("multiple_support.xml", "phyloxml")
tree = Phylo.to_networkx(tree)
print set(tree.nodes())
print tree.number_of_nodes()
networkx.write_dot(tree, "test.dot")
tree = networkx.to_agraph(tree)
tree.draw("tree.pdf", prog = "dot")


For http://www.phylosoft.org/archaeopteryx/examples/data/bcl_2.xml I get a star tree with a single Clade node in the center and leafs labeled by gene names.



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython-dev/attachments/20170119/4879e194/attachment-0001.html>


More information about the Biopython-dev mailing list