I'm analyzing RNASeq data, and plotted this PCA, of PC3 and PC4.
Initially, I thought the samples were too mixed and didn't cluster. But after finishing the differential expression analysis of Blue samples vs Orange samples, I did end up with a few significant genes (51 for a padj<0.05, lfc threshold of 0). It's not many genes, compared to analysing another variable (which shows clustering along PC1), but it's some.
I was wondering if the clustering along PC4 (blue is slightly upwards, orange slightly downwards) is indeed because PC4 is explaining this variance.
What do you think? Am I looking too much into it? Is it wrong to go back to the PCA, and should I just stick to my 51 significant genes?
1 answer
The separation that you observe along PC4 between the blue and orange samples is minimal and does not indicate strong clustering. Principal component analysis captures variance in decreasing order, so PC4 explains only a small portion of the total variance in your RNA sequencing data. The fact that you identified 51 differentially expressed genes with an adjusted p-value below 0.05 and no log fold change threshold suggests a real but subtle biological difference between the groups. However, this does not necessarily mean that PC4 specifically represents that difference; lower principal components often capture noise or minor technical artifacts rather than meaningful biological signals.
You are not wrong to revisit the principal component analysis after differential expression analysis. It is a standard practice to cross-validate findings across methods, such as checking if differentially expressed genes contribute heavily to the loadings on PC4. To investigate this, you can extract the gene loadings for PC4 using the following R code (assuming you used prcomp for the principal component analysis):
# Assuming 'pca' is your prcomp object and 'genes' is a vector of gene names
loadings_pc4 <- pca$rotation[, "PC4"]
top_genes_pc4 <- sort(abs(loadings_pc4), decreasing = TRUE)[1:100] # Top 100 contributing genes
overlap <- intersect(names(top_genes_pc4), your_de_genes) # Compare with your 51 DE genes
If there is substantial overlap between your differentially expressed genes and the top contributors to PC4, then PC4 may partially reflect the group difference. Otherwise, the separation could be coincidental.
That said, with only slight visual separation and no clear clustering, you may be overinterpreting the plot. Focus on the 51 significant genes for your conclusions, as they provide direct evidence of differential expression. The stronger clustering along PC1 for your other variable supports that your data preprocessing is adequate, and the lack of clustering by color in higher components is consistent with a weaker effect.
Kevin
Log in to answer this question.
There is no clustering in this plot to my eye.
Why are you not plotting the components that capture more variance, specifically PC1 and PC2?
I did plot them, they cluster according to the shape, along PC1. I was just trying to see if they clustered along any PC according to the color.
I have no idea what PC2 is though.
Relative contributions of each gene that entered the analysis are calculated for each PC, you just have to go through them.
I suggest that you have to preprocess your data again. Because the samples are not clustered properly in your PCA plot.
How do you figure that? The OP stated they are clustered by shape, and that is true.
The green squares are not clustered properly in the plot