| FracFixR | R Documentation |
This is the core function that implements the FracFixR framework. It takes raw count data from total and fractionated samples and reconstructs the original fraction proportions through compositional modeling.
FracFixR(MatrixCounts, Annotation, st1 = 0.6, st2 = 0.999, parallel = TRUE)
MatrixCounts |
A numeric matrix of raw transcript/gene counts with:
|
Annotation |
A data.frame with required columns:
|
parallel |
A boolean indicating whether to use parallel processing of the transcripts (default=TRUE). |
st1 |
Lower quantile threshold (between 0 and 1) for selecting informative transcripts for the NNLS regression fit (default = 0.6). Transcripts below this quantile of Total abundance are considered too noisy for reliable regression. |
st2 |
Upper quantile threshold (between 0 and 1) for selecting informative transcripts for the NNLS regression fit (default = 0.999). Transcripts above this quantile are potential outliers and are excluded from the regression. |
The function works by:
Filtering transcripts based on presence in Total samples
For each condition and replicate, fitting NNLS regression
Estimating global fraction weights and individual transcript proportions
Calculating the "lost" unrecoverable fraction
A list containing:
OriginalData: filtered input count matrix
Annotation: input annotation data
Propestimates: matrix of proportion estimates (values between 0 and 1)
NewData: corrected count matrix (proportions multiplied by predicted total, rounded)
Coefficients: data.frame of regression coefficients
Fractions: data.frame of estimated fraction proportions
plots: list of diagnostic plots
Cleynen et al. FracFixR: A compositional statistical framework for absolute proportion estimation between fractions in RNA sequencing data.
# Load example data
data(example_counts)
data(example_annotation)
# Run FracFixR
results <- FracFixR(example_counts, example_annotation, parallel=FALSE)
# View fraction proportions
print(results$Fractions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.