View source: R/mutate_annotation_table.R
mutate_annotation_table | R Documentation |
This function updates the annotation table in a mass_dataset
object by appending new annotation data and retaining only the top annotations based on the total score.
mutate_annotation_table(object, annotation_table)
object |
A |
annotation_table |
A data frame containing new annotation data to be added to the |
This function allows you to update or append new annotations to the existing annotation table in a mass_dataset
object. The function ensures that the new annotations are properly arranged based on the Total.score
, and it retains only the top annotations for each variable_id
based on the specified candidate.num
.
The annotation_table
must contain the following columns:
The unique identifier for each variable.
The ID of the MS2 file associated with each annotation.
The ID of the MS2 spectrum associated with each annotation.
The name of the annotated compound.
The CAS ID of the compound.
The HMDB ID of the compound.
The KEGG ID of the compound.
The lab identifier for the compound.
The adduct form of the compound.
The error in m/z matching.
The score for the m/z match.
The error in retention time matching.
The score for the retention time match.
Collision energy used in MS2 matching.
Spectral similarity score for MS2 matching.
The total score for the annotation.
The database used for annotation.
The confidence level of the annotation.
The function returns the updated mass_dataset
object with the appended and processed annotation table.
## Not run:
# Example usage
updated_object <- mutate_annotation_table(
object = my_dataset,
annotation_table = new_annotation_data
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.