Package Bio :: Package Phylo :: Module BaseTree :: Class Clade
[hide private]
[frames] | no frames]

Class Clade

source code

 object --+    
          |    
TreeElement --+
              |
 object --+   |
          |   |
  TreeMixin --+
              |
             Clade
Known Subclasses:

A recursively defined sub-tree.

:Parameters:
    branch_length : str
        The length of the branch leading to the root node of this clade.
    name : str
        The clade's name (a label).
    clades : list
        Sub-trees rooted directly under this tree's root.

Instance Methods [hide private]
 
__init__(self, branch_length=None, name=None, clades=None, confidence=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
is_terminal(self)
True if this is a terminal (leaf) node.
source code
 
__getitem__(self, index)
Get clades by index (integer or slice).
source code
 
__iter__(self)
Iterate through this tree's direct descendent clades (sub-trees).
source code
 
__len__(self)
Number of clades directy under the root.
source code
 
__nonzero__(self)
Boolean value of an instance of this class.
source code
 
__str__(self)
Show this object's constructor with its primitive arguments.
source code

Inherited from TreeElement: __repr__

Inherited from TreeMixin: collapse, collapse_all, common_ancestor, count_terminals, depths, distance, find_any, find_clades, find_elements, get_nonterminals, get_path, get_terminals, is_bifurcating, is_monophyletic, is_parent_of, is_preterminal, ladderize, prune, split, total_branch_length, trace

Inherited from TreeMixin (private): _filter_search

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]
  root
Allow TreeMixin methods to traverse clades properly.

Inherited from object: __class__

Method Details [hide private]

__init__(self, branch_length=None, name=None, clades=None, confidence=None)
(Constructor)

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

Overrides: object.__init__
(inherited documentation)

__nonzero__(self)
(Boolean test operator)

source code 
Boolean value of an instance of this class.

NB: If this method is not defined, but ``__len__``  is, then the object
is considered true if the result of ``__len__()`` is nonzero. We want
Clade instances to always be considered True.

__str__(self)
(Informal representation operator)

source code 
Show this object's constructor with its primitive arguments.

Overrides: object.__str__
(inherited documentation)

Property Details [hide private]

root

Allow TreeMixin methods to traverse clades properly.

Get Method:
unreachable.root(self) - Allow TreeMixin methods to traverse clades properly.