[Biopython-dev] [Bug 3036] PhyloXML cannot read node colors created by PhyloXML

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Mar 30 05:17:44 UTC 2010


http://bugzilla.open-bio.org/show_bug.cgi?id=3036


eric.talevich at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from eric.talevich at gmail.com  2010-03-30 01:17 EST -------
(In reply to comment #0)
> Using a simple example file provided:
> ...
> This is not a problem with an example file not written by biopython:
> >>> tree = Phylo.parse('made_up.xml','phyloxml').next()
> >>> tree.clade[0].color
> BranchColor(blue='28', green='220', red='128')

Thanks for catching this! I pushed a fix to GitHub:
http://github.com/biopython/biopython/commit/6e2eac9612f600507491c3bb45fc19ffdc987169

The problem was occurring for color values of 0 -- PhyloXMLIO was using an
inline and-or test instead of if-else (Py2.4 compatibility hack) to check and
convert the node text to an integer. Since 0 evaluates as boolean False, the
expression was returning None instead of integer 0, causing the BranchColor
constructor to vom.


> Also, forester/archaeoptryx is able to correctly read colors written by
> biopython.

Good to know. Thanks again for testing this.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list