This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem with writing reads with HTSeq.BAM_Writer

Good time! I have a bam file with reads from MNase seq. I am trying to write some reads to new empty file with this code:

bam_reader = HTSeq.BAM_Reader("in.bam")

bam_writer = HTSeq.BAM_Writer.from_BAM_Reader("/out.bam", bam_reader)

...

bam_writer.write(read)

But in my out file i receive such message:

" Error! out.bam is not UTF-8 encoded
Saving disabled.
See console for more details."

I'm very upset cause i can't see what's the problem, everything is okay with input data, the code i've find in HTSeq documentation. I'll be very grateful for someone who share an idea why such a mistake can happen.

htseq bam_writer

0 answers

No answers yet.

Log in to answer this question.