get_corrected_counts: get_corrected_counts: Retrieve the Corrected Count Matrix

View source: R/fracfixr.r

get_corrected_countsR Documentation

get_corrected_counts: Retrieve the Corrected Count Matrix

Description

Returns the corrected count matrix embedded in a FracFixR() result object. This matrix is computed internally by multiplying each transcript's proportion estimate by the predicted total abundance for that replicate, providing counts that are corrected for compositional bias while remaining on the original count scale.

If you need to re-scale using the raw (observed) Total counts instead of the NNLS-predicted totals, multiply fracfixr_results$Propestimates by the corresponding column of fracfixr_results$OriginalData manually.

Usage

get_corrected_counts(fracfixr_results)

Arguments

fracfixr_results

Output list from FracFixR, which must contain the element NewData (present in results from version >= 1.1.0).

Value

A numeric matrix with the same dimensions as fracfixr_results$Propestimates. Non-Total columns contain corrected counts (rounded integers, proportion estimate multiplied by the NNLS-predicted total abundance). The Total column contains the NNLS-predicted total abundance itself.

Examples

data(example_counts)
data(example_annotation)

results <- FracFixR(example_counts, example_annotation, parallel = FALSE)
corrected <- get_corrected_counts(results)
head(corrected)


FracFixR documentation built on May 11, 2026, 9:09 a.m.