I’m currently trying to work with the python Dendropy library and include some PAUP commands inside my code.
I’m using the tutorial mentioned in the python library, but it’s giving me an error.
So what I’m doing is I’m trying to estimate a tree from a distance matrix:
Distance matrix A (Numpy array)
[[ 0 2 7 8 16 17]
[ 2 0 5 6 17 16]
[ 7 5 0 9 15 13]
[ 8 6 9 0 18 16]
[16 17 15 18 0 5]
[17 16 13 16 5 0]]
import dendropy
from dendropy.interpop import paup
#A is a distance matrix like this
tree = paup.estimate_tree(A, 'nj')
The error I’m getting is: ImportError: No module named interpop
I have PAUP installed on my machine and the tutorial does not talk about installing any additional modules.
Any help would be appreciated.
EDIT
does this work with NUMPY arrays ?? because it seems to give an error with numpy arrays.. and how to solve this problem ??
Try using
from dendropy.interop import paup(minus thepininterpop). I mis-typed it twice writing this answer, so if that is the cause of the error then it is an understandable one 🙂