[BioC] distances for IRanges
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Tue Jun 8 17:51:51 CEST 2010
Assuming I have two IRanges, each with multiple ranges, like
ir1 = IRanges(start = 3:6, width = 2)
ir2 = IRanges(start = 10:17, width = 2)
Is there a fast way to compute a pairwise distance matrix between the
two sets, by which I mean
ii = 1
jj = 2
width(gaps(c(ir1[ii], ir2[jj])))
where ii, jj would index into a result matrix. Essentially this would
be an expanded version of findOverlaps, since any two ranges with
distance = 0, have an overlap.
Is such functionality available in IRanges, in an efficient
implementation (think of the case where the two IRanges have - say -
10,000 ranges or more)?
Kasper
More information about the Bioconductor
mailing list