TPM: TPM

Description Usage Arguments Details Value See Also Examples

Description

Tags Per Million

Usage

1
TPM(clusters, margin = 2)

Arguments

clusters

A data frame of tag counts, where each row is a cluster and each column is a library.

margin

1 for rows and 2 for columns (default)

Details

Takes a data frame of tag counts and return a data frame of tags per million.

Ensures that the column names of the returned data frame are identical to the input.

Value

Returns a data frame expression values normalised in tags per million, where each row is a cluster and each column is a library.

TPM uses prop.table() internally.

See Also

prop.table

Examples

1
2
3
4
5
TPM(data.frame(A=c(1,0,3), b=c(2,5,9)))
TPM(data.frame(A=c(1,0,3), b=c(2,5,9)), margin = 1)

# Should warn about NaN
# TPM(data.frame(A=c(1,0,3), b=c(2,5,9), c=c(0,0,0)))

charles-plessy/smallCAGEqc documentation built on May 13, 2019, 3:31 p.m.