makeCountsFromAbundance: Low-level function to make counts from abundance using...

View source: R/helper.R

makeCountsFromAbundanceR Documentation

Low-level function to make counts from abundance using matrices

Description

Simple low-level function used within tximport to generate scaledTPM or lengthScaledTPM counts, taking as input the original counts, abundance and length matrices. NOTE: This is a low-level function exported in case it is needed for some reason, but the recommended way to generate counts-from-abundance is using tximport with the countsFromAbundance argument.

Usage

makeCountsFromAbundance(
  countsMat,
  abundanceMat,
  lengthMat,
  countsFromAbundance = c("scaledTPM", "lengthScaledTPM")
)

Arguments

countsMat

a matrix of original counts

abundanceMat

a matrix of abundances (typically TPM)

lengthMat

a matrix of effective lengths

countsFromAbundance

the desired type of count-from-abundance output

Value

a matrix of count-scale data generated from abundances. for details on the calculation see tximport.


mikelove/tximport documentation built on March 28, 2024, 5:05 p.m.