merenlab / illumina-utils

A library and collection of scripts to work with Illumina paired-end data (for CASAVA 1.7+ pipeline).
GNU General Public License v2.0
89 stars 31 forks source link

Python3 compatibility - iu-merge-pairs #8

Closed daniclaar closed 7 years ago

daniclaar commented 7 years ago

Hi,

I noticed a small Python3 compatibility bug while running iu-merge-pairs.

The error message that I got was this:

Traceback (most recent call last):
  File "/home/danielle/virtual-envs/illumina-utils-v2.0.0/bin/iu-merge-pairs", line 770, in <module>
    sys.exit(merger.run())
  File "/home/danielle/virtual-envs/illumina-utils-v2.0.0/bin/iu-merge-pairs", line 302, in run
    r1_passed_Q30, r1_Q30 = self.passes_minoche_Q30(self.input_1.entry.Q_list[0:-len_overlap])
  File "/home/danielle/virtual-envs/illumina-utils-v2.0.0/bin/iu-merge-pairs", line 666, in passes_minoche_Q30
    Q30 = len([True for _q in base_qualities[0:half_length] if _q > 30])
TypeError: slice indices must be integers or None or have an __index__ method

This is an easy fix (I fixed it on my local machine), by changing line 666 from Q30 = len([True for _q in base_qualities[0:half_length] if _q > 30]) to Q30 = len([True for _q in base_qualities[0:int(half_length)] if _q > 30])

Just wanted to let you know! Thanks for this excellent package!!

Best, Danielle

meren commented 7 years ago

Oh no! I apologize for this. Thank you very much, Danielle.

daniclaar commented 7 years ago

No worries! I saw you were working on Python3 compatibility recently, so figured that this one just fell through the cracks. :) Thanks again, and all the best!