Samtools "Eof Marker Is Absent" Error Only In Version 0.1.19 ?
3
5
Entering edit mode
8.6 years ago
Mike Axtell ▴ 250

Using samtools version 0.1.18, the following bowtie alignment pipeline works well to create a sorted BAM file:

bowtie -v 0 -S genome.fasta test.fastq | samtools view -S -b -u - | samtools sort - test0.1.18
[samopen] SAM header is present: 2108 sequences.
# reads processed: 80094
# reads with at least one reported alignment: 70028 (87.43%)
# reads that failed to align: 10066 (12.57%)
Reported 70028 alignments to 1 output stream(s)

However, if I install and use samtools version 0.1.19, I get an error message claiming the input is truncated (2nd line below):

bowtie -v 0 -S genome.fasta test.fastq | samtools view -S -b -u - | samtools sort - test0.1.19
[bam_header_read] EOF marker is absent. The input is probably truncated.
[samopen] SAM header is present: 2108 sequences.
# reads processed: 80094
# reads with at least one reported alignment: 70028 (87.43%)
# reads that failed to align: 10066 (12.57%)
Reported 70028 alignments to 1 output stream(s)

I assume the error message is coming from samtools sort. But it is confusing, since both versions create identical results, including fully intact headers and properly formatted BAM alignments. Removing the -u switch in the samtools view call has no effect.

I'd like to fix the reporting of this error because a similar pipeline is used in some scripts of mine -- users who have samtools 0.1.19 are worried about the error message. I know I could just send the STDERR of the samtools sort to /dev/null, but I'd rather try and understand what is happening first ...

samtools bowtie • 18k views
ADD COMMENT
11
Entering edit mode
8.6 years ago

This is a known bug, you can ignore it. This was actually fixed at some point and then seems to have been accidentally reverted.

ADD COMMENT
0
Entering edit mode

Thanks for digging that out for me - much appreciated

ADD REPLY
0
Entering edit mode

No problem. Given how frequently I use samtools (and its C API), I should probably check if the current devel branch still has this bug and submit a fix if not.

ADD REPLY
0
Entering edit mode
8.2 years ago
scalabrin • 0

I got the same "warning" that appeared an error though! I digged into my data until I discovered that only the new version provides the "warning". Only successively I discovered this thread.

I hope it gets fixed soon and further people won't get affected by that. It is very annoying indeed!

ADD COMMENT

Login before adding your answer.

Traffic: 1543 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6