[Bioc-devel] Subsetting GRangesList with mcols on the mcols: Error in normalizeSingleBracketSubscript

Hervé Pagès hpages at fhcrc.org
Wed Sep 18 22:09:08 CEST 2013


Yes sorry to Mike, Michael, Kasper, Julian, and all those that
have been hit by the refactoring of the subsetting code in 
IRanges/GenomicRanges. The main bulk of this refactoring is over
now and things should be much more stable. The major goals of this
refactoring were to simplifiy the code, fix old standing bugs, and
bring more consistency across Vector derivatives (e.g. they should
all support subsetting by a Ranges or Rle object now). There are
also some speed improvements. No known regression but of course
there might be some (which should be easy to fix now that the code
is much simpler).

Please let me know if you still see problems in your packages that
could be related to this refactoring. Thanks!

H.


On 09/18/2013 12:07 PM, Mike Love wrote:
> Yes, works for me now.
>
> Thanks,
>
> Mike
>
> On Sep 18, 2013, at 8:47 PM, Valerie Obenchain <vobencha at fhcrc.org> wrote:
>
>> Hi Michael,
>>
>> This looks like an artifact from reorganizing the subsetting code in IRanges/XVector. The operation works for me with the most recent versions from devel. I'm assuming it now works for you?
>>
>> Valerie
>>
>> On 09/13/2013 02:33 AM, Michael Love wrote:
>>> hi,
>>>
>>> I came across an error in trying to subset a GRangesList with metadata
>>> columns on the metadata columns:
>>>
>>>> library(GenomicRanges)
>>>
>>>> grl <- GRangesList(GRanges(),GRanges())
>>>
>>>> mcols(grl) <- DataFrame(a=1:2)
>>>
>>>> mcols(mcols(grl)) <- DataFrame(type="z")
>>>
>>>> grl[1:2]
>>>
>>> Error in normalizeSingleBracketSubscript(i, x, byrow = TRUE) :
>>>    subscript contains NAs or out of bounds indices
>>> Calls: [ ... extractROWS -> extractROWS -> normalizeSingleBracketSubscript
>>>
>>> Also grl[2] produces the same error, while grl[1] does not.  traceback and
>>> sessionInfo below.
>>>
>>> thanks,
>>>
>>> Mike
>>>
>>>
>>>> grl[2]
>>> Error in normalizeSingleBracketSubscript(i, x, byrow = TRUE) :
>>>    subscript contains NAs or out of bounds indices
>>> Calls: [ ... extractROWS -> extractROWS -> normalizeSingleBracketSubscript
>>>> traceback()
>>> 18: stop("subscript contains NAs or out of bounds indices")
>>> 17: normalizeSingleBracketSubscript(i, x, byrow = TRUE)
>>> 16: extractROWS(x at elementMetadata, i)
>>> 15: extractROWS(x at elementMetadata, i)
>>> 14: extractROWS(x at elementMetadata, i)
>>> 13: extractROWS(x at elementMetadata, i)
>>> 12: extractROWS(x, i)
>>> 11: extractROWS(x, i)
>>> 10: .nextMethod(x, i)
>>> 9: eval(expr, envir, enclos)
>>> 8: eval(call, callEnv)
>>> 7: callNextMethod(x, i)
>>> 6: .nextMethod(x = x, i = i)
>>> 5: eval(expr, envir, enclos)
>>> 4: eval(call, callEnv)
>>> 3: callNextMethod(x = x, i = i)
>>> 2: grl[2]
>>> 1: grl[2]
>>>
>>>> sessionInfo()
>>> R Under development (unstable) (2013-09-12 r63919)
>>> Platform: x86_64-apple-darwin12.3.0 (64-bit)
>>>
>>> locale:
>>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>>>
>>> attached base packages:
>>> [1] parallel  stats     graphics  grDevices utils     datasets  methods
>>> [8] base
>>>
>>> other attached packages:
>>> [1] GenomicRanges_1.13.42 XVector_0.1.2         IRanges_1.19.33
>>> [4] BiocGenerics_0.7.5    knitr_1.2             BiocInstaller_1.11.4
>>> [7] Defaults_1.1-1
>>>
>>> loaded via a namespace (and not attached):
>>> [1] digest_0.6.3   evaluate_0.4.3 formatR_0.7    stats4_3.1.0
>>> stringr_0.6.2
>>> [6] tools_3.1.0
>>>
>>>     [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioc-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list