jackbibby1 / SCPA

R package for pathway analysis in scRNA-seq data
https://jackbibby1.github.io/SCPA/
GNU General Public License v3.0
62 stars 6 forks source link

SCPA comparsion (seurat object) #55

Closed BartBryant closed 1 year ago

BartBryant commented 1 year ago

Hi

Goal is to compare pathways in cell types in a Seurat object following https://jackbibby1.github.io/SCPA/articles/seurat_comparison.html

The seurat object contains two samples integrated via FindIntgrationsAnchor()

up to the 'SCPA comparison' section, i get an error message (screenshot below) thx in advance

Screenshot 2023-08-04 at 3 30 44 PM
BartBryant commented 1 year ago

sorry actually figured it out by assessing my Seurat Object and finding the correct column name, which in this instance is called 'celltype.Lmod1'

Screenshot 2023-08-04 at 3 48 24 PM
BartBryant commented 1 year ago

also viewed my 'scpa_out' but unsure on ranking in this example is 'HALLMARK_MYOGENESIS' higher in 'SMC_CTRL' or 'SMCs_mut'?

Screenshot 2023-08-04 at 3 50 25 PM
jackbibby1 commented 1 year ago

Hi,

If you look at ?compare_seurat there's a longer explanation under the value header, but the fold change (FC) column is calculated from population1 - population2. So that's CTRL-mut in your example i.e. higher in your CTRL condition.

Jack

BartBryant commented 1 year ago

so i assume you can do the inverse by switching the order? for example, to find out highest pathways in mutant, I would list it 'mut-CTRL' over 'CTRL-mut'?

also, can we determine which genes give rise to that type of pathway enrichment score?

Bart

jackbibby1 commented 1 year ago

Maybe I'm missing the question, but SCPA calculates the fold changes in both directions anyway. Your FC column contains both positive and negative values, so the negative values are the pathways enriched in your "mut" condition.

There's a bit of a discussion here around why it's quite difficult to identify particular genes driving the signature in SCPA and I would still recommend doing the same thing that I mentioned

BartBryant commented 1 year ago

thanks for the clarification on FC and info on why it is difficult to identify genes driving the signature in SCPA