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)
Initialize parameters for NeXML file parser.
source code
 
add_annotation(self, node_dict, meta_node)
Add annotations for the NeXML parser.
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)
Convert file handle to StringIO object.
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 
Initialize parameters for NeXML file parser.
Overrides: object.__init__

_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.