Question: Error while conversion of .sam to sorted.sam using samtools
0
gravatar for Mohit
4.8 years ago by
Mohit0
India
Mohit0 wrote:

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 • 2.8k views
ADD COMMENTlink modified 4.8 years ago by Devon Ryan88k • written 4.8 years ago by Mohit0

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

ADD REPLYlink written 4.8 years ago by Mohit0
1

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

ADD REPLYlink written 4.8 years ago by Devon Ryan88k

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 REPLYlink written 3.9 years ago by artg0
2
gravatar for Devon Ryan
4.8 years ago by
Devon Ryan88k
Freiburg, Germany
Devon Ryan88k wrote:

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

ADD COMMENTlink written 4.8 years ago by Devon Ryan88k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 832 users visited in the last hour