Bio.Phylo.NexusIO module

I/O function wrappers for Bio.Nexus trees.


Parse the trees in a Nexus file.

Uses the old Nexus.Trees parser to extract the trees, converts them back to plain Newick trees, and feeds those strings through the new Newick parser. This way we don’t have to modify the Nexus module yet. (Perhaps we’ll eventually change Nexus to use the new NewickIO parser directly.)

Bio.Phylo.NexusIO.write(obj, handle, **kwargs)

Write a new Nexus file containing the given trees.

Uses a simple Nexus template and the NewickIO writer to serialize just the trees and minimal supporting info needed for a valid Nexus file.