Hi,
I have used the countOverlaps to count the reads on per gene basis(by exons,transcripts )But thats not what I want .I want to get the coverage base by base.
reads <- readBamGappedAlignments("Galaxy Ctrl.bam")cover <- coverage(reads)islands <- slice(cover, lower = 1) 
I have got the islands now  which look like this
views:
     start   end width
 [1]  1128  1205    78 [2 3 4 4 4 5 7 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 ...]
 [2]  6608  6748   141 [ 1  2  2  3  4  5  9 11 16 16 17 18 18 19 19 19 ...]
 [3]  7117  7193    77 [1 1 1 1 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...]
 [4]  7608  7678    71 [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...]
 [5]  7739  7809    71 [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...]
 [6]  8366  8436    71 [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...]
 [7]  8584  8654    71 [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...]
 [8]  8780  8892   113 [1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...]
 [9] 11565 11635    71 [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...]

Now I would want these intervals grouped by gene and sum up the reads interval-wiseAs countOverlaps would not give the intervals of the reads and not even the reads base by base.

Thanks,Rohan
	[[alternative HTML version deleted]]

