% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coverage_helpers.R
\name{overlapsToCoverage}
\alias{overlapsToCoverage}
\title{Get overlaps and convert to coverage list}
\usage{
overlapsToCoverage(gr, reads, keep.names = TRUE, type = "any")
}
\arguments{
\item{gr}{a \code{\link{GRanges}} object, to get coverage of.}

\item{reads}{a GAlignment or GRanges object of RiboSeq, RnaSeq etc.}

\item{keep.names}{logical (T), keep names or not.}

\item{type}{a string (any), argument for countOverlaps.}
}
\value{
a Rle, one list per group with # of hits per position.
}
\description{
Get overlaps and convert to coverage list
}
\examples{
ORF <- GRanges(seqnames = "1",
               ranges = IRanges(start = c(1, 10, 20),
                                end = c(5, 15, 25)),
               strand = "+")
names(ORF) <- "tx1"
reads <- GRanges("1", IRanges(25, 25), "+")
overlapsToCoverage(ORF, reads)

}
\seealso{
Other ExtendGenomicRanges: \code{\link{asTX}},
  \code{\link{coveragePerTiling}},
  \code{\link{reduceKeepAttr}}, \code{\link{tile1}},
  \code{\link{txSeqsFromFa}}, \code{\link{windowPerGroup}}
}
\concept{ExtendGenomicRanges}
