What about using GenomicAlignments to create count matrix using "summarizeOVerlaps" instead of using ht-seq? does it need to be sorted?
As I know that GenomicAlignment kind of implementing the similar algorithm as ht-seq, but there is no similar -r option. Since the default option for ht-seq is sorted by name, for the safe side I sort the BAM by name before feed them to "summarizeOverlaps". Is this a general practice or it is not necessary to sort BAM?