giannimonaco / flowAI

3 stars 6 forks source link

Recent changes to flowAI package #10

Open timmocking opened 2 years ago

timmocking commented 2 years ago

Hi,

I noticed you made some commits recently. In my own work, I noticed a great change before and after updating the package. The changes I notice are an improved sensitivity in the peak detection (FR) and less false-positive segments (FS). What exactly are the changes you made?

giannimonaco commented 2 years ago

Hi,

you are right, there were some changes. For the version 1.25.3, I changed MAD to IQR for the peak detection in the flow rate to make flowAI less sensitive. However, previous users were used to using MAD as default setting. Hence, for the latest version in bioconductor (v.1.26.0), I reverted the change and added the argument "deviationFR" where you can choose between MAD and IQR. You can use deviationFR="IQR" if you are used to this setting.

On Mon, 16 May 2022 at 15:20, Tim Mocking @.***> wrote:

Hi,

I noticed you made some commits recently. In my own work, I noticed a great change before and after updating the package. The changes I notice are an improved sensitivity in the peak detection (FR) and less false-positive segments (FS). What exactly are the changes you made?

— Reply to this email directly, view it on GitHub https://github.com/giannimonaco/flowAI/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2UTEGCZOM4SQLUKK4ZL3TVKJDRDANCNFSM5WBO56XA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

timmocking commented 2 years ago

Got it. This seems to correspond to my results. The standard cut-off of 0.01 does seem to be overly sensitive when using MAD, in my experience. I will stick to IQR! Did you also make changes for the FS detection?

MAD, Alpha FR = 0.01

image

MAD, Alpha FR = 0.001

image

IRQ, Alpha FR = 0.01

image

MAD, Alpha FR = 0.01

image

giannimonaco commented 2 years ago

Thank you for sharing your results! Yes, IQR is less sensitive and it might work well in many cases. I did not make any change on the FS detection methods, however I made a small change on how percentage of outlier bins are calculated when "outlier_binsFS = TRUE". However, in case you noticed some noticeable difference between two particular flowAI versions, let me know and I'll look it up..

SamGG commented 5 months ago

@timmocking You have got interesting examples. Could you share them with me?

timmocking commented 5 months ago

@SamGG Unfortunately I created these plots almost 2 years ago, so I don't recall which samples I used here..

SamGG commented 5 months ago

@timmocking Thanks for your feedback. From figures 3&4, it seems that the flow rate could vary slowly. But the filtering is based on a constant flow rate, which does not fit. I am thinking that the goal of flow rate based filtering is to identify an eventual ending spike and the very low flow rate. Do you have an opinion about flow rate based filtering?

timmocking commented 5 months ago

@SamGG I'm unfamiliar with the exact causes of long-range flow rate changes. For any of these QC packages (flowAI, PeacoQC, flowCut), I believe the key question is whether the fluctuation affects the consistency of fluorescent signals throughout the measurement. Any tool that assesses these, should probably benefit from considering those signals directly rather than indirectly through the flow rate. An exception could be made for these flow rate spikes, which might not result in a large anomaly at the global level.

However, I have not seen much data indicating that flow rate anomalies cause significant changes in fluorescent intensity. Also, they often comprise maybe 1-2% of the events and are much less "outlier" than other worrisome events such as doublets, debris, and margin events.

I would be convinced if someone showed a comparison in model quality (automated gating, better clustering, disease classification, etc.) comparing data that includes or does not include flow rate anomalies. I might be able to do this in the near future, I will let you know what I find 👍