This function combines adjusting the annotation table returned by Goslin with adding mappings between lipids and the LION ontology and mappings with other resource IDs. The returned lipid characteristics table will be used for further analysis in LipidSigR.
lipid_annotation(goslin_annotation)
A data frame of lipid characteristics from the
parseLipidNames
function of rgoslin package.
Return a data frame of lipid characteristics table.
library(dplyr)
data("abundance_twoGroup")
parse_lipid <- rgoslin::parseLipidNames(abundance_twoGroup$feature)
#> Encountered an error while parsing 'SE 27:1;0-14:0;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-15:0;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-16:0;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-16:1;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-17:0;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-17:1;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-18:1;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-18:2;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-18:3;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-19:2;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-19:3;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-20:2;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-20:4;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-20:5;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'SE 27:1;0-22:6;0': Expecting a single string value: [type=character; extent=4].
#> Encountered an error while parsing 'ST 27:1;0': Expecting a single string value: [type=character; extent=4].
recognized_lipid <- parse_lipid$Original.Name[which(parse_lipid$Grammar != 'NOT_PARSEABLE')]
goslin_annotation <- parse_lipid %>%
dplyr::filter(Original.Name %in% recognized_lipid)
lipid_annotation_table <- lipid_annotation(goslin_annotation)