Thanks Devon, the intention is to use this number as "raw read count" to perform differential expression analysis. Unlike HTSEQ, samtools idxstats is a very crude way (I think) to do so. I wanted to know how samtools decide if a read is mapped i.e. whether a read is considered mapped even if one base is mapped? What about a read that maps to 2 different genes partially. HTSEQ takes care of the same.
What is a better method/tool to take the raw reads counts in case of denovo transcriptome assembly. RSEM is there, however, it takes the transctriptome assembly from Trinity. What I have is CDS predicted from TransDecoder taking Unigenes as input.
Not not_mapped is mapped as per samtools logic, as I understand