Hello, I have a GRanges (gr) object and a GRangesList (grlist).
I want to find elements in grlist that fully overlap elements of gr.
That is, I want to know, for a given i and j if there is k such that
grlist[j][[k]] is fully contained within gr[i]. It is important
that the values of both i and j can be extracted from the function (k is not important for me).
For example, if I have
gr is within gr. However no element of gr2 is fully contained in gr.
Further, no element of either gr1 or gr2 is fully contained in gr.
So I would the function call f(gr,grlist) to return (TRUE,FALSE,FALSE,FALSE)
I tried using:
But this only tells me for an element of grlist if it is contained in any element of gr.
Is there any way to extract which which element of gr contains it?
Note: I did ask a similar question (https://support.bioconductor.org/p/71619), but on an afterthought decided that mapply() style comparison does not suit my needs (I need to compare every i to every j, not just j=i). Sorry for the confusion.
Thanks in advance