cntsToTPM: Compute TPMs from counts and effective lengths

View source: R/utility_functions.R

cntsToTPMR Documentation

Compute TPMs from counts and effective lengths

Description

cntsToTPM computes TPMs from counts and lengths. Rownames need

Usage

cntsToTPM(cnts, nsamp, len = NULL, samps = NULL)

Arguments

cnts

is a dataframe of counts that has thecolum nnames Sample1Cnt, Sample2Cnt, ... and a column for tx_id. Needs to also contain the (effective) length information Sample1Len, Sample2Len, ... unless the argument len is also specified

nsamp

is the number of samples/biological replicates

len

is an optional dataframe of length information. len has (nsamp+1) columns with columnnames Sample1Len, Sample2Len, ... anda column for tx_id. Not needed if length information is contained in cnts.

samps

is an optional vector containing the sample names. Need to specify this if sample names are not just paste0("Sample", 1:nsamp) without any missing.

Value

data.frame of TPM information, with column names Sample1TPM, Sample2TPM, etc.


skvanburen/CompDTUReg documentation built on Jan. 23, 2025, 9:01 a.m.