R/convertPairedGRtoGR.R

Defines functions convertPairedGRtoGR

Documented in convertPairedGRtoGR

#' Convert Pairs to GRanges
#'
#' @param pairs          the Pairs object
#'
#' @return            a GRanges
#'
#' @export
convertPairedGRtoGR <- function(pairs){
  ir <- IRanges(start=start(first(pairs)),end=end(second(pairs)))
  gr <- GRanges(seqnames=seqnames(first(pairs)),ranges=ir)
  return(gr)
}
trichelab/spiky documentation built on Sept. 17, 2022, 8:44 a.m.