dentearl / structureHarvester

Structure Harvester is a program for parsing the output of Pritchard's STRUCTURE and for performing the Evanno method.
http://users.soe.ucsc.edu/~dearl/software/structureHarvester/
Other
24 stars 20 forks source link

StructureHarvester won't run in Python3 [was: Structure Harvester web page is not connecting] #4

Closed Teklu67 closed 2 years ago

Teklu67 commented 2 years ago

Hello there, I was trying to connect to the structure harvester web page (http://taylor0.biology.ucla.edu/structureHarvester/) for few days but it is not connecting. Seems like it is down or not available anymore. I also downloaded the python codes [structureHarvester.zip, version 0.6.93], gave permissions using (chmod 755 structureHarvester.py) and tried to execute it but it is throwing an error shown below. Any help please?

$ ./structureHarvester.py --help Traceback (most recent call last): File "structureHarvester.py", line 266, in main() File "structureHarvester.py", line 245, in main % (version, hc.version)) TypeError: init() got an unexpected keyword argument 'version'

dentearl commented 2 years ago

Hi Teklu!

This looks like a problem with the version of Python that the harvester is expecting. It wants to use 2.6 or 2.7, which was the main version 10 years ago (about when I was writing this!) but the modern version is now 3.10.

If you can downgrade your Python, that'll get you up and running quickly.

I'll see if I can make some simple tweaks to bring the code back into a working state.

StuntsPT commented 2 years ago

Hi @dentearl I might be able to help with that. A few years ago I ported the Harverster Core to python3 for my Structure_threader project. You can find the relevant file here. If you find that is OK, I can open up a merge request for the python3 port.

Best,

Francisco

dentearl commented 2 years ago

Nicely done, Francisco! I ended up sitting down for a few hours (90% of it was the tests) and updating the entire project before coming back and seeing your generous offer.

I'm closing out this issue. Good luck all, let me know if this fails to resolve the issue!

StuntsPT commented 2 years ago

Woha, cool. I guess I'll just leave a note for myself to update my own harvesterCore.py "fork" to your official version then.

Best, Francisco

Teklu67 commented 2 years ago

Thanks @dentearl it works with python version 2.7