Package Bio :: Package Phylo :: Module TreeConstruction :: Class NNITreeSearcher
[hide private]
[frames] | no frames]

Class NNITreeSearcher

source code

  object --+    
           |    
TreeSearcher --+
               |
              NNITreeSearcher

Tree searching class of NNI(Nearest Neighbor Interchanges)
algorithm.
Instance Methods [hide private]
 
__init__(self, scorer)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
search(self, starting_tree, alignment)
Implement the TreeSearcher.search method.
source code
 
_nni(self, starting_tree, alignment)
Search the best parsimony tree by using the NNI(Nearest Neighbor Interchanges) algorithm
source code
 
_get_neighbors(self, tree)
Get all neighbor trees of the given tree(currently only for binary rooted tree)
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, scorer)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • scorer, ParsimonyScorer - parsimony scorer to calculate the parsimony score of different trees during NNI algorithm.
Overrides: object.__init__
(inherited documentation)

search(self, starting_tree, alignment)

source code 
Implement the TreeSearcher.search method.
Parameters:
  • starting_tree (Tree) - starting tree of NNI method.
  • alignment, MultipleSeqAlignment - multiple sequence alignment used to calculate parsimony score of different NNI trees.
Overrides: TreeSearcher.search