Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to compare 2 conditions #123

Closed
Sirin24 opened this issue Sep 28, 2024 · 5 comments
Closed

how to compare 2 conditions #123

Sirin24 opened this issue Sep 28, 2024 · 5 comments

Comments

@Sirin24
Copy link

Sirin24 commented Sep 28, 2024

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

@ncborcherding
Copy link
Member

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
Copy link
Author

Sirin24 commented Sep 29, 2024

@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
Copy link
Member

@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
Copy link
Author

Sirin24 commented Sep 30, 2024

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants