Get startedGet started for free

Visualize batch effects

In the olfactory stem cell experiment, there were 7 treatments with 4 replicates each for a total of 28 samples. However, these 28 samples were processed in 4 separate batches. The effect of the treatments is of biological interest, but the effect of the batches is technical noise. Using dimension reduction, determine which of these two effects had a larger impact on the gene expression data.

This exercise is part of the course

Differential Expression Analysis with limma in R

View Course

Exercise instructions

The ExpressionSet object eset with the olfactory stem cell data has been loaded in your workspace.

  • Use plotMDS to plot the principal components. Label the samples by the treatment they received, and set gene.selection to "common".

  • Re-visualize the principal components, labeling the samples by their batch.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Load package
library(limma)

# Plot principal components labeled by treatment
___(eset, labels = pData(eset)[, "___"], gene.selection = "___")

# Plot principal components labeled by batch
___(eset, labels = pData(eset)[, "___"], gene.selection = "___")
Edit and Run Code