Spectra icon indicating copy to clipboard operation
Spectra copied to clipboard

Function to find/visualise contaminants

Open lgatto opened this issue 2 years ago • 2 comments

In PR #259, I included a message about mz being sorted. As pointed by @sgibb, we haven't done so in other instances, and I suppose it doesn't bring much anyway given that a vector logical is always returned, irrespective of the number of contained mz values.

I thought it would be useful to have another function (or update that one) to check for one or multiple contaminants in a Spectra object, something like this

Rplot

I imagine a function contaminantMz(x, mz = c(...)) that returns a logical matrix of dimensions length(x) by length(mz).

Referring back to this comment, in this case, I thought it would be worth mentioning that mz would be sorted if they weren't. But even here, if we name our colnames, it might not even be needed.

lgatto avatar Dec 26 '22 09:12 lgatto