Samtools sort does not add a @HD SO:<Sort Order> attribute
Hi, I'm trying to run FindTranslocations, but I get this error/warning: "BAM file has no @HD SO:<SortOrder> attribute: it is not possible to determine the sort order" However, samtools sort does not add this attribute. Could you determine whether or not the file is sorted by some other means? Maybe you could use Lindenbaum's approach: http://plindenbaum.blogspot.no/2011/02/testing-if-bam-file-is-sorted-using.html?
I'd rather not use something else than BWA and samtools to get this tool working.
Thank you.
Ole
Dear Ole, this sounds really strange to me, maybe you are using an old samtools version. What happens if you run "samtools view -H your_bam_file.bam"?
The HD attribute is used by picard tools and many other tools to check the order ot the bam file. What I can do is to add a "--force-sorted" option that overwrites the HD attribute.
I will add this feature before the end of this week
Forgot to say: I always use bwa+samtools recipe to align/sort bam files.