An interface for link[RUVSeq]{RUVs}
method
Arguments
- object
a
SummarizedExperiment
orMetaboSet
object- replicates
list of numeric vectors, indexes of replicates
- k
The number of factors of unwanted variation to be estimated from the data.
- assay.type
character, assay to be used in case of multiple assays
- name
character, name of the resultant assay in case of multiple assays
- ...
other parameters passed to
link[RUVSeq]{RUVs}
Examples
data(example_set)
# Batch correction
replicates <- list(which(example_set$QC == "QC"))
batch_corrected <- ruvs_qc(example_set, replicates = replicates)
# Evaluate batch correction
pca_bhattacharyya_dist(example_set, batch = "Batch")
#> [,1] [,2]
#> [1,] NA 11.28682
#> [2,] 11.28682 NA
pca_bhattacharyya_dist(batch_corrected, batch = "Batch")
#> Warning: Variance is below eps for 1 variables. Not scaling them.
#> [,1] [,2]
#> [1,] NA 1.516404
#> [2,] 1.516404 NA