This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Samtools error -1

Hi all,

I am analyzing some data from GSE156255 and I keep getting an error when ordering the bam files. I tried to look it up but I could not find anyone asking for error -1.

Here is what I get:

What I have done so far:

  • Alignment of sequences using Hisat2.
  • Converting sam files to bam using samtools view -bS file.sam > file.bam and,
  • samtools sort file.bam -o file_sorted.bam

After running the latter, I get the following error:

W::bam_hdr_read] EOF marker is absent. The input is probably truncated
[E::bgzf_uncompress] Inflate operation failed: progress temporarily not possible, or in() / out() returned an error
[E::bgzf_read] Read block operation failed with error -1 after 0 of 4 bytes
samtools sort: truncated file. Aborting

I also tried to specify another folder to write the temporary files, but I again get an error

 samtools sort file.bam -T /home/username/temp -o file_sorted.bam
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated
[E::hts_open_format] Failed to open file /home/mol8008_21/temp.0000.bam
samtools sort: failed to create temporary file "/home/mol8008_21/temp.0000.bam": No such file or directory

Any ideas on how to solve this? Thank you in advance!!

rna-seq samtools bam

EOF marker is absent. The input is probably truncated

something wrong happened in the command that generated the bam file (before sorting), for example, check you have enough space on your disk. furthermore, with modern version of samtools , you don't have to convert the SAM to BAM before sorting.

0 answers

No answers yet.

Log in to answer this question.