FAQ      Help   
BAM file sort order
Qlucore Omics Explorer
Date Created
2015-04-29 08:34:38
Date Updated
2015-04-29 08:43:30
I’m getting the error "BAM file not sorted by coordinate", although I'm sure my BAM files are already sorted on coordinate.
Qlucore Omics Explorer determines the sort order by the BAM file header information (the '@HD-SO:coordinate' tag). But not all sorting tools add the proper information to the header. In particular, older versions of samtools had this issue. But in more recent versions the problem with the missing/erroneous sort header has been fixed. See http://www.htslib.org/doc/samtools-1.1.html, and the entry on 'sort'.

If you are sure your files are correctly sorted an alternative to resorting with a newer tool is to manually change the header to contain the correct tag. E.g if the header reads something like "@HD VN:1.4" change it to "@HD VN:1.4 SO:coordinate".
Related articles
Was this information helpful?
Back to Search Results