Hi. I have encountered error while working on htseq-count. I have studied this error on many form. The solution to this error was sort the bam file by name. I did same by using this command as
samtools sort -n myfile_align.bam -o myfile_sortedn.bam
then i run the comand on htseq as
htseq-count -f bam -r name -i gene_id -s no -t exon myfile_sortedn.bam reference.gtf > myfile_htseq_count.txt
I got the same wornings again after sorting as
Warning: Read NS500786:42:HW75GBGXX:1:11101:1523:3911 claims to have an aligned mate which could not be found in an adjacent line.
Warning: 1301378 reads with missing mate encountered.54666717 SAM alignment pairs processed.
Can you please tell me other solution to remove this warnings.