[Biopython] saving tree data in phyloXML format

Michael Thon mike.thon at gmail.com
Mon Oct 11 08:29:14 UTC 2010


I am now reading my trees and creating tree objects.  For each clade in the tree I am adding a node_id attribute and one Property object.  When I print the tree using:

    print tree

I can see the new information that I've added to the tree.  When I try to save the tree in phyloXML format, the node_id attribute and the Property object are not serialized. I'm saving the tree like this:

    PhyloXMLIO.write(tree, 'mytree.xml')


Basically, what I'm trying to do is decorate the branches in the trees with some additional data (a node_id, branch labels, and a url) , and then render them in a web page, possibly using jsPhyloSVG (http://www.jsphylosvg.com).  the examples on that website show <annotation> tags containing <desc> and <uri> tags.  I don't see an 'annotation' property in Bio.Phylo.PhyloXML.Clade but I'm hoping that there is some other property that maps to <annotation>  when I save the tree in phyloXML format.

TIA
Mike



More information about the Biopython mailing list