degCheckFactors {DEGreport} | R Documentation

## Distribution of gene ratios used to calculate Size Factors.

### Description

This function check the median ratio normalization used by DESeq2 and similarly by edgeR to visualy check whether the median is the best size factor to represent depth.

### Usage

    degCheckFactors(counts, each = FALSE)

### Arguments

`counts` | Matrix with counts for each samples and each gene. row number should be the same length than pvalues vector.
`each` | Plot each sample separately.

### Details

This function will plot the gene ratios for each sample. To calculate the ratios, it follows the simliar logic than DESeq2/edgeR uses, where the expression of each gene is divided by the mean expression of that gene. The distribution of the ratios should approximate to a normal shape and the factors should be similar to the median of distributions. If some samples show different distribution, the factor may be bias due to some biological or technical factor.

### Value

ggplot2 object

### References

- Code to calculate size factors comes from `DESeq2::estimateSizeFactorsForMatrix()`.

### Examples

    data(humanGender)
    library(SummarizedExperiment)
    degCheckFactors(assays(humanGender)[[1]][, 1:10])

[Package DEGreport version 1.26.0 Index]