Add size factors to normalize count data by library size or by biomass
Source:R/01_data_processing.R
add_size_factors.Rd
Add size factors to normalize count data by library size or by biomass
Arguments
- se
A
SummarizedExperiment
object with a count matrix and sample metadata.- spikein
Logical indicating whether or not to normalize data using spike-ins. If FALSE, data will be normalized by library size. Default: FALSE.
- spikein_pattern
Character with the pattern (regex) to use to identify spike-in features in the count matrix. Only valid if
spikein_norm = TRUE
.
Value
A SummarizedExperiment
object as in se, but with an extra
column in the colData slot named "sizeFactor". This column contains size
factors that will be used by DESeq2 when performing differential expression
analyses.
Examples
data(se_chlamy)
se_norm <- add_size_factors(se_chlamy)