[Biopython-dev] [Bug 3047] New: PhyloXML, behavior on setting color and width doesn't match docstring or spec
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Tue Apr 6 22:13:23 UTC 2010
http://bugzilla.open-bio.org/show_bug.cgi?id=3047
Summary: PhyloXML, behavior on setting color and width doesn't
match docstring or spec
Product: Biopython
Version: Not Applicable
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P4
Component: Main Distribution
AssignedTo: biopython-dev at biopython.org
ReportedBy: joelb at lanl.gov
>From the Clade docstring:
"Both 'color' and 'width' elements apply for the whole clade unless
overwritten in-sub clades.
This information follows the PhyloXML doc. However, that's not the way the
code works:
>>> tree = Phylo.read('Bacteria403.phyloxml', 'phyloxml')
>>> tree.clade[0].color
BranchColor(blue='0', green='76', red='41')
>>> tree = Phylo.read('bcl_2.xml', 'phyloxml')
>>> tree.clade[0].color
>>> tree.clade[0].color = Phylo.PhyloXML.BranchColor(255,0,255)
>>> tree.clade[0].color
BranchColor(blue='255', green='0', red='255')
>>> tree.clade[0][0].color
>>> tree.clade[0].width = 3
>>> tree.clade[0][0].width
>>>
Personally I'd prefer changing the docstring. The Java code doesn't implement
the spec either, and its actually more complicated for the user to deal with
side-effects of setting at the entire clade at once than it is to iterate over
the clade.
--
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