% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/riboseq_features.R
\name{disengagementScore}
\alias{disengagementScore}
\title{Disengagement score (DS)}
\usage{
disengagementScore(grl, RFP, GtfOrTx, RFP.sorted = FALSE)
}
\arguments{
\item{grl}{a \code{\link{GRangesList}} object
with usually either leaders, cds', 3' utrs or ORFs.}

\item{RFP}{RiboSeq reads as GAlignment, GRanges
or GRangesList object}

\item{GtfOrTx}{If it is \code{\link{TxDb}} object
transcripts will be extracted using
\code{exonsBy(Gtf, by = "tx", use.names = TRUE)}.
Else it must be \code{\link{GRangesList}}}

\item{RFP.sorted}{logical (F), an optimizer, have you ran this line:
\code{RFP <- sort(RFP[countOverlaps(RFP, tx, type = "within") > 0])}
Normally not touched, for internal optimization purposes.}
}
\value{
a named vector of numeric values of scores
}
\description{
Disengagement score is defined as
\preformatted{(RPFs over ORF)/(RPFs downstream to transcript end)}
A pseudo-count of one is added to both the ORF and downstream sums.
}
\examples{
ORF <- GRanges(seqnames = "1",
               ranges = IRanges(start = c(1, 10, 20), end = c(5, 15, 25)),
               strand = "+")
grl <- GRangesList(tx1_1 = ORF)
tx <- GRangesList(tx1 = GRanges("1", IRanges(1, 50), "+"))
RFP <- GRanges("1", IRanges(c(1,10,20,30,40), width = 3), "+")
disengagementScore(grl, RFP, tx)

}
\references{
doi: 10.1242/dev.098344
}
\seealso{
Other features: \code{\link{computeFeaturesCage}},
  \code{\link{computeFeatures}}, \code{\link{distToCds}},
  \code{\link{distToTSS}}, \code{\link{entropy}},
  \code{\link{floss}}, \code{\link{fpkm_calc}},
  \code{\link{fpkm}}, \code{\link{fractionLength}},
  \code{\link{initiationScore}},
  \code{\link{insideOutsideORF}}, \code{\link{isInFrame}},
  \code{\link{isOverlapping}},
  \code{\link{kozakSequenceScore}}, \code{\link{orfScore}},
  \code{\link{rankOrder}},
  \code{\link{ribosomeReleaseScore}},
  \code{\link{ribosomeStallingScore}},
  \code{\link{startRegionCoverage}},
  \code{\link{startRegion}}, \code{\link{subsetCoverage}},
  \code{\link{translationalEff}}
}
\concept{features}
