
Scale intensities in MSn spectra to the highest value within each spectrum
Source:R/msn.R
msn_scale.RdScale the intensity of each peak in an MSn spectrum to that of the highest peak. MSn spectra are required to use this function.
See read_mgf.
Important Note
Please note that existing MSn spectra in data will be overwritten.
Arguments
- data
A tidy tibble created by
read_featuretable.- scale_to
A
numericthat specifies to which number the highest signal in each spectrum will be scaled.
Examples
toy_mgf %>%
msn_scale()
#> # A tibble: 3 × 5
#> VARIABLEONE VARIABLETWO VARIABLETHREE PEPMASS MSn
#> <dbl> <dbl> <dbl> <dbl> <list>
#> 1 1.1 1.2 1.3 45.7 <tibble [3 × 2]>
#> 2 2.1 2.2 2.3 679. <tibble [5 × 2]>
#> 3 3.1 3.2 3.3 5890. <tibble [6 × 2]>