Closed saheedb closed 1 year ago
Hi Saheed,
tinypeak.removal
is a value between 0 to 1, so when it's 1 deGate would ignore all peaks other than the largest one, and therefore tried to find a threshold based on upper or inflection point.
The smaller it gets , the more sensitive it is to peaks. There's also an argument called adjust.dens
that's same as the adjust argument in density() function, which makes the curve smoother. Looking at your data, I can see that the left peak is not always present in the data, and it shows up as a shoulder in some cases (plot 1&4 for example), so you may benefit from adding the upper=F, alpha=0.1
in deGate for those cases. You can play around with alpha to make the threshold closer or farther away from the main peak
Thank you for clarifying.
deGate() works fantastically well most of the time, but there are instances where it fails, and I'm wondering what I can do to improve it. Here are some examples where it doesn't gate where expected:
And this is how I'm using deGate(): deGate(ff, chan, count.lim = 100, tinypeak.removal = 0.25)
I have been incrementing tinypeak.removal to see if that helps, but considering that the default value is quite low (1/25), is there an upper limit I should avoid reaching which may introduce other unpredictable behavior? Is this the most useful parameter to play with in order to improve the gating? Or do I just need cleaner data to begin with? Thank you