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

iu-trim-fastq not working #29

Closed FlorianTrigodet closed 3 years ago

FlorianTrigodet commented 3 years ago

Using v2.10. I've tried to use iu-trim-fastq but it failed with this error:

iu-trim-fastq -f 0 -t 100 R1.fastq.gz R1-TRIMMED-TO-100bp.fastq.gz
 00% -- (num pairs processed: 1) Traceback (most recent call last):
  File "/project2/meren/VIRTUAL-ENVS/anvio-dev/bin/iu-trim-fastq", line 51, in <module>
    sys.exit(main(input_file_path, output_file_path, args.trim_from, args.trim_to, compressed))
  File "/project2/meren/VIRTUAL-ENVS/anvio-dev/bin/iu-trim-fastq", line 25, in main
    output.store_entry(input.entry)
  File "/project2/meren/VIRTUAL-ENVS/anvio-dev/lib/python3.6/site-packages/IlluminaUtils/lib/fastqlib.py", line 191, in store_entry
    self.file_pointer.write('@' + e.header_line + '\n')
  File "/project2/meren/VIRTUAL-ENVS/anvio-dev/lib/python3.6/gzip.py", line 260, in write
    data = memoryview(data)
TypeError: memoryview: a bytes-like object is required, not 'str'

Maybe related to a python 2 to 3 migration? Thanks for the help!

meren commented 3 years ago

This should be fixed now. I will make a release so you can update it via pip.

meren commented 3 years ago

Done. You should be able to pip install --upgrade illumina-utils now :)

meren commented 3 years ago

The version you're looking for is v2.12