rsqCalc: Calculate R-squared for each gene fit

Description Usage Arguments Value Examples

View source: R/rsqCalc.R

Description

Takes a Log2CPM numeric matrix and MArrayLM fit object from limma::lmFit and calculates R-squared for each gene fit.

Usage

1
rsqCalc(normMatrix, fit)

Arguments

normMatrix

A normalized log2cpm matrix.

fit

A MArrayLM object from limma::lmFit.

Value

A vector of R-squared values for each gene fit.

Examples

1
2
3
4
   dgeObj    <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
   log2cpm   <- convertCounts(dgeObj$counts, unit = "cpm", log=TRUE, normalize = "tmm")
   fitObject <- dgeObj$ReplicateGroupDesign_fit
   rsq       <- rsqCalc (log2cpm, fitObject)

DGEobj.utils documentation built on April 28, 2021, 9:06 a.m.