% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{optimizeReads}
\alias{optimizeReads}
\title{Find optimized subset of valid reads}
\usage{
optimizeReads(grl, reads)
}
\arguments{
\item{grl}{a GRangesList or GRanges object}

\item{reads}{a GRanges or GAlignment object}
}
\value{
the reads as GRanges or GAlignment
}
\description{
If more than a million reads, keep only the ones that overlap within the
grl ranges.
}
\seealso{
Other utils: \code{\link{bedToGR}},
  \code{\link{convertToOneBasedRanges}},
  \code{\link{findFa}}, \code{\link{fread.bed}},
  \code{\link{readBam}}, \code{\link{readWig}}
}
\concept{utils}
