I have used samtools to make bam files and it is perfectly showing the data in igv. somehow i am unable to get the counts when using htseq. after going through literature i think i needed to sort bam files according to coordinates. is there anyone can share a command example that how a sorted bam can be generated using samtools. thanks
ps. currently is gives an empty txt file when i run htseq on bam file.
previously i used
samtools sort -@ 8 -o file1.bam file1.sam
how to specify sort to coordinates?