I have two granges (gr1 and gr2) in which all ranges of gr2 overlaps with ranges of gr1. How can i find granges of gr1 that are not overlaping with gr2? i.e. black color output given on the link http://firstname.lastname@example.org
I believe "setdiff" should do what you want. Browse through this intro vignette for more info: http://www.bioconductor.org/packages/release/bioc/vignettes/GenomicRanges/inst/doc/GenomicRangesIntroduction.pdf
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.