NathanSkene / EWCE

Expression Weighted Celltype Enrichment. See the package website for up-to-date instructions on usage.
https://nathanskene.github.io/EWCE/index.html
53 stars 25 forks source link

Run Cell-type Enrichment Tests on Two Annotation Levels #65

Closed h1hui closed 2 years ago

h1hui commented 2 years ago

Hello,

I know I can input many annotation levels with the ctd, but can you run bootstrap_enrichment_test on two annotation levels at the same time? Because we have three patient types, and different cell types, we want to be able to compare all of them together. Is there any way that you can do that?

Thanks, Ashley

bschilder commented 2 years ago

If you want to test both cell-type levels, just run bootstrap_enrichment_test twice (once per level). You can always rbind the results tables later.

Please do make use of the templates when you open a new issue, this will help us to help you faster. Thanks!

h1hui commented 2 years ago

But I would like to be able to compare both levels at the same time. Does using rbind make the results comparable afterwards (like p values, fold_change, and sd_from_mean)?

bschilder commented 2 years ago

rbindis just a base function in R that stacks two data.frames on top of each other.

Yes, I believe that results should be comparable across runs. Only other thing i'd recommend is recomputing your FDR column (False Discovery Rate) to account for the two rounds of testing you did. p.adjust makes this easy.