SAM BAM conversion and sort order

Thanks for your help with this.

Related to this topic, I am having difficulty with the SAM-to-BAM tool not showing any genome as an option for a built-in genome, despite the fact that the T2T genome is set as the reference genome for the file I am trying to convert. Is the T2T genome not recognized by this tool specifically?

1 Like


Matching up the database is usually important but this tool is a little bit special. No genomes are indexed, not just the the human T2T.

But good news – your SAM file is already coordinate sorted, so you can use the “without sorting” version instead. Now, I haven’t specifically tried this with the T2T genome at all or any others recently, so if you get an error please do report that.

If for some reason you’d like a different sort order – apply that once already in BAM format. The datatype will change based on the content (qname_sorted.bam, unsorted.bam). Most tools expect the default datatype bam and those are always coordinate sorted in Galaxy. Upload + most tools apply that as a final step when creating the .bai index.

Hope that helps!

Thanks. I tried using it with the “without sorting” option but this fails to run. It did work with a genome build fasta uploaded to the history though, so this is what I am using currently. Just wondered if I was missing something here but I guess not…

Ok, that is good to know. We are working on indexes over the next several months, and I’ll add this to the review list. Thanks for letting us know and yes, using the fasta from UCSC is the alternative. :slight_smile: