
Plot PCA Score by Batch
plot_batch_pca.RdDraw a PCA score plot for samples and color points by batch. PCA is computed on log2-transformed intensities after removing variables with missing values.
Arguments
- exp
A
glyexp::GlycomicSE(),glyexp::GlycoproteomicSE(), orSummarizedExperiment::SummarizedExperiment()object.- batch_col
Column name in
sample_info, or a factor/vector with length equal to the number of samples.
Examples
library(SummarizedExperiment)
exp <- glyexp::real_experiment
batch <- rep(c("A", "B"), length.out = ncol(exp))
colData(exp)$batch <- batch
plot_batch_pca(exp, batch_col = "batch")