R/split-methods.R

setMethod("split", signature=signature(x="GRanges", f="GRangesList"),
          function(x, f)
          {
              out <- GRangesList(lapply(f, function(y) intersect(x, y)))
              mcols(out) <- mcols(f)
              out[which(sapply(out, length) > 0)]
          })

Try the podkat package in your browser

Any scripts or data that you put into this service are public.

podkat documentation built on Nov. 8, 2020, 6:55 p.m.