SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert sorted.txt files from the Illumina pipeline v1.3.4 to bam or sam? crazyhottommy Bioinformatics 7 04-20-2015 07:54 AM
what if samtools sort failed while merging from temp files.. acoada Bioinformatics 6 05-05-2014 10:04 PM
Smatools mpileup thinks my sorted bam files are not sorted plumb_r Bioinformatics 6 04-28-2014 09:22 AM
Samtools bam sort and index errors ddmoore1028 Bioinformatics 7 06-13-2013 11:13 AM
convert sorted bam to sorted sam for htseq-count ugolino Bioinformatics 3 10-19-2012 07:30 AM

Reply
 
Thread Tools
Old 07-28-2014, 08:51 AM   #1
Dipro
Junior Member
 
Location: California

Join Date: Sep 2012
Posts: 6
Default bam files not sorted by samtools sort

Hi,

Could I please be adviced on the following problem. I have sam files generated from bismark. I converted it to bam file using samtools view and sorted it by coordinates using samtools sort. When I checked the header of both the sorted and unsorted bam files, they both stated the files are unsorted.

I am unsure why this would be the case.

Would anyone be able to shed light on this issue?

Thanks
Dipro is offline   Reply With Quote
Old 07-28-2014, 01:34 PM   #2
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Which version of samtools did you use? Older versions never bothered to update the header (but still sorted the reads).
maubp is offline   Reply With Quote
Old 07-28-2014, 01:39 PM   #3
Dipro
Junior Member
 
Location: California

Join Date: Sep 2012
Posts: 6
Default

I am using version 0.1.18. I am now certain that the files had not been sorted. I ran the files through our downstream analysis programs which threw an error indicating the flies were unsorted.
Dipro is offline   Reply With Quote
Old 07-28-2014, 03:12 PM   #4
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

The best test if a BAM file is sorted is to try "samtools index your_file.bam", if that works the file is coordinate sorted.
maubp is offline   Reply With Quote
Reply

Tags
bismark, samtools sort

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 07:58 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO