Closed chasemc closed 6 years ago
It might also be worth putting in a "ppm" parameter to binPeaks()
that allows a user to input ppm as the tolerance value.
eg:
if(type="ppm"){
any(abs(mass - meanMass) / meanMass * 10^6 > tolerance))
}else{
any(abs(mass - meanMass) / meanMass > tolerance))
}
Ok, I can add something like:
\item{tolerance}{
\code{double}, maximal relative deviation of a peak position (mass) to be
considered as identical. Must be multiplied by 10^-6 for ppm, e.g. use \code{tolerance=5e-6} for 5 ppm.
}
I am against an additional argument to binPeaks
just for multiplying the tolerance by 10^-6. IMHO it will confuse more than it would help. We could argue about a ppm.tolerance
argument that (if given) overwrites the tolerance
argument but I don't think that this really improves the usability.
That sounds great. I agree with you about not adding an additional argument, I think modifying the help file as you did will allow users to figure it out what tolerance is without digging into the source code. Thanks!
I think it would be helpful to explain that the tolerance in
binPeaks()
is ppm/10^6.https://github.com/sgibb/MALDIquant/blob/0182f3e5a925ef8b633f14102571cdfd16024c40/man/binPeaks-functions.Rd#L21