I have tested your test-dataset and it indeed gave the same results for both HTseq-count as FeatureCounts.
I think the difference is made by the NH tag in my BAM/SAM file. When I tried a single read that mapped 5 times it gives a different result.
According the documentation of HTseq-count it excludes all reads with more than one reported alignment (whenever the NH tag is available), which I believe FeatureCounts does not.
Using the mapping quality filter in FeatureCounts, it will produce the same result, since reads with more than one reported alignment have a lower mapping quality.
I have used Tophat for the alignment of my reads, followed by HTseq-count as well as FeatureCounts. I've attached a test set with 5 multimapped hits from the data I got from TopHat.
The commands I used were:
HTseq-count:
Code:
htseq-count MMread.sam annotation.gtf -s no -q > genecounts_MMread.txt
Code:
featureCounts -a annotation.gtf -t exon -g 'gene_id' -i MMread.sam -T 5 -o feature_counts_MMread.txt
Iris
Leave a comment: