This function will perform a principal component analysis, and it returns a ggplot object of the PCA plot.
plot_PCA(sgcount, df_design)
The input matrix contains read counts of sgRNAs for each sample.
The table contains a study design.
A ggplot2 object contains a PCA plot for the input.
library(CB2) data(Evers_CRISPRn_RT112) plot_PCA(Evers_CRISPRn_RT112$count, Evers_CRISPRn_RT112$design)