View source: R/02_batch_correct.R
correct_data | R Documentation |
Compute the batch correction on the data using the ComBat algorithm. Define a covariate, either as a character vector or name of tibble column. The covariate should preferable be the cell condition types but can be any column that infers heterogeneity in the data. The function assumes that the batch information is in the "batch" column and the data contains a "sample" column with sample information.
correct_data( df, label, covar = NULL, anchor = NULL, markers = NULL, parametric = TRUE )
df |
tibble with expression values |
label |
The cluster or cell type label. Either as a column name or vector. |
covar |
The covariate ComBat should use. Can be a vector or a column name in the input tibble. If NULL, no covar will be used |
anchor |
Experimental: A column or vector specifying which samples are replicates and which are not. If specified, this column will be used as a covariate in ComBat. Be aware that it may be confounded with the condition. |
markers |
Markers to normalize. If NULL, markers will be found using the |
parametric |
Default: TRUE. If TRUE, the parametric version of ComBat is used. If FALSE, the non-parametric version is used. |
Other batch:
batch_correct()
,
create_som()
,
normalize()
,
quantile_norm()
## Not run: corrected <- uncorrected %>% correct_data(label = labels, covar = "condition") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.