The function uses the package HarmonizR
to correct batch effects in a combined table of multiple experiments.
harmonize.batches(DEprot.object, batch.column = "batch", cores = 1)
A DEprot object
, as generated by load.counts. Notice that this function works only with "normalized".
String indicating the name of a column from the metadata table in which are stored the replicate IDs. This column is used only if paired.test = TRUE
. Default: NULL
.
Numeric value indicating the number of cores to use for the batch correction. Default: 1
.
An object of class DEprot
# Add batch column to the DEprot object
dpo = DEprot::test.toolbox$dpo.raw
dpo@metadata$batch = c(rep("A",6), rep("B",6))
# Correct batch effects
dpo <- harmonize.batches(DEprot.object = dpo,
batch.column = "batch",
cores = 1)
#> Initializing HarmonizR...
#> Reading the files...
#> Preparing...
#> Splitting the data using ComBat adjustment...
#> Found2batches
#> Adjusting for0covariate(s) or covariate level(s)
#> Found32Missing Data Values
#> Standardizing Data across genes
#> Fitting L/S model and finding priors
#> Finding parametric adjustments
#> Adjusting the Data
#> Rebuilding...
#> Termination.