makovalab-psu / DiscoverY

K-mer based classifier for Y-contig identification from Whole Genome Assemblies
MIT License
11 stars 5 forks source link

Is python3 required? #2

Open rsharris opened 5 years ago

rsharris commented 5 years ago

I was trying to run this using python2 (because I didn't know any better). I get an exception from str.maketrans() on kmers.py. In python2 (apparently) string objects don't have a maketrans method, whereas (I guess) in python3 they do.

If the package isn't intended to support python2, it would be nice to say that in the readme.

md5sam commented 5 years ago

That's interesting : I've only ever used python2.7, so I believe DiscoverY should work fine with python2. Let me look into this and let you know.

rsharris commented 5 years ago

Discussed this with Tasha. She achieved some speedups by converting to python3. Backward compatibility with python2 wasn't maintained. Probably reasonable since python2 wil lbe a problem for all of us after Jan/1/2020.

The readme should be modified to reflect that, though.

rsharris commented 5 years ago

For my present effort, which is just running the example so I know how to run this, I've just modified my copy of the source code so that it runs under python2. The only change I had to make was that use of maketrans.