I am interested in finding number of reads associated to each human genes based on the gtf file. I used the below code for running htseq-count.
htseq-count -f bam -s yes -i gene_id accepted_hits.bam genes.gtf >> SampleDH78-4_Genes_count.txt
100000 GFF lines processed.
200000 GFF lines processed.
869204 GFF lines processed.
Warning: Read HISEQ:137:C6W39ACXX:5:1216:16699:92182 claims to have an aligned mate which could not be found in an adjacent line.
100000 SAM alignment record pairs processed.
124300000 SAM alignment record pairs processed.
124400000 SAM alignment record pairs processed.
Warning: 120128572 reads with missing mate encountered.
124460592 SAM alignment pairs processed.
Sample output from htseq-count
Warning: 120128572 reads with missing mate encountered from htseq-count.
% of reads associated to globin=sum of all the above reads for globin genes divided by the total number of reads *100.
% of reads associated to globin=sum of all the above reads for globin genes / 124460592 *100.
Only half of the reads pairs were processed.