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)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
parse(self, values_are_support=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
 
_parse_subtree(self, text)
Parse (a,b,c...)[[[xx]:]yy] into subcomponents, recursively.
source code
 
_parse_tag(self, text)
Extract the data for a node from text.
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) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

_parse_tag(self, text)

source code 

Extract the data for a node from text.

Returns:
Clade instance containing any available data