Package Bio :: Package Phylo :: Module NewickIO
[hide private]
[frames] | no frames]

Module NewickIO

source code

I/O function wrappers for the Newick file format.

See: http://evolution.genetics.washington.edu/phylip/newick_doc.html

Classes [hide private]
  NewickError
Exception raised when Newick object construction cannot continue.
  Parser
Parse a Newick tree given a file handle.
  Writer
Based on the writer in Bio.Nexus.Trees (str, to_string).
Functions [hide private]
 
parse(handle, **kwargs)
Iterate over the trees in a Newick file handle.
source code
 
write(trees, handle, plain=False, **kwargs)
Write a trees in Newick format to the given file handle.
source code
Variables [hide private]
  NODECOMMENT_START = '[&'
  NODECOMMENT_END = ']'
  __package__ = 'Bio.Phylo'
Function Details [hide private]

parse(handle, **kwargs)

source code 
Iterate over the trees in a Newick file handle.
Returns:
generator of Bio.Phylo.Newick.Tree objects.

write(trees, handle, plain=False, **kwargs)

source code 
Write a trees in Newick format to the given file handle.
Returns:
number of trees written.