
Calculate neutral losses from precursor ion mass and fragment ion masses
Source:R/misc.R
calc_neutral_loss.Rd
Calculate neutral loss spectra for all ions with available MSn spectra in data
. To calculate neutral losses, MSn spectra are required.
See read_mgf
. This step is required for subsequent filtering based on
neutral losses (filter_neutral_loss
). Resulting neutral loss spectra are stored in tibbles in a new list column named Neutral_Loss
.
Arguments
- data
A tidy tibble created by
read_featuretable
.- m_z_col
Which column holds the precursor m/z? Uses
args_data_masking
.
Examples
toy_mgf %>%
calc_neutral_loss(m_z_col = PEPMASS)
#> # A tibble: 3 × 6
#> VARIABLEONE VARIABLETWO VARIABLETHREE PEPMASS MSn Neutral_Loss
#> <dbl> <dbl> <dbl> <dbl> <list> <list>
#> 1 1.1 1.2 1.3 45.7 <tibble [3 × 2]> <tibble>
#> 2 2.1 2.2 2.3 679. <tibble [5 × 2]> <tibble>
#> 3 3.1 3.2 3.3 5890. <tibble [6 × 2]> <tibble>