ncborcherding / escape

Easy single cell analysis platform for enrichment
https://www.borch.dev/uploads/screpertoire/articles/running_escape
MIT License
143 stars 20 forks source link

how to compare 2 conditions #123

Closed Sirin24 closed 1 week ago

Sirin24 commented 1 week ago

To do gene set enrichment, do I need to do run the code separately for the diseased and the healthy cells?

ncborcherding commented 1 week ago

You can do the enrichment calculation on all the cells with runEscape() or escape.matrix() and compare the results by any group you'd like.

Nick

Sirin24 commented 1 week ago

@ncborcherding

I see thank you. I want to also ask about the Differential Enrichment step. For this step if I have two conditions is it possible to use findmarkers and not findallmarkers between each pair of diseased celltype and healthy celltype?

The step I am asking about is below: Differential enrichment analysis can be performed similar to differential gene expression analysis. For the purposes of finding the differential enrichment values, we can first normalize the enrichment values for the ssGSEA calculations. Here we are using the scale.factor parameter of nFeature_RNA, which is the total feature space for each cell.

scRep_example <- performNormalization(scRep_example, assay = "escape.ssGSEA", gene.sets = GS.hallmark, scale.factor = scRep_example$nFeature_RNA)

all.markers <- FindAllMarkers(scRep_example, assay = "escape.ssGSEA_normalized", min.pct = 0, logfc.threshold = 0)

ncborcherding commented 1 week ago

@Sirin24

Yes absolutely you can use FindMarkers() - make sure to use a nonparametric method for calculating statistics and you should be good to go.

Nick

Sirin24 commented 1 week ago

@ncborcherding I see thank you. Does that mean that MAST in Seurat findmarkers will not be suitable?

I want to also ask about the heatmap enrichment plot. Excuse me for my beginner question but for the Hallmark apical surface pathway it seems that it had a very low enrichment score in cluster 11 then after scaling, it has a bright yellow color indicating high enrichment scores compared to all other clusters? Does this mean opposite result after scaling? Same goes for Hallmark allograft rejection it had a high score and not anymore after scaling.

Which method to use when having 2 conditions to compare between the celltypes visually?

ncborcherding commented 1 week ago

I think MAST should be fine - their group actually looks at differential enrichment in their paper.

I want to also ask about the heatmap enrichment plot. Excuse me for my beginner question but for the Hallmark apical surface pathway it seems that it had a very low enrichment score in cluster 11 then after scaling, it has a bright yellow color indicating high enrichment scores compared to all other clusters? Does this mean opposite result after scaling? Same goes for Hallmark allograft rejection it had a high score and not anymore after scaling.

The normalization is using the number of features expressed per cell as a denominator for the enrichment score. A high enrichment score may be a product of a higher average rank of the gene from the gene set in the cell or a higher number of genes within the gene set expressed by the cell (or a combination of both). After scaling, lower enrichment is seen in cells with a high number of features expressed.

Which method to use when having 2 conditions to compare between the celltypes visually?

This is a really open ended question - happy to go into more detial if you give me more of a description of what you want.

Thanks, Nick