I have two samples A and B and I do have an RNAseq for both of them. Inside each file (for A and B) I do have a set of FPKMs that give me a fold change for each gene (sample vs control). It looks somewhat like that:

gen_name grp01 grp02 grp03 grp04 fold_change
gene1    10    10    5     5     2
gene2    11    11    11    11    1
gene3    5     5     10    10    0.5
gene4    ... 

for sample A and, say

gen_name grp05 grp06 grp07 grp08 fold_change
gene1    100   100   5     5     20
gene2    110   110   110   110   1
gene3    5     5     100   100   0.05
gene4    ... 

for sample B

I need to show with PCA that, foe example, gene1 is sample B is much more overexpressed than in sample A, same for gene3, but it looks like gene2 is not very interesting.

What data must be put in PCA analysis?

  • 2
    $\begingroup$ Using a package is the best approach. Scanpy is popular right now. I do this stuff via first principles, so my advice isn't cool here. Anyway, I'd combine all data into one dataframe, minus log-fold change. I assume log fold change is the opposing sample? The data must have a column to identify A genes from B genes, or denoted within the gene name. PCA does not give gene by gene comparisons, it will be cluster by cluster. Interpreting each clusters is done independently (by mapping the log-fold-change), i.e. what is clustering together and that cluster represents a cohesive expression group. $\endgroup$
    – M__
    Commented Mar 10, 2023 at 1:36
  • $\begingroup$ The alternative is DEG analysis, gene by gene - which you've already done. $\endgroup$
    – M__
    Commented Mar 10, 2023 at 1:50
  • $\begingroup$ Thank you. I want to show that A is different from B based on an expression of gene1 and gene3 (in this test experiment). I want to do this in R but scanpy is a python package. Is there any way to use prcomp() ? $\endgroup$
    – Lara
    Commented Mar 10, 2023 at 3:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.