P. Terry,
When in doubt, first consult the manual pages. In particular

help("RleViewsList-class")
help(viewMaxs)

For example purposes, let's use the RleList object

> x <- RleList(a = c(0:10, 10L, 0:10), b = c(10:0, 10L, 10:0))
> islands <- slice(x, 1)

If you want the locations of the islands, use

> as(islands, "IRangesList")
CompressedIRangesList of length 2
$a
IRanges of length 2
    start end width
[1]     2  12    11
[2]    14  23    10

$b
IRanges of length 2
    start end width
[1]     1  10    10
[2]    12  22    11

If you want the locations of the maximums within each range, use

> viewRangeMaxs(islands)
SimpleIRangesList of length 2
$a
IRanges of length 2
    start end width
[1]    11  12     2
[2]    23  23     1

$b
IRanges of length 2
    start end width
[1]     1   1     1
[2]    12  13     2



Patrick


On 6/21/10 10:33 AM, [email protected] wrote:
  Dear bioc-sig-sequencing,

Working through the workshop handout 'basicChipSeq.pdf' from URL:

http://www.bioconductor.org/workshops/2009/SeattleNov09/ChIP-seq/BasicChipSeq.pdf

page 3, I would like to access range information for a subset of the records in 
an Rle object produced by for example,

cov.ctcf<- coverage(ctcf, width = mouse.chromlens, extend = 126L)
cov.ctcf$chr10
Then if run

islands<- slice(cov.ctcf$chr10, lower = 1)
islands
viewMaxs(head(islands))
would like to access subset of ranges associated with particular values in the 
ViewMaxs(islands) output, for example,>= to a specified depth of reads.

Idea: if islands in 'islands' object are in same order as their associated 
depth values in viewMaxs(islands) output vector, perhaps could loop through 
viewMaxs(islands) vector of values, access/extract associated range from the 
'islands' (Rle) object?

However, how to 'access' the range values from the 'islands' Rle object?

Perhaps there is a recomended way to achieve this goal?


Thanks,
P. Terry
[email protected]

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing


_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to