Package 'rgoslin'

Title: Lipid Shorthand Name Parsing and Normalization
Description: The R implementation for the Grammar of Succint Lipid Nomenclature parses different short hand notation dialects for lipid names. It normalizes them to a standard name. It further provides calculated monoisotopic masses and sum formulas for each successfully parsed lipid name and supplements it with LIPID MAPS Category and Class information. Also, the structural level and further structural details about the head group, fatty acyls and functional groups are returned, where applicable.
Authors: Nils Hoffmann [aut, cre] , Dominik Kopczynski [aut]
Maintainer: Nils Hoffmann <[email protected]>
License: MIT + file LICENSE
Version: 1.9.0
Built: 2024-10-03 05:47:53 UTC
Source: https://github.com/bioc/rgoslin

Help Index


Check lipid name.

Description

isValidLipidName checks the provided lipid name against the built-in grammars. Will return FALSE if none of the parsers was able to parse the provided name successfully. Will stop execution via stop if non character input is detected.

Usage

isValidLipidName(lipidName)

Arguments

lipidName

The lipid name to check.

Value

TRUE if the lipidName could be parsed, FALSE otherwise.

Examples

isValidLipidName("PC 32:1")
isValidLipidName("PC(32:1)")
isValidLipidName("PCX(32:1)")

Return the list of grammars supported by goslin.

Description

listAvailableGrammars returns the list of grammars that the underlying cppgoslin library supports.

Usage

listAvailableGrammars()

Value

the list of grammars

Examples

listAvailableGrammars()

Parse multiple lipid names and return a data frame with the results.

Description

parseLipidNames reads the provided lipid names vector and returns structural information as a data frame. Will return a cell with the "Grammar" column set to "NOT_PARSEABLE" if none of the parsers was able to parse the provided name successfully. Will stop execution via stop if invalid non character input is detected or fatal errors are encountered during parsing.

Usage

parseLipidNames(lipidNames, grammar = NULL)

Arguments

lipidNames

The vector of lipid names to parse.

grammar

The grammar to use. One of "Goslin", "GoslinFragments", "SwissLipids", "LipidMaps", "HMDB", "FattyAcids". Call listAvailableGrammars() for a complete list of available grammars. If grammar is omitted or NULL is passed as a parameter, all available grammars / parsers will be tested. The first successful one will win. If all parsers fail, the "Messages" column in the returned data frame will contain the last parsers message.

Value

Data frame where each row reports the parsing result of each element in lipidNames.

Examples

parseLipidNames(c("PC 32:1","LPC 34:1","TG(18:1_18:0_16:1)"))
parseLipidNames(c("Cer(d18:1(8Z)/24:0)", grammar = "LipidMaps"))