estNormFactors {DSS} | R Documentation

## Estimate normalization factors

### Description

This function estimates normalization factors for the input 'seqCountSet' object and return the same object with normalizationFactor field filled or replaced.

### Usage

    ## S4 method for signature 'SeqCountSet'
    estNormFactors(seqData, method=c("lr", "quantile", "total", "median"))

### Arguments

`seqData` | An object of "SeqCountSet" class.
`method` | Methods to be used in computing normalization factors. Currently available options only include methods to compute normalization factor to adjust for sequencing depths. Available options use (1) "lr": using median of logratio of counts. Similar to the TMM method. (2) "quantile" (default): 75th quantile, (3) "total": total counts, or (4) "median": median counts to constuct the normalization factors. From all methods the normalization factor will be a vector with same length as number of columns for input counts.

### Value

The same "SeqCountSet" object with normalizationFactor field filled or replaced.

### Author(s)

Hao Wu <hao.wu@emory.edu>

### Examples

    data(seqData)
    ## compare different methods
    seqData=estNormFactors(seqData, "lr")
    k1=normalizationFactor(seqData)
    seqData=estNormFactors(seqData, "quantile")
    k2=normalizationFactor(seqData)
    seqData=estNormFactors(seqData, "total")
    k3=normalizationFactor(seqData)
    cor(cbind(k1,k2,k3))

    ## assign size factor
    normalizationFactor(seqData)=k1

    ## or normalization factor can be a matrix
    dd=exprs(seqData)
    f=matrix(runif(length(dd), 1,10), nrow=nrow(dd), ncol=ncol(dd))
    normalizationFactor(seqData)=f
    head(normalizationFactor(seqData))

[Package DSS version 2.36.0 Index]