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

Class Parser

source code

object --+
         |
        Parser

Parse a NeXML 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
 
add_annotation(self, node_dict, meta_node) source code
 
parse(self, values_are_confidence=False, rooted=False)
Parse the text stream this object was initialized with.
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
 
_make_tree(cls, node, node_dict, children)
Traverse the tree creating a nested clade structure.
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)

_make_tree(cls, node, node_dict, children)
Class Method

source code 

Traverse the tree creating a nested clade structure.

Return a NeXML.Clade, and calls itself recursively for each child, traversing the entire tree and creating a nested structure of NeXML.Clade objects.