Hi friends
I want to calculate average of read count / coverage for all genes, I mean creating a list which shows number of aligned reads for each location.
For better understanding, making a proportion for all genes location and an average list of read count for the locations like :
Location = Upsrtream 0-200 200-400 400-600 ... Downstream
Average read counts= 20reads 15reads 32reads ....
How can I make this list from bam or wig file?
you can get the read count for each coordinate from bam using samtools view option.
samtools view bamfile chr10:3100260-3110000 | wc -l
this u can loop in command line for all the genes u have
or just
samtools view -c bamfile chr10:3100260-3110000
but your solution just count the reads, it doesn't consider the deletions, the clipping, etc...