jhcepas / phylogenetic-XML-python-parsers

Python bindings to XML phylogenetic formats (PhyloXML, NeXML, OrthoXML)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository provides general Python bindings for some phylogenetic
XML formats, such as PhyloXML, NexML or OrthoXML. Parsers are
automatically generated by the generateDS.py (gDS) tool, although
modifications in the gDS code are sometimes required to deal with the
peculiarities of some XML schemes. However, I'm in contact with the
gDS developer, Dave Kuhlman, to maintain gDS code in sync with the
needs of bioXML standards. Parsers are updated regularly to reflect
last changes in the XML schemes.

Since parsers are independent from any external tool, they provide the
bases for input/output XML support to any Python application or
toolkit. They facilitate also the exchange of annotated phylogenetic
datasets among different tools.

These three parsers are also part of the ETE toolkit package
(http://ete.cgenomics.org), where they provide a more convenient
integration with tree data structures.

LICENSE AND DISTRIBUTION 

Since the code of parsers is auto-generated, they are free of any
license or restriction. 

HOW TO USE THE PARSERS

Parsers can be used as Python modules. A parse function is included in
each module which allows loading XML data. All elements will be
converted into Python objects (each element has its own class) and
hierarchically connected.

  from phyloxml import parse
  my_phyloxml_project = parse("phylo.XML")

The opposite direction, creating python
objects representing XML data, is also possible. Thus, XML datasets
can be programmaticaly created and exported.

  from phyloxml import Phyloxml
  my_project = Phyloxml()
  ...
  ...
  my_project.export(output=sys.stdout, level=0)

As an example, the ETE toolkit integrates several of these parses to
provide tree analysis, manipulation and visualization features
directly on XML datasets.

About

Python bindings to XML phylogenetic formats (PhyloXML, NeXML, OrthoXML)


Languages

Language:Python 100.0%