
Gets values from a single metadata column for a respective m/z value.
Source:R/MZAnnotation.R
GetMZMetadata.RdGets values from a single metadata column for a respective m/z value.
Usage
GetMZMetadata(
obj,
mz,
assay = "Spatial",
metadata.column = "all_IsomerNames",
separate = TRUE
)Arguments
- obj
SpaMTP Spatial Metabolomic Seurat Object containing annotated m/z values.
- mz
Character string specifying the m/z value to return the metadata for.
- assay
Character string defining the Seurat assay that contains the annotated metadata corresponding to the m/z values (default = "Spatial").
- metadata.column
Character string corresponding to the
@meta.datacolumn to extract the data from (default = "all_IsomerNames").- separate
Boolean indicating whether to separate the metadata string and return a vector. Note, if
TRUEthe metadata column should contain values separate by "; " (default = TRUE).
Examples
utils::str(formals(GetMZMetadata))
#> Dotted pair list of 5
#> $ obj : symbol
#> $ mz : symbol
#> $ assay : chr "Spatial"
#> $ metadata.column: chr "all_IsomerNames"
#> $ separate : logi TRUE
# GetMZMetadata(SpaMTP, mz = "mz-100", metadata.column = "all_IsomerNames")
##### Example for getting metabolite annotation IDs for a m/z value
# GetMZMetadata(SpaMTP, mz = "mz-100", metadata.column = "all_Isomers")