calculate_confidence_level | R Documentation |
This function calculates the confidence level for each annotation based on the presence or absence of m/z error, retention time (RT) error, and spectral similarity (SS).
calculate_confidence_level(annotation_result)
annotation_result |
A data frame containing the annotation results, including the columns 'mz.error', 'RT.error', and 'SS'. |
The function assigns a confidence level to each annotation according to the following rules:
All of 'mz.error', 'RT.error', and 'SS' are available (not NA).
Any two of the three ('mz.error', 'RT.error', or 'SS') are available.
Only one or none of 'mz.error', 'RT.error', or 'SS' is available.
A numeric vector of confidence levels (1, 2, or 3) for each annotation in the input data.
annotate_metabolites
, plot_ms2_matching
## Not run:
# Assuming `my_annotation_result` is the annotation data frame:
confidence_levels <- calculate_confidence_level(my_annotation_result)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.