The function orbi_filter_weak_isotopocules()
flags isotopocules that are not detected in a minimum of min_percent
of scans. This function evaluates weak isotopocules within each "filename", "block", "segment" and "injection" (if these columns exist), in addition to any groupings already defined before calling this function using dplyr's group_by()
. It restores the original groupings in the returned data frame.
Details
The input dataset
is expected to have at least these 8 columns: filename
, scan.no
, time.min
, compound
, isotopocule
, ions.incremental
, tic
, it.ms
.
Examples
fpath <- system.file("extdata", "testfile_flow.isox", package = "isoorbi")
df <- orbi_read_isox(file = fpath) |>
orbi_simplify_isox() |>
orbi_flag_weak_isotopocules(min_percent = 2)
#> ✔ [21ms] orbi_read_isox() loaded 6449 peaks for 1 compound (HSO4-) with 5
#> isotopocules (M0, 33S, 17O, 34S, and 18O) from testfile_flow.isox
#> ✔ [60ms] orbi_read_isox() read .isox data from 1 file
#> ✔ [5ms] orbi_simplify_isox() kept columns filepath, filename, scan.no,
#> time.min, compound, isotopocule, ions.incremental, tic, and it.ms
#> ✔ [31ms] orbi_flag_weak_isotopocules() confirmed there are no weak
#> isotopocules: all are detected in at least 2% of scans in each of the 15 data
#> groups (based on filename, compound, and isotopocule)