This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to perform FPKM on raw reads in R

How I perform fpkm on a file containing the raw reads of two samples and each sample have three replicates? I want to do the analysis in R.

rna-seq fpkm r sequencing

2 answers

Try countToFPKM package. This package provides an easy to use function to convert the read count matrix into FPKM values normalised by library size and feature effective length. It also provides the user with a reliable function to generate FPKM heatmap plot of the highly variable features in RNA-Seq dataset.; following the equation:

enter image description here.

The fpkm() function requires three inputs to return FPKM as numeric matrix normalized by library size and feature length:

  • counts A numeric matrix of raw feature counts.
  • featureLength A numeric vector with feature lengths that can be obtained using biomaRt.
  • meanFragmentLength A numeric vector with mean fragment lengths, which can be calculate with
    Picard using CollectInsertSizeMetrics.

Also see https://github.com/AAlhendi1707/countToFPKM

Could the countToFPKM package work for single end RNA seq data too? Thanks.

See the blog post "What the FPKM" by Harold Pimentel that also provides R code:

https://haroldpimentel.wordpress.com/2014/05/08/what-the-fpkm-a-review-rna-seq-expression-units/

Log in to answer this question.