[Biopython-dev] Phylo: support for JSON trees

Eric Talevich eric.talevich at gmail.com
Wed Dec 9 21:43:26 UTC 2015


Hi Fabio,

This is an interesting idea. I'm concerned that there are many ways to
represent a tree as a JSON string, just as there are many ways to represent
it in XML. Do any of the tree-oriented web apps you know of (including
BioJS modules) accept JSON input in a specified way?

Cheers,
Eric

On Wed, Dec 9, 2015 at 1:12 PM, Fabio Zanini <fabio.zanini at fastmail.fm>
wrote:

> Hi all,
>
> I've been working with phylogenetic trees for a few years and found it
> very convenient to convert Bio.Phylo trees to/from JSON, e.g.
>
> {'name': 'root', 'children': [
>   {'name': 'leaf1', 'branch_length': 0.01, children: []},
>   {'name': 'leaf2', 'branch_length': 0.02, children: []}]
> }
>
> I would like to implement such import/export functions into Bio.Phylo if
> there is interest. Because Python has a JSON parser already, it's like
> 50 lines of code altogether.
>
> The main arguments in favour of this are:
> - *JSON is standard for the web*, and the web is where all is moving
> (Jupyter, bokeh, but also specific tree-oriented web apps such as
> http://nextflu.org)
> - embedding metadata is trivial (just add more keys to those dicts!)
>
> How's that sound, shall I make a github PR?
>
> Cheers,
> Fabio
>
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython-dev/attachments/20151209/9f45ae41/attachment.html>


More information about the Biopython-dev mailing list