ProcessReplicate: ProcessReplicate: Core NNLS Regression for Individual...

View source: R/fracfixr.r

ProcessReplicateR Documentation

ProcessReplicate: Core NNLS Regression for Individual Replicates

Description

This function implements the mathematical core of FracFixR: fitting a non-negative least squares (NNLS) regression to estimate fraction weights and correct individual transcript abundances.

Usage

ProcessReplicate(RepMat, transcriptlist)

Arguments

RepMat

Data frame with transcripts as rows, samples as columns. Must include a "Total" column representing the whole cell lysate

transcriptlist

Character vector of transcript IDs to use for regression. These should be informative transcripts in the appropriate abundance range

Details

Mathematical basis:

Total = \alpha_0 + \alpha_1 \times Fraction1 + \alpha_2 \times Fraction2 + ... + \epsilon

Where \alpha_0 represents the "lost" fraction and other \alpha_i are fraction weights

Value

List containing:

  • Propestimates: Proportion estimates for each transcript (values 0-1 for fraction columns)

  • NewData: Corrected count matrix (proportions multiplied by predicted total, rounded)

  • Coefficients: NNLS regression coefficients (fraction weights)

  • Fractions: Normalized fraction proportions

  • plot: Diagnostic plot of fitted vs residuals


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