| filter_msn | R Documentation |
Filters Features based on the presence of MSn fragments. This can help, for example with the identification of potential homologous molecules.
filter_msn(
data,
fragments,
min_found,
tolerance = 5,
tolerance_type = "ppm",
show_progress = TRUE
)
data |
A data frame containing MSn spectra. |
fragments |
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.
# all of the given fragments (3) must be found
# returns the first row of toy_mgf
toy_mgf %>%
filter_msn(fragments = c(12.3456, 23.4567, 34.5678), min_found = 3)
# all of the given fragments (3) must be found
# returns an empty tibble because the third fragment
# of row 1 (34.5678)
# is outside of the tolerance (5 ppm):
# Lower bound:
# 34.5688 - 34.5688 * 5 / 1000000 = 34.5686
# Upper bound:
# 34.5688 + 34.5688 * 5 / 1000000 = 34.5690
toy_mgf %>%
filter_msn(fragments = c(12.3456, 23.4567, 34.5688), min_found = 3)
# only 2 of the 3 fragments must be found
# returns the first row of toy_mgf
toy_mgf %>%
filter_msn(fragments = c(12.3456, 23.4567, 34.5688), min_found = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.