Hi!  I apologize if this is the wrong place to post a bug report - the  
maintainer of the package is listed as: Maintainer Biocore Team c/o  
BioC user list

I have a small set of range info:

start=c(187592960,246804638,193202778,151026713,150822234)
end=c(187810199,246862141,193212714,151037738,150856715)
mapRanges<-IRanges(start, end)
tree<-IntervalTree(mapRanges)

If I search the data against itself like this:
result=overlap(tree, mapRanges)@matchMatrix

      query subject
[1,]     5       5
[2,]     4       4
[3,]     1       1
[4,]     3       3
[5,]     2       2

You can see each query matches only the subject - all is well in the  
world so far.

But, if you do it this way:

result2=overlap(tree)
An object of class “RangesMatching”
Slot "matchMatrix":
      query subject
[1,]     1       5
[2,]     2       4
[3,]     3       1
[4,]     4       3
[5,]     5       2


It looks item 1 is matching up to item 5, etc.  Not so great.

if we sort the data first:
start=sort(start)
end=sort(end)
mapRanges<-IRanges(start, end)
tree<-IntervalTree(mapRanges)
result2=overlap(tree)

 > result2
An object of class “RangesMatching”
Slot "matchMatrix":
      query subject
[1,]     1       1
[2,]     2       2
[3,]     3       3
[4,]     4       4
[5,]     5       5

Things are once again right in the world.

I can't find anywhere in the documents where sorting is a requirement  
to sort data when using a self-referential search.  Is this a bug in  
the documentation, or in the code itself?  I would assume that the  
IntervalTree class would perform sorting if it's a requirement for the  
code to work correctly.

Otherwise, fantastic package that's saved me quite a bit of time.

Thanks

-Jim Nemesh
	[[alternative HTML version deleted]]

