% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/riboseq_features.R
\name{floss}
\alias{floss}
\title{Fragment Length Organization Similarity Score}
\usage{
floss(grl, RFP, cds, start = 26, end = 34)
}
\arguments{
\item{grl}{a \code{\link{GRangesList}} object with ORFs}

\item{RFP}{ribosomal footprints, given as Galignment or GRanges object,
must be already shifted and resized to the p-site}

\item{cds}{a \code{\link{GRangesList}} of coding sequences,
cds has to have names as grl so that they can be matched}

\item{start}{usually 26, the start of the floss interval}

\item{end}{usually 34, the end of the floss interval}
}
\value{
a vector of FLOSS of length same as grl
}
\description{
This feature is usually calcualted only for RiboSeq reads. For reads of
width between `start` and `end`,
sum the fraction of RiboSeq reads (per widths)
that overlap ORFs and normalize by CDS.
}
\details{
Pseudo explanation of the function:
\preformatted{
SUM[start to stop]((grl[start:end][name]/grl) / (cds[start:end][name]/cds))
}
Please read more in the article.
}
\examples{
ORF <- GRanges(seqnames = "1",
               ranges = IRanges(start = c(1, 12, 22),
               end = c(10, 20, 32)),
               strand = "+")
grl <- GRangesList(tx1_1 = ORF)
# RFP is 1 width position based GRanges
RFP <- GRanges("1", IRanges(c(1, 25, 35, 38), width = 1), "+")
score(RFP) <- c(28, 28, 28, 29) # original width in score col
cds <-  GRangesList(tx1 = GRanges("1", IRanges(35, 44), "+"))
# grl must have same names as cds + _1 etc, so that they can be matched.
floss(grl, RFP, cds)
# or change ribosome start/stop, more strict
floss(grl, RFP, cds, 28, 28)

}
\references{
doi: 10.1016/j.celrep.2014.07.045
}
\seealso{
Other features: \code{\link{computeFeaturesCage}},
  \code{\link{computeFeatures}},
  \code{\link{disengagementScore}},
  \code{\link{distToCds}}, \code{\link{distToTSS}},
  \code{\link{entropy}}, \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}
