Overwrite all library-factor values in a qseaSet (and its sampleTable) with 1. Useful when you want to avoid library scaling (e.g., TMM) and keep beta unchanged; NRPM may change depending on downstream use.

removeLibraryFactors(qseaSet)

Arguments

qseaSet

qseaSet. A qseaSet object containing methylation-enriched sequencing data. Default: none (must be supplied).

Value

A qseaSet with all library factors set to 1 and sampleTable updated.

Details

Setting library factors to 1 has no effect on beta (fractional measure) but can affect NRPM since scaling factors are neutralised. This is akin to calling qsea::addLibraryFactors(qseaSet, factors = 1) and synchronising the sampleTable.

Examples

data(exampleTumourNormal, package = "mesa")

# Show current factors then reset to 1 and show again
exampleTumourNormal %>%
  addLibraryInformation() %>%
  pull(library_factor) %>%
  head()
#> [1] 1.0160834 0.9149047 0.9700701 0.9537051 1.0365441 1.0701382