Open DarioS opened 6 months ago
lfc
doesn't actually do any filtering, but is instead a TREAT-like threshold for the calculation of p-values. Basically it's the mu
in t.test
. Nothing is explicitly filtered out when you set lfc
, the shape of the DataFrame
remains unchanged.
If you want an equivalent experience for the minimum detected proportion, you'd have to figure out what the null hypothesis becomes. I suppose we could just require a minimum absolute increase in the detected proportion, equivalent to bumping up the p
for a one-sided binom.test
(which is the analogous test for the detected proportions).
If you really just want to filter, you can do that outside of the function. It's a pretty complicated function already and I don't want to add more arguments, and also, I like keeping the DataFrame
shape consistent across all clusters.
a minimum absolute increase in the detected proportion
That sounds good.
Update on this: while I think it's a good idea, I just don't have the time to work on it. I'd be happy to take a PR, though someone will have to delve into the C++ code to implement this change.
I'll also note that the proposed libscran-based replacement for scran will use the "delta detected" as one of its effect sizes for ranking, which is pretty much what is being proposed here, so you could just wait until that hits the shelves.
libscran
certainly looks worth waiting for! I haven not written C++ code in over twelve years, so best that I not meddle with it.
There is already a
lfc
filtering parameter. Something useful missing ismin.detected
which would apply to self or other.PAX7 is biologically a dubious marker gene if it only appears in 1.15% of cells of a cluster. MAG is another case.