flexidot icon indicating copy to clipboard operation
flexidot copied to clipboard

Changed code to Python 3

Open ms-gx opened this issue 5 years ago • 5 comments

I changed Flexidot 1.06 to be suitable for running with Python 3.

I can now generate basic dotplots for my Fasta files using Python3. Did NOT test all the functionality! Tested this: python3 ../flexidot/code/flexidot_v1.06_py3.py -i inp.fasta -o outfolder -f 1 Also tested some further options.

Was pretty easy:

  1. Command 2to3 flexidot_v1.06_py3.py on the code to convert automatically to Python 3 code
  2. Removed unicode_name from line 2102 (otherwise you get b'seqname' for the labels above the dotplost)

I guess not that many more changes are necessary to make the code suitable for Python 3.

ms-gx avatar May 12 '19 18:05 ms-gx

Oh, thank you for this surprising contribution. We've planned to migrate FlexiDot to Py3, but did not find the time, yet.

As we are currently away at a conference, we will have a look and run our test scripts as soon as we return.

Best wishes,

Kathrin and Tony

molbio-dresden avatar May 13 '19 22:05 molbio-dresden

I made the move to Python3 a bit more generic by changing code in function unicode_name I think this should remove non ascii characters from from the unicode string while keeping the string as unicode. I did some more testing and in general everything worked for me. So I think the transistion to Python3 should be pretty easy.

ms-gx avatar May 23 '19 12:05 ms-gx

Do you have to open the gff file in byte mode? Do you in general have to open the files in binary mode?

ms-gx avatar May 23 '19 13:05 ms-gx

Hey guys, is it ready for merge?

dmvieira avatar Oct 11 '21 17:10 dmvieira

Dear Diogo,

we are currently (internally) using this version: flexidot_v2.01_alpha01_py3.zip

On Linux systems it is working well, though on Windows there are still some problems.

Best wishes

Tony

molbio-dresden avatar Oct 11 '21 22:10 molbio-dresden