This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bgzf_read error during samtools run

hi

when i used following command on my bam file:

samtools view -F 4 myfile.bam | perl -lane 'print "$F[2]\t$F[3]"' > myfile.hits

i got this message:

[E::bgzf_read] Read block operation failed with error -1 after 0 of 4 bytes

[main_samview] truncated file.

anybody can help me to resolve it.

software error samtools cnv-seq bgzf

1 answer

Somehow your BAM file got corrupted. You'll want to remake it.

Log in to answer this question.