And there's also a way of specifying what should be returned.
Should it be all the possible overlaps?
Or just the first overlap you encounter?
And so on and so forth.
This takes a while to become totally comfortable with, and
we will see more uses of it throughout the class.
So in many cases when you're running findOverlaps,
you're not really interested in the exact overlaps, you're just interested in,
how often do I see overlaps between a query set and a subject set?
And for this we have the convenient function,
countOverlaps that returns a vector.
In this case, it means that range number one in the ir1 overlaps ir2[1].
Element two overlaps two elements of ir2.
That's represented in the Hits object above.
And element number three doesn't overlap anything at all.
countOverlaps as faster and more memory efficient,
which matters a lot if you use this for extremely big, high ranges,
and we will be using it for extremely big, high ranges.
Finally we can also relate IRanges in a different way than through the overlaps.
We can look at which ones are close to each other.
So again, we take our two IRanges and we can ask,
which of these IRanges in ir2 are closer to the ones in ir1?