theislab / scCODA

A Bayesian model for compositional single-cell data analysis
BSD 3-Clause "New" or "Revised" License
142 stars 23 forks source link

Obtain p-values for cell type abundance effect #47

Closed mxposed closed 1 year ago

mxposed commented 2 years ago

Hi Thank you for the package! I wonder, how should I obtain the p-values for cell type abundance comparisons? Can I use Inclusion probability from summary_extended for it? As far as I understand the methods, this is used for selecting the credible effects.

Also, in equation 12 in the paper shouldn't there be max instead of min? Screen Shot 2022-01-18 at 12 13 45

Thank you

cc @karolinasenkow

johannesostner commented 2 years ago

Hi Nikolay, thanks for your interest in scCODA!

First of all, the max is correct - c' is defined as a threshold, such that all effects with inclusion probability greater than c' are selected. With decreasing threshold, more effects will be selected and therefore the expected FDR will increase. Thus, we want the smallest c, for which the FDR is still smaller than alpha.

Regarding p-values: scCODA does not perform hypothesis testing, but rather uses Bayesian model selection. Therefore, it does not produce p-values. As an alternative, you can use the inclusion probability as a measure of confidence, as you pointed out correctly.

I hope that this answers your questions!