HingeAssembler / HINGE

Software accompanying "HINGE: Long-Read Assembly Achieves Optimal Repeat Resolution"
http://genome.cshlp.org/content/27/5/747.full.pdf+html?sid=39918b0d-7a7d-4a12-b720-9238834902fd
Other
64 stars 9 forks source link

TypeError: must be str, not bytes in parse_read.py script #160

Open jsimba-99 opened 3 years ago

jsimba-99 commented 3 years ago

Hi, running hinge to assemble the chloroplast genome (~156kb) of a plant species after install and set up all the dependencies and scripts I got the following error:

draft assembly Traceback (most recent call last): File "/HINGE//inst/bin/../lib/hinge/get_draft_path.py", line 77, in for read_id,read in zip(reads,reads_queried): File "/HINGE/inst/lib/hinge/parse_read.py", line 21, in parse_read seq += l.strip() TypeError: must be str, not bytes

Everything seemed it was working up to this point

I don't how to solve this error and would appreciate any help

Cheers,

fxia22 commented 3 years ago

It should work if you change to seq += l.decode('ascii').strip() or seq += l.decode('utf-8').strip().

jsimba-99 commented 3 years ago

Thanks, it worked apparently

My line now shows this error:

draft assembly Traceback (most recent call last): File "/HINGE//inst/bin/../lib/hinge/get_draft_path.py", line 109, in vert_len = len(read_dict[int(vert_id)][1]) KeyError: 844

Any idea about this?

Many thanks @fxia22

Cheers,