statgen / popscle

A suite of population scale analysis tools for single-cell genomics data including implementation of Demuxlet / Freemuxlet methods and auxilary tools
https://github.com/statgen/popscle/wiki
Apache License 2.0
43 stars 16 forks source link

Negative values for BEST.POSTERIOR #48

Open Jon-bioinfo opened 3 years ago

Jon-bioinfo commented 3 years ago

I noticed that I have negative values for BEST.POSTERIOR from freemuxlet. This was reported before in https://github.com/statgen/popscle/issues/11 and fixed (in https://github.com/statgen/popscle/commit/495e13eee89db1d1a3aa76b7b6c9e20f457944e3?) however I'm using a fresh pull of the repo. Was this change reverted in https://github.com/statgen/popscle/commit/6f1e2213ea686568edd62defb24369750397666f?

Maybe related I see SNG.POSTERIOR as all 1 from demuxlet but cells are assigned to doublets. Also reported in https://github.com/statgen/popscle/issues/39

heathergeiger commented 3 years ago

FYI, I was able to resolve this by manually editing the appropriate lines to add "exp" around the calculation of bestPPs[i] in scripts cmd_plp_find_mux_clust.cpp, cmd_cram_freemuxlet.cpp, and cmd_cram_freemux2.cpp. Alternatively, it seems like you can also just do e^BEST.POSTERIOR to get the values not log-transformed.