popscle icon indicating copy to clipboard operation
popscle copied to clipboard

Posterior values always zero or one

Open ccrobertson opened this issue 1 year ago • 3 comments

When I run demuxlet, I get the following:

SNG.POSTERIOR is always equal to 1 (even with DROPLET.TYPE==DBL) BEST.POSTERIOR is always a negative number

From reading other github issues, it looks like the negative values for BEST.POSTERIOR is a bug, and the posterior probability of the best guess is actually PP = e^BEST.POSTERIOR. But even when I do this transformation, this results in

PP=1 for all barcodes with DROPLET.TYPE==DBL PP=0 for all barcodes with DROPLET.TYPE==SNG

Has anyone else seen this?

ccrobertson avatar May 06 '23 21:05 ccrobertson

There is a bug in the current calculation of BEST.POSTERIOR. The bug affects doublets and singlets differently, so probably not useful to rely on it until the bug is fixed. I usually prefer using DIFF.LLK.BEST.NEXT to see how strong the evidence of current inference is.

hyunminkang avatar May 07 '23 05:05 hyunminkang

Thanks! That is really helpful.

By chance, do you know if this bug is relevant to the original demuxlet repository (https://github.com/statgen/demuxlet)? I know there are folks in our group using both versions.

ccrobertson avatar May 09 '23 20:05 ccrobertson

Hi, we've come across this too (albeit alongside troubleshooting high doublets; and in apptainer), just wondering if anyone has identified a previous commit in either repo without the calculation bug?

tfguinan avatar Aug 01 '23 07:08 tfguinan