[BioC] bug in pintersect in GenomicRanges

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Sun Nov 11 18:16:50 CET 2012


Example

library(GenomicRanges)
gr1 = GRanges(seqnames = c("chr1", "chr1"), ranges = IRanges(start =
c(1,5), width = 7))
gr2 = GRanges(seqnames = "chr1", ranges = IRanges(start = 1, end = 4))
pintersect(gr1, rep(gr2, 2))

GRanges with 2 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chr1    [1, 4]      *
  [2]     chr1    [5, 4]      *
  ---
  seqlengths:
   chr1
     NA

The second element in the return GRanges should be empty.  I would
therefore expect that the return length of the pintersect would have
length 1, despite the fact that the first object has length 2.

Kasper



More information about the Bioconductor mailing list