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

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 • 3.6k 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
7.5 years ago

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

ADD COMMENT

Login before adding your answer.

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