This function enables users to rename selected molecules in the dataset, so that they can be parsed correctly by lipidr or modify the lipid class. lipidr automatically updates the annotation for the renamed molecules.

update_molecule_names(data, old, new)

Arguments

data

LipidomicsExperiment object.

old

A character vector of the molecule names to be renamed.

new

A character vector of the new molecule names.

Value

A LipidomicsExperiment object with molecules name and annotation updated.

Examples

data(data_normalized) old_names <- rowData(data_normalized)$Molecule # replace PCO with plasmenylPC new_names <- sub("^LPE", "LysoPE", old_names) update_molecule_names(data_normalized, old_names, new_names)
#> Joining, by = "Molecule"
#> Joining, by = "Molecule"
#> class: LipidomicsExperiment #> dim: 278 56 #> metadata(2): summarized dimnames #> assays(3): Retention Time Area Background #> rownames(278): 1 2 ... 277 278 #> rowData names(24): filename Molecule ... total_cs Class #> colnames(56): S1A S2A ... TQC_11 TQC_12 #> colData names(3): group Diet BileAcid