[Bioc-sig-seq] Bug when adding to a GRanges object using double brackets

Martin Morgan mtmorgan at fhcrc.org
Sun Aug 29 06:23:02 CEST 2010


On 08/26/2010 02:04 AM, Aaron Statham wrote:
> Hi again,
> I've run into a problem accessing elements of a GRangesList using single
> brackets, but only if they have been added using double brackets after the
> initial GRanges() call.
> Happens in both 2.6 and devel branches.
> 
>> g1 <- GRanges("chr1", IRanges(5, width=1))
>> glist <- GRangesList(g1)
>> glist[[2]] <- g1
>> glist[1]
> GRangesList of length 1
> [[1]]
> GRanges with 1 range and 0 elementMetadata values
>     seqnames    ranges strand |
>        <Rle> <IRanges>  <Rle> |
> [1]     chr1    [5, 5]      * |
> 
> seqlengths
>  chr1
>    NA
>> glist[2]
> Error in .bracket.Index(start, nrow(x), rownames(x), asRanges = TRUE) :
>   range index out of bounds

Thanks Aaron, this has been addressed in the devel branch, GenomicRanges
v. 1.1.24 / IRanges 1.7.30, available with R-devel and biocLite in a day
or so (all being well), or via svn now.

Martin

>> glist[[2]]
> GRanges with 1 range and 0 elementMetadata values
>     seqnames    ranges strand |
>        <Rle> <IRanges>  <Rle> |
> [1]     chr1    [5, 5]      * |
> 
> seqlengths
>  chr1
>    NA
>> sessionInfo()
> R version 2.12.0 Under development (unstable) (2010-07-06 r52460)
> Platform: x86_64-unknown-linux-gnu (64-bit)
> 
> locale:
>  [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8
>  [5] LC_MONETARY=C              LC_MESSAGES=en_AU.UTF-8
>  [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> other attached packages:
> [1] GenomicRanges_1.1.20 IRanges_1.7.24
> 
> Thanks,
> Aaron
> 


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-sig-sequencing mailing list