[Biopython] Bio.Phylo bugs & pain points

Mariam Reyad Rizkallah mrrizkalla at gmail.com
Fri Mar 2 08:41:21 EST 2012


Dear Biopython list,

I am facing similar problem with Phylo in the context of your thread. I am
using Biopython 1.58 - Ubuntu 32 bit system. I have created a newick using
phyml command-line and want to visualize it using Bio.Phylo. I read the
newick, draw_ascii and draw_graphiz perfectly but not draw(). I have
networkx, and pylab installed.

my_view_tree = Phylo.read("myseq.phy_phyml_tree.txt", "newick")
Phylo.draw_ascii(my_view_tree)
my_view_tree_xml = my_view_tree.as_phyloxml()
Phylo.draw(my_view_tree_xml, do_show=True, show_confidence=True, axes=None)

*Error:*

Traceback (most recent call last):
  File "itree/itree2/iTree2.py", line 563, in view_tree
    Phylo.draw(my_view_tree_xml, do_show=True, show_confidence=True,
axes=None)
AttributeError: 'module' object has no attribute 'draw'

Thank you.

On Sat, Feb 18, 2012 at 7:11 PM, Eric Talevich <eric.talevich at gmail.com>wrote:

> On Sat, Feb 18, 2012 at 11:34 AM, Eric Talevich <eric.talevich at gmail.com
> >wrote:
>
> > So -- do the trees drawn by Phylo.draw() look right?
> >
> >
> Here's how to get a quick tree, using a test file from the Biopython source
> distribution:
>
> >>> from Bio import Phylo
> >>> tree = Phylo.read("Tests/PhyloXML/apaf.xml", "phyloxml")
> >>> Phylo.draw(tree)
>
>
> If you don't have the Tests/ directory, you can use any other Newick, Nexus
> or PhyloXML tree; just change the file name and format name in the call to
> Phylo.read().
>
> Thanks,
> Eric
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>


More information about the Biopython mailing list