There appear to be different methods available for 'Rle' when loaded via the GenomicRanges package depending on whether a GRanges object has been created. Specifically, prior to a GRanges object being created there are no 'values = character' methods for 'Rle'. This doesn't make sense to me and is causing me problems in code I am developing.

The following code highlights the cause of my confusion:

| > library(GenomicRanges)
| Loading required package: BiocGenerics
|
| Attaching package: ‘BiocGenerics’
|
| The following object(s) are masked from ‘package:stats’:
|
|     xtabs
|
| The following object(s) are masked from ‘package:base’:
|
|    anyDuplicated, cbind, colnames, duplicated, eval, Filter, Find,
|    get, intersect, lapply, Map, mapply, mget, order, paste, pmax,
|    pmax.int, pmin, pmin.int, Position, rbind, Reduce, rep.int,
|    rownames, sapply, setdiff, table, tapply, union, unique

| Loading required package: IRanges
| > showMethods('Rle')
| Function: Rle (package IRanges)
| values="missing", lengths="missing"
| values="vectorORfactor", lengths="integer"
| values="vectorORfactor", lengths="missing"
| values="vectorORfactor", lengths="numeric"

## Only 4 methods are available for Rle

| > seqinfo <- Seqinfo(paste0("chr", 1:3), c(1000, 2000, 1500), NA, "mock1")
| > gr <- GRanges(seqnames = Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)), 
| +               ranges = IRanges(1:10, width = 10:1, names = head(letters,10)),
| +               strand = Rle(strand(c("-", "+", "*", "+", "-")),c(1, 2, 2, 3, 2)), 
| +               score = 1:10, GC = seq(1, 0, length=10),
| +               seqinfo = seqinfo)
| > gr
| GRanges with 10 ranges and 2 metadata columns:
|     seqnames    ranges strand |     score                GC
|        <Rle> <IRanges>  <Rle> | <integer>         <numeric>
|   a     chr1  [ 1, 10]      - |         1                 1
|   b     chr2  [ 2, 10]      + |         2 0.888888888888889
|   c     chr2  [ 3, 10]      + |         3 0.777777777777778
|   d     chr2  [ 4, 10]      * |         4 0.666666666666667
|   e     chr1  [ 5, 10]      * |         5 0.555555555555556
|   f     chr1  [ 6, 10]      + |         6 0.444444444444444
|   g     chr3  [ 7, 10]      + |         7 0.333333333333333
|   h     chr3  [ 8, 10]      + |         8 0.222222222222222
|   i     chr3  [ 9, 10]      - |         9 0.111111111111111
|   j     chr3  [10, 10]      - |        10                 0
|   ---
|   seqlengths:
|   chr1 chr2 chr3
|   1000 2000 1500
| > showMethods('Rle')
| Function: Rle (package IRanges)
| values="character", lengths="integer"
|     (inherited from: values="vectorORfactor", lengths="integer")
| values="character", lengths="numeric"
|     (inherited from: values="vectorORfactor", lengths="numeric")
| values="factor", lengths="integer"
|     (inherited from: values="vectorORfactor", lengths="integer")
| values="factor", lengths="numeric"
|     (inherited from: values="vectorORfactor", lengths="numeric")
| values="missing", lengths="missing"
| values="vectorORfactor", lengths="integer"
| values="vectorORfactor", lengths="missing"
| values="vectorORfactor", lengths="numeric"

## Now, there are 8 methods available for Rle

Is this a bug or am I missing something? If I'm just missing something, can someone please explain how I can ensure that the methods involving 'values = character' are available to me upon loading of the GenomicRanges package?

Many thanks,
Pete

--------------------------------
Peter Hickey,
PhD Student/Research Assistant,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
Ph: +613 9345 2324

hickey@wehi.edu.au
http://www.wehi.edu.au


______________________________________________________________________
The information in this email is confidential and intend...{{dropped:8}}

