rformassspectrometry / Spectra

Low level infrastructure to handle MS spectra
https://rformassspectrometry.github.io/Spectra/
37 stars 25 forks source link

noramlize,Spectra #199

Open lgatto opened 3 years ago

lgatto commented 3 years ago

We have normalize,MSnExp in MSnbase, and from my own usage and the MetaboAnnotation vignette, the use is general. I would suggest we add a normalise,Spectra that scales all intensities between 0 and 1.

Or should we rather go for scale,Spectra?

@sgibb @jorainer - any comments/suggestions?

jorainer commented 3 years ago

I think scale might be more appropriate (or even scaleIntensities to tell what exactly the function is doing).

I think we would also need a parameter to specify the range to which scale, you're scaling to [0-1], I'm usually scaling to [0-100] to have percentages and I know there are people that scale to [0-10].

lgatto commented 3 years ago

Yes for scaleIntensitites() - that will avoid quite a bit of confusion!