AdmiralenOla / Scoary

Pan-genome wide association studies
GNU General Public License v3.0
148 stars 35 forks source link

Python3 incompatibility #19

Closed AdmiralenOla closed 8 years ago

AdmiralenOla commented 8 years ago

Scoary currently doesn't work with python3. It seems to freeze and eat up memory when trying to populate the quadtree with pairwise hamming distances.

mgalardini commented 8 years ago

Hi,

haven't yet had the time to investigate this properly, but will give it a shot for sure.

Marco

AdmiralenOla commented 8 years ago

Ok, I've made it a little bit further. It seems that the main problem is that by default in python3, normal division of integers (using /) gives a float instead of an integer. This messes with the quadtree building. I'm changing the operator from / to // now. (This is also compatible with python 2.7)

mgalardini commented 8 years ago

Awesome!

AdmiralenOla commented 8 years ago

However, the script still won't run because it seems the len function doesn't work with a zip object in python3! This causes the csv_to_dic method to fail. Will have to work my way around that!

mgalardini commented 8 years ago

Ah, I see; let me know if I can be of any help on this

AdmiralenOla commented 8 years ago

Ok, fixed that by recasting some zip and dict_values objects into lists. Now checking if everything works...

AdmiralenOla commented 8 years ago

As far as I can tell, everything seems to be working in python3 now.