| orbi_summarize_results {isoorbi} | R Documentation |
Generate the results table
Description
Contains the logic to generate the results table. It passes the ratio_method parameter to the orbi_calculate_summarized_ratio() function for ratio calculations.
Usage
orbi_summarize_results(
dataset,
ratio_method = c("mean", "sum", "median", "geometric_mean", "slope", "weighted_sum"),
.by = c("block", "sample_name", "segment", "data_group", "data_type", "injection"),
include_flagged_data = FALSE,
include_unused_data = FALSE
)
Arguments
dataset |
A tibble from |
ratio_method |
Method for computing the ratio. Please note well: the formula used to calculate ion ratios matters! Do not simply use arithmetic mean. The best option may depend on the type of data you are processing (e.g., MS1 versus M+1 fragmentation).
|
.by |
additional grouping columns for the results summary (akin to dplyr's |
include_flagged_data |
whether to include flagged data in the calculations (FALSE by default) |
include_unused_data |
whether to include unused data in the calculations (FALSE by default), in addition to peaks actually flagged as setting("data_type_data") |
Value
Returns a results summary table retaining the columns filename, compound, isotopocule and basepeak as well as the grouping columns from the .by parameter that are part of the input dataset. Additionally this function adds the following results columns: start_scan.no, end_scan.no, start_time.min, mean_time.min, end_time.min, ratio, ratio_sem, ratio_relative_sem_permil, shot_noise_permil, No.of.Scans, minutes_to_1e6_ions
-
ratio: The isotope ratio between theisotopoculeand thebasepeak, calculated using theratio_method -
ratio_sem: Standard error of the mean for the ratio -
number_of_scans: Number of scans used for the final ratio calculation -
minutes_to_1e6_ions: Time in minutes it would take to observe 1 million ions of theisotopoculeused as numerator of the ratio calculation. -
shot_noise_permil: Estimate of the shot noise (more correctly thermal noise) of the reported ratio in permil. -
ratio_relative_sem_permil: Relative standard error of the reported ratio in permil
Examples
fpath <- system.file("extdata", "testfile_flow.isox", package = "isoorbi")
df <- orbi_read_isox(file = fpath) |>
orbi_simplify_isox() |>
orbi_define_basepeak("M0") |>
orbi_summarize_results(ratio_method = "sum")