Error while conversion of .sam to sorted.sam using samtools
1
0
Entering edit mode
10.5 years ago
Mohit ▴ 30

Hey hi,

I have used BWA for the alignment purpose. The .sam files are obtained after BWA step. I have converted it to .bam

Now I want to sort the .bam file to get .sorted.bam for this I have used command:

~admin1/software/samtools-0.1.19/samtools sort xyz.bam xyz.sorted

But some Error is coming:-->

"[bam_sort_core] truncated file. Continue anyway."

Thanking you for consideration!!!

Mohit R. Navandar

ChIP-Seq • 4.3k views
ADD COMMENT
0
Entering edit mode

The BWA output (.sam) may not be complete or it might be corrupt file.. Is it the case?

ADD REPLY
1
Entering edit mode

The SAM file is probably fine. The BAM file, on the other hand, is probably where the problem is.

ADD REPLY
0
Entering edit mode

Try

samtools sort

single threaded, that is, without -@

Based on 960 BAMs that failed with this error multithreaded, but succeeded single-threaded, I strongly suspect a bug in the samtools threading code.

(samtools ver. 1.2, on Linux)

ADD REPLY
2
Entering edit mode
10.5 years ago

The original file was corrupt or otherwise incomplete. Just remake the BAM file.

ADD COMMENT

Login before adding your answer.

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