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

Class Parser

source code

object --+
         |
        Parser

Parse a Newick tree given a file handle.

Based on the parser in Bio.Nexus.Trees.

Instance Methods [hide private]
 
__init__(self, handle)
Initialize file handle for the Newick Tree.
source code
 
parse(self, values_are_confidence=False, comments_are_confidence=False, rooted=False)
Parse the text stream this object was initialized with.
source code
 
_parse_tree(self, text)
Parses the text representation into an Tree object.
source code
 
new_clade(self, parent=None)
Returns a new Newick.Clade, optionally with a temporary reference to its parent clade.
source code
 
process_clade(self, clade)
Final processing of a parsed clade. Removes the node's parent and returns it.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
from_string(cls, treetext)
Instantiate the Newick Tree class from the given string.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle)
(Constructor)

source code 
Initialize file handle for the Newick Tree.
Overrides: object.__init__