Samtools error -1
0
0
Entering edit mode
4.1 years ago
rin ▴ 40

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 • 2.5k views
ADD COMMENT
2
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2152 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