Performs a principal component analysis of a normalized expression/abundance matrix and plot the samples in the bidimensional space formed by the two first principal components. Samples are colored according to the variable of interest in the sample information data frame.
pcaPlot(mat, sampInfo, groupCol)
mat | The input matrix containing normalized data or counts |
---|---|
sampInfo | The sample information data frame |
groupCol | The column name of the grouping variable |
A ggplot2 object containing the resulting plot