roblanf / SRHtests

tests of stationarity, reversibility, and homogeneity for sequence alignments
2 stars 3 forks source link

Error running srh.py #9

Closed Ptero64 closed 4 years ago

Ptero64 commented 4 years ago

Hello,

I would like to try your pipeline for SRH test (I also used the new option in iqtree2).

I got an error when I run the first script srh.py on my alignment using python3.6.3

The error seems to be related with the code int() trying to convert a float string to an integer: File "pandas/_libs/lib.pyx", line 560, in pandas._libs.lib.astype_intsafe ValueError: invalid literal for int() with base 10: '0.003048780487804878'

Seems you can fix it using int(float(input)), but I have no idea where to put it in the script.

Do you have an idea how to make it work?

Thanks for the help

Nicolas

roblanf commented 4 years ago

Hi Nicolas,

The best implementation for normal use is to use the IQ-TREE implementation. For this, please use version 2.0.6 or later, here: https://github.com/Cibiv/IQ-TREE/releases

Hopefully @suhanaser can help figure out the error you are getting in our python code.

Rob

suhanaser commented 4 years ago

Hi Nicolas, I can't put my hand on the source of this error, but the only integer that I can think of in this script is the "d" value of the in the "table" function. You can try to change that to "(df['d'].astype(float)).astype(int)" and see if that helps, but you can always use IQ-TREE if that doesn't solve the problem