fpkm_to_counts {polyester} | R Documentation

## Turn FPKMs from a ballgown object into estimated counts for transcripts

### Description

Turn FPKMs from a ballgown object into estimated counts for transcripts

### Usage

    fpkm_to_counts(bg = NULL, mat = NULL, tlengths = NULL, mean_rps = 1e+08,
      threshold = 0)

### Arguments

`bg` | ballgown object created from real RNA-seq dataset
`mat` | matrix of isoform-level FPKMs from which to derive counts. Rows should represent transcripts and columns should represent counts. Provide exactly one of `bg` or `mat`.
`tlengths` | if using `mat` instead of `bg`, vector of transcript lengths. Entries correspond to the rows of `mat`. Lengths should only count the nucleotides within transcripts' exons.
`mean_rps` | This should be the number of reads per sample in total for use in backing out the FPKM calculations.
`threshold` | only estimate parameters from transcripts with mean FPKM measurements at least as large as `threshold`.

### Details

If transcripts/exons are represented by `GRanges` or `GRangesList` objects, the `width` function is really useful in calculating transcript lengths.

### Value

A matrix of counts with the same number of rows and columns as the ballgown object

### Author(s)

Jeff Leek

### Examples

      library(ballgown)
      data(bg)
      countmat = fpkm_to_counts(bg, mean_rps=400000)

[Package polyester version 1.26.0 Index]