[Biopython] parsing newick trees in memory
Eric Talevich
eric.talevich at gmail.com
Sun Oct 10 21:50:21 UTC 2010
On Sun, Oct 10, 2010 at 4:10 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
>
> This way is shorter ;)
>
> from StringIO import StringIO
> from Bio import Phylo
> tree = Phylo.read(StringIO(tree_text), 'newick')
> print tree
>
> Eric - we should probably have an example of using
> StringIO in the Phlyo chapter as we do in the SeqIO
> chapter.
>
> Peter
>
Sure. I added an example to the wiki page just now:
http://biopython.org/wiki/Phylo#read.28.29
-Eric
More information about the Biopython
mailing list