# Performing PCA for the samples and for the genes

I have 10 samples from a RNAseq experiment (5 control, 5 disease), I have performed a cluster analysis for the samples and for the genes (4000 genes aprox) to see how they cluster (to see which samples are similar and which genes have similar expressions). I was wondering if in terms of statistics it makes any sense to perform a PCA of the samples instead of the genes?

• I think doing PCA on RNAseq samples is something people do - you can probably just use the prcomp function in R. However, I'm not sure how much information you can get in a PCA with just 10 samples. Oct 15 '20 at 12:26
• People usually do PCA on RNAseq samples, but they use genes as variables. But I want to do it using samples as variables, and I am not sure if that makes sense in terms of statistics.
– Mee
Oct 15 '20 at 12:35
• Why do you specifically want to do a PCA using samples? Can you do it on genes and plot the loading of samples? Since you have thousands of genes and only 10 samples, it doesn't seem you can do it on samples. Oct 15 '20 at 12:48

If you use, say, R's prcomp, you can use my_pca_object$x to get PC coordinates for the samples, and my_pca_object$rotation to get how much each gene contributes to each PCA. (You might need to transpose your transformed count file to get it to work right)