orbi_define_basepeak()
sets one isotopocule in the data frame as the base peak (ratio denominator) and calculates the instantaneous isotope ratios against it.
Arguments
- dataset
An aggregated dataset or a data frame of peaks (i.e. works directly after
orbi_identify_isotopocules()
as well as with a tibble from orbi_get_data(peaks = everything()) or when reading from an IsoX file)- basepeak_def
The isotopocule that gets defined as base peak, i.e. the denominator to calculate ratios
Value
same object as provided in dataset
without the rows of the basepeak isotopocule and instead three new columns called basepeak
, basepeak_ions
, and ratio
holding the basepeak information and the isotope ratios vs. the base peak
Examples
fpath <- system.file("extdata", "testfile_flow.isox", package = "isoorbi")
df <- orbi_read_isox(file = fpath) |>
orbi_simplify_isox() |>
orbi_define_basepeak(basepeak_def = "M0")
#> ✔ [20ms] orbi_read_isox() loaded 6449 peaks for 1 compound (HSO4-) with 5
#> isotopocules (M0, 33S, 17O, 34S, and 18O) from testfile_flow.isox
#> ✔ [5ms] orbi_simplify_isox() kept columns filepath, filename, scan.no,
#> time.min, compound, isotopocule, ions.incremental, tic, and it.ms
#> ✔ [143ms] orbi_define_basepeak() set M0 as the ratio denominator and calculated
#> 5.16k ratio values for 4 isotopocules (33S, 17O, 34S, and 18O)