Hi,
I am trying to get the coverage in the regions like 3'UTR which is similar to doing the earlier analysis except for different annotation object.Below is my code:
>reads <- readBamGappedAlignments("Galaxy Ctrl.bam")
>cover=coverage(reads)
>cov <- cover[1]#subsetting coverage for chromosome 1

>utr=range(threeUTRsByTranscript(txdb,use.names=FALSE))
>table(elementLengths(utr))##every element in  GRangesList object 'utr' contains only 1 range here ...thankfully as compared to previous case  1 33381
>tr<- unlist(utr,use.names=TRUE)
 >names(tr) <- names(utr)

>tx_rgl<- as(tr,"RangesList")
#tx_rgl[1] subsetting ranges list for chromosome 1>vl <- Views(cov,tx_rgl[1]) ##

So the Views object looks like this


SimpleRleViewsList of length 1$chr1Views on a 249250621-length Rle subject
views:           start       end  width   [1]  67208779  67210768   1990 [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...]   [2]  33585784  33585995    212 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]   [3]  48998527  48999844   1318 [ 32  44  52  72  79  92 104 115 129 ...]   [4]  16785386  16786584   1199 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]   [5]  16785492  16786584   1093 [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...]   [6]   8404074   8404227    154 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]   [7]  25167429  25170815   3387 [8 8 8 8 6 6 4 4 2 1 1 1 1 1 0 0 0 0 0 ...]   [8]  16785386  16786584   1199 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]   [9]  92145900  92149295   3396 [  3   4   5   9  16  30  46  53  67 ...]   ...       ...       ...    ... ...[3276] 248202509 248202607     99 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...][3277] 248902717 248902911    195 [ 0  0
  0  0  1  2  6 11 13 15 19 19 20 ...][3278] 249104651 249106098   1448 [ 65 100 139 174 206 243 277 294 308 ...][3279] 249142833 249143714    882 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...][3280] 249144203 249144408    206 [  1   1   2   3  14  38  68 109 164 ...][3281] 249144203 249144408    206 [  1   1   2   3  14  38  68 109 164 ...][3282] 249144203 249144408    206 [  1   1   2   3  14  38  68 109 164 ...][3283] 249212563 249213345    783 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...][3284] 249212563 249213345    783 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]


Now I would like to get how many islands fall in 3'UTR with continuous coverage of :mimimum coverage of 1:no of regionsmimimum coverage of 2:no. of regions...

Also,we could go the alternate way of getting the islands which I previously wrote as well:
>reads <- readBamGappedAlignments("Galaxy Ctrl.bam")>cover <- coverage(reads)>islands <- slice(cover, lower = 1) Then could we get many islands fall in 3'UTR?Similarly,for continuous coverage of 2..islands <- slice(cover, lower = 2) 
Any ideas on this???
	[[alternative HTML version deleted]]

