qsmoothGC: qsmoothGC

View source: R/qsmoothGC.R

qsmoothGCR Documentation

qsmoothGC

Description

This function applies smoothed quantile normalization separately for groups of features that are binned according to their GC-content.

Usage

qsmoothGC(object, group_factor, gc, nGroups = 50, round = TRUE, ...)

Arguments

object

an object which is a matrix or data.frame with observations (e.g. probes or genes) on the rows and samples as the columns. Alternatively, a user can provide a SummarizedExperiment object and the assay(object, "counts") will be used as input for the qsmooth normalization.

group_factor

a group level continuous or categorial covariate associated with each sample or column in the object. The order of the group_factor must match the order of the columns in object.

gc

GC-content of the features, ordered according to the features in object.

nGroups

The number of equally-sized bins used to group the GC-content values. Groups are created using Hmisc::cut2.

round

Should normalized values be rounded to integers?

...

(Optional) Additional arguments passed to qsmooth.

Value

A matrix of normalized counts.

References

Van den Berge K., Chou H., Roux de BĂ©zieux H., Street K., Risso D., Ngai J., Dudoit S. Normalization benchmark of ATAC-seq datasets shows the importance of accounting for GC-content effects. https://www.biorxiv.org/content/10.1101/2021.01.26.428252v2

Examples

dat <- cbind(matrix(rnorm(1000), nrow=100, ncol=10), 
             matrix(rnorm(1000, .1, .7), nrow=100, ncol=10))
gc <- runif(n=100, min=0.2, max=0.9)
dat_qs <- qsmoothGC(object = dat, 
                   gc = gc,
                   group_factor = rep(c(0,1), each=10))


stephaniehicks/qsmooth documentation built on Nov. 7, 2022, 1:41 p.m.