I am working on protein sequence data files for reconstructing phylogenetic tree and I need to generate all NNI-neighbours of the tree (two trees are NNI-neighbours if one can be transformed into another by one nearest neighbour interchange operation). Is there any python package/sorce code I can access to, which can retrieve all NNI neighbors of a tree. Earlier I have used biopython 1.72 to generate tree from my dataset. But for now I'm looking for a python package which can do NNI search on my tree and return all NNI-neighbors.
Asked
Active
Viewed 327 times
1 Answers
2
Both the ETE Toolkit and DendroPy offer methods of node removal and reattachment - I would think it would be easy enough to hack together an NNI movement function with them.
You could also investigate the source code of BioPython's NNITreeSearcher() function.
NatWH
- 347
- 2
- 10
_get_neighbors()function generates all NNI neighbor trees of the given tree. – Sidra Younas Sep 11 '18 at 06:07