I have a GRanges and a GRangesList object, i.e.:
gr # GRanges grList # GRangesList
I wish to know what ranges in the GRanges are in each of the ranges in each element in the list, so I thought of calling
overlapsAny on each element of the GRangesList like so:
overlapsList <- lapply(grList, function(x) overlapsAny(query=gr, subject=x))
This gives me the desired output, however this is very slow!
Is there a faster of doing the same thing?