This function removes noisy fragments from a given spectrum. Fragments with m/z values too close to each other, determined by a ppm threshold, are considered noisy. Among such close fragments, the one with the lower intensity is removed.
removeNoise(spec, ppm.ms2match = 30, mz.ppm.thr = 400)
A data frame representing the spectrum with columns for m/z and intensity.
A numeric value specifying the ppm threshold for identifying close fragments. Default is 30.
A numeric value for the m/z threshold below which the m/z is set to this threshold. Default is 400.
A data frame representing the cleaned spectrum after removing noisy fragments.
For a given spectrum, the function identifies fragments whose m/z values are too close to each other, based on the specified ppm threshold. Among such close fragments, the one with the lower intensity is removed from the spectrum.
This function is deprecated. Use `remove_noise()` instead.
exp.spectrum <- data.frame(mz = 1:10, intensity = 1:10)
removeNoise(exp.spectrum)
#> Warning: `removeNoise()` was deprecated in masstools 0.99.9.
#> ℹ Please use `remove_noise()` instead.
#> mz intensity
#> 1 1 1
#> 2 2 2
#> 3 3 3
#> 4 4 4
#> 5 5 5
#> 6 6 6
#> 7 7 7
#> 8 8 8
#> 9 9 9
#> 10 10 10