calculateFPKM: Calculate FPKMs

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/calculateFPKM.R

Description

Calculate fragments per kilobase of exon per million reads mapped (FPKM) values from the feature-level counts.

Usage

1
calculateFPKM(x, lengths, ..., subset.row = NULL, subset_row = NULL)

Arguments

x

A numeric matrix of counts where features are rows and cells are columns.

Alternatively, a SummarizedExperiment or a SingleCellExperiment containing such counts.

lengths

Numeric vector providing the effective length for each feature in x.

...

Further arguments to pass to calculateCPM.

subset.row

A vector specifying the subset of rows of x for which to return a result.

subset_row

Soft-deprecated equivalent to the argument above.

Details

FPKMs are computed by dividing the CPMs by the effective length of each gene in kilobases. For RNA-seq datasets, the effective length is best set to the sum of lengths of all exons; for nucleus sequencing datasets, the effective length may instead be the entire width of the gene body.

Value

A numeric matrix of FPKM values with the same dimensions as x (unless subset.row is specified).

Author(s)

Aaron Lun, based on code by Davis McCarthy

See Also

calculateCPM, for the initial calculation of CPM values.

Examples

1
2
3
4
example_sce <- mockSCE()
eff_len <- runif(nrow(example_sce), 500, 2000)
fout <- calculateFPKM(example_sce, eff_len)
str(fout)

scuttle documentation built on Dec. 19, 2020, 2 a.m.