FWIW subsetByOverlaps(gr1, gr2) is equivalent to gr1[gr1 %over% gr2] so you would get the opposite with gr1[!(gr1 %over% gr2)]. This is not what you seem to want though: you seem to want setdiff() (thanks Steve). Just wanted to clarify the difference.
Thanks Steve , it worked
Thanks Steve , it worked
Thanks Steve , it worked
Thanks Steve , it worked