% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/riboseq_features.R
\name{fpkm}
\alias{fpkm}
\title{Create normalizations of overlapping read counts.}
\usage{
fpkm(grl, reads, pseudoCount = 0)
}
\arguments{
\item{grl}{a \code{\link{GRangesList}} object
can be either transcripts, 5' utrs, cds', 3' utrs or
ORFs as a special case (uORFs, potential new cds' etc). If
regions are not spliced you can send a \code{\link{GRanges}} object.}

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

\item{pseudoCount}{an integer, by default is 0, set it to 1 if you want to
avoid NA and inf values.}
}
\value{
a numeric vector with the fpkm values
}
\description{
FPKM is short for "Fragments Per Kilobase of transcript per Million
fragments in library". When calculating RiboSeq data FPKM over ORFs,
use ORFs as `grl`.
When calculating RNASeq data FPKM, use full transcripts as
`grl`. It is equal to RPKM given that you do not have paired end reads.
}
\details{
Note also that you must consider if you will use the whole read
library or just the reads overlapping `grl`.
To only overlap do:
reads <- reads[countOverlaps(reads, grl) > 0]
}
\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),"+")
fpkm(grl, RFP)

}
\references{
doi: 10.1038/nbt.1621
}
\seealso{
Other features: \code{\link{computeFeaturesCage}},
  \code{\link{computeFeatures}},
  \code{\link{disengagementScore}},
  \code{\link{distToCds}}, \code{\link{distToTSS}},
  \code{\link{entropy}}, \code{\link{floss}},
  \code{\link{fpkm_calc}}, \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}
