% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coverage_helpers.R
\name{coveragePerTiling}
\alias{coveragePerTiling}
\title{Get coverage per group}
\usage{
coveragePerTiling(grl, reads, is.sorted = FALSE, keep.names = TRUE,
  as.data.table = FALSE, withFrames = FALSE)
}
\arguments{
\item{grl}{a \code{\link{GRangesList}}
of 5' utrs or transcripts.}

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

\item{is.sorted}{logical (F), is grl sorted.}

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

\item{as.data.table}{a logical (FALSE), return as data.table with 2 columns,
position and count.}

\item{withFrames}{a logical (FALSE), only available if as.data.table is
TRUE, return the ORF frame, 1,2,3, where position 1 is 1, 2 is 2 and
4 is 1 etc.}
}
\value{
a RleList, one integer-Rle per group with # of hits per position.
Or data.table if as.data.table is TRUE.
}
\description{
It tiles each GRangesList group, and finds hits per position
}
\details{
This is a safer speedup of coverageByTranscript from GenomicFeatures.
It also gives the possibility to return as data.table, for faster
computations.
}
\examples{
ORF <- GRanges(seqnames = "1",
               ranges = IRanges(start = c(1, 10, 20),
                                end = c(5, 15, 25)),
               strand = "+")
grl <- GRangesList(tx1_1 = ORF)
RFP <- GRanges("1", IRanges(25, 25), "+")
coveragePerTiling(grl, RFP, is.sorted = TRUE)
# now as data.table with frames
coveragePerTiling(grl, RFP, is.sorted = TRUE, as.data.table = TRUE,
                  withFrames = TRUE)

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