I've RNA-seq illumina data and i would like to find differentially expressed genes,I mapped the data and now i should write a script for tag counting.
I wonder is there a ready made function for tag counting that i can use or i have to write my own script..
HTSeq package does that, it's based on python. It takes a gff3 as part of the input to define tags. Also, R package IRanges has a function called countOverlap, which also does the same thing, counting reads mapped to defined tags. Here, you may use a gff3 as input, convert it into a Granges object and count overlapped reads on top of that. I'd recommend the HTSeq solution if your bam/sam files are very large, as R tends to take the entire alignment at once. If you don't have a huge memory, you're out of luck.
I think HTSeq-count is a superior soultion to countOverlap because it has options to deal different ambiguities scenarios one would have to code oneself.