| filter_neutral_loss | R Documentation |
The occurrence of characteristic neutral losses can help with the putative annotation of molecules. See the Reference section for an example.
filter_neutral_loss(
data,
losses,
min_found,
tolerance = 10,
tolerance_type = "ppm",
show_progress = TRUE
)
data |
A data frame containing MSn spectra. |
losses |
A numeric. Exact mass of the fragment(s) to filter by. |
min_found |
How many of the |
tolerance |
A numeric. The tolerance to apply to the fragments. Either an absolute value in Da (if |
tolerance_type |
Either |
show_progress |
A |
A filtered tibble.
A. Brink, F. Fontaine, M. Marschmann, B. Steinhuber, E. N. Cece, I. Zamora, A. Pähler, Rapid Commun. Mass Spectrom. 2014, 28, 2695–2703, DOI 10.1002/rcm.7062.
# neutral losses must be calculated first
toy_mgf_nl <- toy_mgf %>%
calc_neutral_loss(m_z_col = PEPMASS)
# all of the given losses (3) must be found
# returns the first row of toy_mgf
toy_mgf_nl %>%
filter_neutral_loss(losses = c(11.1111, 22.2222, 33.3333), min_found = 3)
# all of the given fragments (3) must be found
# returns an empty tibble because the third loss
# of row 1 (33.3333)
# is outside of the tolerance (10 ppm):
# Lower bound:
# 33.4333 - 33.4333 * 5 / 1000000 = 33.4333
# Upper bound:
# 33.4333 + 33.4333 * 5 / 1000000 = 33.4336
toy_mgf_nl %>%
filter_neutral_loss(losses = c(11.1111, 22.2222, 33.4333), min_found = 3)
# only 2 of the 3 fragments must be found
# returns the first row of toy_mgf
toy_mgf_nl %>%
filter_neutral_loss(losses = c(11.1111, 22.2222, 33.4333), min_found = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.