Hi

Can we sort BAM files according to the read name? As the normal sorting happens on the co-ordinates, can anyone tell how to sort a BAM file on read names? I am trying to run HT-Seq count on paired end SAM files but receiving warnings  for which I have to sort the BAM in read names and then create its SAM and then run HT-Seq
pass the `-n` flag to [samtools][1]

    samtools sort -n inputfile output

http://samtools.sourceforge.net/samtools.shtml

 [1]: http://samtools.sourceforge.net/