lifs-tools / rgoslin Goto Github PK
View Code? Open in Web Editor NEWRgoslin Repository for Bioconductor submission
License: MIT License
Rgoslin Repository for Bioconductor submission
License: MIT License
Hi,
I am parsing some sphingolipids and noticed that the LCB double bonds are off.
I expected to find a total of 2 hydroxylations and 2 hydroxylations in the LCB.
However, rgoslin also reports different values for Cer compared to other lipid classes, even though the fatty acid component remains the same.
Thank you and best wishes,
Mathias
library(rgoslin)
lipid_names <- c("SM (d18:1/16:0)","Cer (d18:1/16:0)", "GalCer (d18:1/16:0)", "GlcCer (d18:1/16:0)", "LacCer (d18:1/16:0)")
parsed_names <- parseLipidNames(lipid_names)
# Total
parsed_names[c("Normalized.Name", "Total.C", "Total.DB", "Total.OH")]
#> Normalized.Name Total.C Total.DB Total.OH
#> 1 SM 18:1;O2/16:0 34 1 1
#> 2 Cer 18:1;O2/16:0 34 1 2
#> 3 GalCer 18:1;O2/16:0 34 1 1
#> 4 GlcCer 18:1;O2/16:0 34 1 1
#> 5 LacCer 18:1;O2/16:0 34 1 1
# LCB
parsed_names[c("Normalized.Name", "LCB.C", "LCB.DB","LCB.OH", "LCB.Bond.Type")]
#> Normalized.Name LCB.C LCB.DB LCB.OH LCB.Bond.Type
#> 1 SM 18:1;O2/16:0 18 1 1 LCB
#> 2 Cer 18:1;O2/16:0 18 1 2 LCB
#> 3 GalCer 18:1;O2/16:0 18 1 1 LCB
#> 4 GlcCer 18:1;O2/16:0 18 1 1 LCB
#> 5 LacCer 18:1;O2/16:0 18 1 1 LCB
Created on 2023-06-02 with reprex v2.0.2
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.0 (2023-04-21)
#> os macOS Ventura 13.4
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Berlin
#> date 2023-06-02
#> pandoc 3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0)
#> digest 0.6.31 2022-12-11 [1] CRAN (R 4.3.0)
#> dplyr 1.1.2 2023-04-20 [1] CRAN (R 4.3.0)
#> evaluate 0.21 2023-05-05 [1] CRAN (R 4.3.0)
#> fansi 1.0.4 2023-01-22 [1] CRAN (R 4.3.0)
#> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0)
#> fs 1.6.2 2023-04-25 [1] CRAN (R 4.3.0)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.0)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0)
#> htmltools 0.5.5 2023-03-23 [1] CRAN (R 4.3.0)
#> knitr 1.43 2023-05-25 [1] CRAN (R 4.3.0)
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.0)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0)
#> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.3.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0)
#> Rcpp 1.0.10 2023-01-22 [1] CRAN (R 4.3.0)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.0)
#> rgoslin * 1.4.0 2023-04-25 [1] Bioconductor
#> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.0)
#> rmarkdown 2.21 2023-03-26 [1] CRAN (R 4.3.0)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.3.0)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
#> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.0)
#> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.3.0)
#> utf8 1.2.3 2023-01-31 [1] CRAN (R 4.3.0)
#> vctrs 0.6.2 2023-04-19 [1] CRAN (R 4.3.0)
#> withr 2.5.0 2022-03-03 [1] CRAN (R 4.3.0)
#> xfun 0.39 2023-04-20 [1] CRAN (R 4.3.0)
#> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
Hi Rgoslin Team,
some of the GSL classes below do not work for me.
They are listed in the supplement table of your publication:
Kopczynski, Dominik, Nils Hoffmann, Bing Peng, Gerhard Liebisch, Friedrich Spener, and Robert Ahrends. “Goslin 2.0 Implements the Recent Lipid Shorthand Nomenclature for MS-Derived Lipid Structures.” Analytical Chemistry, April 11, 2022. https://doi.org/10.1021/acs.analchem.1c05430.
They should work, right?
Thank you and cheers,
Mathias
library(rgoslin)
# Working
parseLipidNames("SM 36:1;2")[[1]]
#> [1] "SM 36:1;O2"
parseLipidNames("GM3 36:1;2")[[1]]
#> [1] "GM3 36:1;O2"
# Working
parseLipidNames("GD3 36:1;2")[[1]]
#> [1] "GD3 36:1;O2"
# Not working
parseLipidNames("GD1 36:1;2")[[1]]
#> Encountered an error while parsing 'GD1 36:1;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
parseLipidNames("GD2 36:1;2")[[1]]
#> Encountered an error while parsing 'GD2 36:1;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
# Working
parseLipidNames("GM3 36:1;2")[[1]]
#> [1] "GM3 36:1;O2"
parseLipidNames("GM1 36:1;2")[[1]]
#> [1] "GM1 36:1;O2"
# Not working
parseLipidNames("GM2 36:1;2")[[1]]
#> Encountered an error while parsing 'GM2 36:1;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
# Not working
parseLipidNames("GT1 36:1;2")[[1]]
#> Encountered an error while parsing 'GT1 36:1;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
parseLipidNames("GT2 36:1;2")[[1]]
#> Encountered an error while parsing 'GT2 36:1;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
parseLipidNames("GT2 36:1;2")[[1]]
#> Encountered an error while parsing 'GT2 36:1;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
Created on 2022-05-18 by the reprex package (v2.0.1)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.3 (2022-03-10)
#> os macOS Monterey 12.4
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Berlin
#> date 2022-05-18
#> pandoc 2.17.1.1 @ /Applications/RStudio.app/Contents/MacOS/quarto/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.1.0)
#> cli 3.3.0 2022-04-25 [2] CRAN (R 4.1.1)
#> crayon 1.5.1 2022-03-26 [2] CRAN (R 4.1.1)
#> DBI 1.1.2 2021-12-20 [2] CRAN (R 4.1.1)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.1.1)
#> dplyr 1.0.9 2022-04-28 [2] CRAN (R 4.1.1)
#> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.1.0)
#> evaluate 0.15 2022-02-18 [2] CRAN (R 4.1.1)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.1.1)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.1.0)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.1.1)
#> generics 0.1.2 2022-01-31 [2] CRAN (R 4.1.1)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.1.1)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.1.0)
#> htmltools 0.5.2 2021-08-25 [2] CRAN (R 4.1.1)
#> knitr 1.39 2022-04-26 [2] CRAN (R 4.1.1)
#> lifecycle 1.0.1 2021-09-24 [2] CRAN (R 4.1.1)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.1.1)
#> pillar 1.7.0 2022-02-01 [2] CRAN (R 4.1.1)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.1.0)
#> purrr 0.3.4 2020-04-17 [2] CRAN (R 4.1.0)
#> R6 2.5.1 2021-08-19 [2] CRAN (R 4.1.1)
#> Rcpp 1.0.8.3 2022-03-17 [2] CRAN (R 4.1.1)
#> reprex 2.0.1 2021-08-05 [2] CRAN (R 4.1.1)
#> rgoslin * 0.99.12 2022-04-12 [1] Github (lifs-tools/rgoslin@2634716)
#> rlang 1.0.2 2022-03-04 [2] CRAN (R 4.1.1)
#> rmarkdown 2.14 2022-04-25 [2] CRAN (R 4.1.1)
#> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.1.0)
#> sessioninfo 1.2.2 2021-12-06 [2] CRAN (R 4.1.1)
#> stringi 1.7.6 2021-11-29 [2] CRAN (R 4.1.1)
#> stringr 1.4.0 2019-02-10 [2] CRAN (R 4.1.1)
#> tibble 3.1.7 2022-05-03 [2] CRAN (R 4.1.1)
#> tidyselect 1.1.2 2022-02-21 [2] CRAN (R 4.1.1)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.1.0)
#> vctrs 0.4.1 2022-04-13 [2] CRAN (R 4.1.1)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.1.1)
#> xfun 0.31 2022-05-10 [2] CRAN (R 4.1.1)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.1.1)
#>
#> [1] /Users/gerl/Library/R/arm64/4.1/library
#> [2] /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
Hi,
This could be in relation to #15
I am using the rgoslin
version 1.0.1, install directly from github via devtools
It seems strange that while rgoslin
is able to parse GM1 (and some GSL classes) in the form GM1(d18:1/16:0)
giving the output normalised name as GM1 18:1;O2/16:0
, it is unable to parse GM1 in the form of its normalised name GM1 18:1;O2/16:0
.
The same applies for GM3
library(rgoslin)
parseLipidNames("GM1(d18:1/16:0)")[["Normalized.Name"]]
#> [1] "GM1 18:1;O2/16:0"
parseLipidNames("GM1 18:1;O2/16:0")[["Normalized.Name"]]
#> Encountered an error while parsing 'GM1 18:1;O2/16:0': Expecting a single string value: [type=character; extent=4].
#> [1] NA
parseLipidNames("GM3(d18:1/16:0)")[["Normalized.Name"]]
#> [1] "GM3 18:1;O2/16:0"
parseLipidNames("GM3 18:1;O2/16:0")[["Normalized.Name"]]
#> Encountered an error while parsing 'GM3 18:1;O2/16:0': Expecting a single string value: [type=character; extent=4].
#> [1] NA
sessionInfo()
#> R version 4.2.1 (2022-06-23 ucrt)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19044)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=English_Singapore.utf8 LC_CTYPE=English_Singapore.utf8
#> [3] LC_MONETARY=English_Singapore.utf8 LC_NUMERIC=C
#> [5] LC_TIME=English_Singapore.utf8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] rgoslin_1.0.1
#>
#> loaded via a namespace (and not attached):
#> [1] Rcpp_1.0.9 rstudioapi_0.13 knitr_1.39 magrittr_2.0.3
#> [5] tidyselect_1.1.2 R.cache_0.16.0 R6_2.5.1 rlang_1.0.4
#> [9] fastmap_1.1.0 fansi_1.0.3 dplyr_1.0.9 stringr_1.4.0
#> [13] styler_1.7.0 highr_0.9 tools_4.2.1 xfun_0.31
#> [17] R.oo_1.25.0 utf8_1.2.2 cli_3.3.0 withr_2.5.0
#> [21] htmltools_0.5.3 yaml_2.3.5 digest_0.6.29 tibble_3.1.8
#> [25] lifecycle_1.0.1 purrr_0.3.4 R.utils_2.12.0 vctrs_0.4.1
#> [29] fs_1.5.2 glue_1.6.2 evaluate_0.15 rmarkdown_2.14
#> [33] reprex_2.0.1 stringi_1.7.8 compiler_4.2.1 pillar_1.8.0
#> [37] generics_0.1.3 R.methodsS3_1.8.2 pkgconfig_2.0.3
Created on 2022-07-27 by the reprex package (v2.0.1)
Hi,
I noticed that the compilation of the C++ library fails when using gcc version 13.2.0. I receive the following error message:
src/parser/ParserClasses.cpp:226:34: error: ‘size’ was not declared in this scope
226 | return Bitfield::iter(*this, size());
| ^~~~
make[1]: *** [makefile:57: src/domain/LipidClasses.cpp] Error 1
make[1]: Leaving directory '/tmp/RtmpTIGAtS/R.INSTALL81392a2ba4/rgoslin/src/cppgoslin'
make: *** [Makevars:25: sublibraries] Error 1
ERROR: compilation failed for package ‘rgoslin’
* removing ‘/usr/local/lib/R/site-library/rgoslin’
When I downgrade gcc to version 11.4, it compiles fine.
Hi,
one thing I found by using rgoslin is that parseLipidName()
returns a data.frame
, while parseLipidNames()
returns a tibble
. I would suggest to replace dplyr::bind_rows(namesList)
with do.call(rbind, list(namesList))
which returns a data.frame
Here an example for illustration:
lipidNames <- list(parseLipidName("PC 16:0_16:1"),
parseLipidName("PC 16:0_16:2"),
parseLipidName("PC 16:1_16:1"))
do.call(rbind, lipidNames)
I am trying to analyze a lipidomics dataset using lipidr and after I create the lipidomics experiment object I get the following warning
"Some lipid names couldn't be parsed because they don't follow the pattern 'CLS xx:x/yy:y'
Cer 40:1;O2, Cer 42:2;O2, HexCer 40:1;O2, LPE O-16:1, LPE O-18:1, PC O-32:1, PC O-34:1, PC O-16:0_18:2, PC O-16:1_18:1, PC O-34:3, PC O-36:1, PC O-36:2, PC O-36:4, PC O-36:5, PC O-38:4, PC O-38:5, PE O-34:2, PE O-36:3, PE O-36:5, PE O-38:5, PE O-38:7, PE O-40:7, SM 32:1;O2, SM 32:2;O2, SM 33:1;O2, SM 34:0;O2, SM 34:1;O2, SM 34:2;O2, SM 35:1;O2, SM 36:1;O2, SM 36:2;O2, SM 36:3;O2, SM 38:1;O2, SM 39:1;O2, SM 40:1;O2, SM 16:1;O2/24:1, SM 18:2;O2/22:0, SM 41:1;O2, SM 41:2;O2, SM 42:1;O2, SM 42:2;O2, SM 42:3;O2, SM 43:1;O2".
After seeing a thread of yours in bioconductor I implement the following code:
old_names <- rowData(d)$Molecule
new_names <- rowData(d)$clean_name %>% str_match(pattern="([\\w :-]+)(\\(\\w+\\))?")
normalized_new_names <- new_names[,2] %>% parseLipidNames(.)
lpd <- update_molecule_names(d, old_names, normalized_new_names$Normalized.Name)
rowData(lpd)$Class <- normalized_new_names$Lipid.Maps.Main.Class
rowData(lpd)$Category <- normalized_new_names$Lipid.Maps.Category
rowData(lpd)$Molecule <- normalized_new_names$Normalized.Name
rowData(lpd)$LipidSpecies <- normalized_new_names$Species.Name
rowData(lpd)$Mass <- normalized_new_names$Mass
rowData(lpd)$SumFormula <- normalized_new_names$Sum.Formula
Lipids seem to be parsed but I am encountering the two following issues:
2.Lipids with two or more FAs keep only the first FA, e.g. PC 16:0_18:3 to PC 16:0 and TG 16:0_18:2_22:5 to TG 16:0
Could you offer some guidance, please?
Hi gosling Team,
I have one more: I get an error, when trying to provide a Acylceramide string.
Thank you for your help!
library(rgoslin)
# Working
parseLipidNames("Cer 36:1;2")[[1]]
#> [1] "Cer 36:1;O2"
parseLipidNames("Cer 67:2;2")[[1]]
#> [1] "Cer 67:2;O2"
# Not working
parseLipidNames("ACer 67:2;2")[[1]]
#> Encountered an error while parsing 'ACer 67:2;2': Expecting a single string value: [type=character; extent=4].
#> [1] NA
Created on 2022-05-25 by the reprex package (v2.0.1)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.3 (2022-03-10)
#> os macOS Monterey 12.4
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Berlin
#> date 2022-05-25
#> pandoc 2.17.1.1 @ /Applications/RStudio.app/Contents/MacOS/quarto/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.1.0)
#> cli 3.3.0 2022-04-25 [2] CRAN (R 4.1.1)
#> crayon 1.5.1 2022-03-26 [2] CRAN (R 4.1.1)
#> DBI 1.1.2 2021-12-20 [2] CRAN (R 4.1.1)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.1.1)
#> dplyr 1.0.9 2022-04-28 [2] CRAN (R 4.1.1)
#> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.1.0)
#> evaluate 0.15 2022-02-18 [2] CRAN (R 4.1.1)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.1.1)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.1.0)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.1.1)
#> generics 0.1.2 2022-01-31 [2] CRAN (R 4.1.1)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.1.1)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.1.0)
#> htmltools 0.5.2 2021-08-25 [2] CRAN (R 4.1.1)
#> knitr 1.39 2022-04-26 [2] CRAN (R 4.1.1)
#> lifecycle 1.0.1 2021-09-24 [2] CRAN (R 4.1.1)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.1.1)
#> pillar 1.7.0 2022-02-01 [2] CRAN (R 4.1.1)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.1.0)
#> purrr 0.3.4 2020-04-17 [2] CRAN (R 4.1.0)
#> R6 2.5.1 2021-08-19 [2] CRAN (R 4.1.1)
#> Rcpp 1.0.8.3 2022-03-17 [2] CRAN (R 4.1.1)
#> reprex 2.0.1 2021-08-05 [2] CRAN (R 4.1.1)
#> rgoslin * 1.0.1 2022-05-20 [1] Github (lifs-tools/rgoslin@b449c41)
#> rlang 1.0.2 2022-03-04 [2] CRAN (R 4.1.1)
#> rmarkdown 2.14 2022-04-25 [2] CRAN (R 4.1.1)
#> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.1.0)
#> sessioninfo 1.2.2 2021-12-06 [2] CRAN (R 4.1.1)
#> stringi 1.7.6 2021-11-29 [2] CRAN (R 4.1.1)
#> stringr 1.4.0 2019-02-10 [2] CRAN (R 4.1.1)
#> tibble 3.1.7 2022-05-03 [2] CRAN (R 4.1.1)
#> tidyselect 1.1.2 2022-02-21 [2] CRAN (R 4.1.1)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.1.0)
#> vctrs 0.4.1 2022-04-13 [2] CRAN (R 4.1.1)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.1.1)
#> xfun 0.31 2022-05-10 [2] CRAN (R 4.1.1)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.1.1)
#>
#> [1] /Users/gerl/Library/R/arm64/4.1/library
#> [2] /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
Hi,
When using Rgoslin v1.6.0 for parsing triacylglycerols where only one fatty acid is explicitly given (e.g. TG 20:1_52:1), the lipid class is recognized as diacylglycerol.
E.g. the following command will lead to the parsed results below:
parseLipidNames("TG 20:1_52:1")
This behaviour is consistent across all TAGs that I have tested (ca. 500). isValidLipidName()
is not complaining about the nomenclature, and in previous versions, the parsing has worked.
Is this a new shorthand nomenclature or maybe a bug?
Hi Dominik,
parsing of e.g. TG 16:0_34:1 returns DG 16:0_34:1 under Normalized.Name and Molecular.Species.Name, DG 48:1 as Species.Name and DG as lipid classes. TG 16:0_16:0_18:1 and TG 40:1 however are parsed correctly. Thank you!
Hi,
when I run the lines below, then 1 and 2 are fine, but 3 returns NOT_PARSEABLE
, even for 1 and 2 LHexCer 18:1;O2
is returned in Normalized.Name
. Is this an expected behaviour? Thank you for your time!
1) parseLipidNames("LHexCer d18:1")
2) parseLipidNames("LHexCer 18:1;2")
3) parseLipidNames("LHexCer 18:1;O2")
This issue provides visibility into Renovate updates and their statuses. Learn more
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Hi,
I am trying to implement Goslin at Lipotype to provide the shorthand2020 nomenclature to our customers. I largely works out of the box for our nomenclature, which always also provides the hydroxylations for every lipid (See below). However, for some (and only some) lipids this is misinterpreted. As a workaround, I can simply remove all 0 hydroxylations (";0") from the lipid names, however you should probably look at these special cases.
Keep up the good work!
Mathias
library(rgoslin)
# Some lipids are interpreter with OHs
# Correct
parseLipidName("PC O-16:1;0/16:0;0")[[1]]
#> [1] "PC O-16:1/16:0"
# with OH
parseLipidName("PC O-16:0;0/16:0;0")[[1]]
#> [1] "PC O-16:0;OH/16:0;OH"
# Correct
parseLipidName("CE 16:1;0")[[1]]
#> [1] "SE 27:1/16:1"
# with OH
parseLipidName("CE 16:0;0")[[1]]
#> [1] "SE 27:1/16:0;OH"
parseLipidName("CE 14:0;0")[[1]]
#> [1] "SE 27:1/14:0;OH"
parseLipidName("CE 17:0;0")[[1]]
#> [1] "SE 27:1/17:0;OH"
sessionInfo()
#> R version 4.1.3 (2022-03-10)
#> Platform: aarch64-apple-darwin20 (64-bit)
#> Running under: macOS Monterey 12.3.1
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
#>
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] rgoslin_0.99.3
#>
#> loaded via a namespace (and not attached):
#> [1] Rcpp_1.0.8.3 digest_0.6.29 withr_2.5.0 magrittr_2.0.3
#> [5] reprex_2.0.1 evaluate_0.15 highr_0.9 stringi_1.7.6
#> [9] rlang_1.0.2 cli_3.2.0 rstudioapi_0.13 fs_1.5.2
#> [13] rmarkdown_2.13 tools_4.1.3 stringr_1.4.0 glue_1.6.2
#> [17] xfun_0.30 yaml_2.3.5 fastmap_1.1.0 compiler_4.1.3
#> [21] htmltools_0.5.2 knitr_1.38
Created on 2022-04-08 by the reprex package (v2.0.1)
Referencing issue from previous repository:
Hi,
also Gb3 class is reported as "Cer".
Thank you and best wishes,
Mathias
library(rgoslin)
lipid_names <- c("SM (d18:1/16:0)","Gb3 (d18:1/16:0)", "Cer (d18:1/16:0)",
"GalCer (d18:1/16:0)", "GlcCer (d18:1/16:0)", "LacCer (d18:1/16:0)")
parsed_names <- parseLipidNames(lipid_names)
# classes
parsed_names[c("Normalized.Name", "Lipid.Maps.Main.Class")]
#> Normalized.Name Lipid.Maps.Main.Class
#> 1 SM 18:1;O2/16:0 SM
#> 2 Gal2GlcCer 18:1;O2/16:0 Cer
#> 3 Cer 18:1;O2/16:0 Cer
#> 4 GalCer 18:1;O2/16:0 GalCer
#> 5 GlcCer 18:1;O2/16:0 GlcCer
#> 6 LacCer 18:1;O2/16:0 LacCer
Created on 2023-06-02 with reprex v2.0.2
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.0 (2023-04-21)
#> os macOS Ventura 13.4
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Berlin
#> date 2023-06-02
#> pandoc 3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0)
#> digest 0.6.31 2022-12-11 [1] CRAN (R 4.3.0)
#> dplyr 1.1.2 2023-04-20 [1] CRAN (R 4.3.0)
#> evaluate 0.21 2023-05-05 [1] CRAN (R 4.3.0)
#> fansi 1.0.4 2023-01-22 [1] CRAN (R 4.3.0)
#> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0)
#> fs 1.6.2 2023-04-25 [1] CRAN (R 4.3.0)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.0)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0)
#> htmltools 0.5.5 2023-03-23 [1] CRAN (R 4.3.0)
#> knitr 1.43 2023-05-25 [1] CRAN (R 4.3.0)
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.0)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0)
#> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.3.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0)
#> Rcpp 1.0.10 2023-01-22 [1] CRAN (R 4.3.0)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.0)
#> rgoslin * 1.4.0 2023-04-25 [1] Bioconductor
#> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.0)
#> rmarkdown 2.21 2023-03-26 [1] CRAN (R 4.3.0)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.3.0)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
#> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.0)
#> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.3.0)
#> utf8 1.2.3 2023-01-31 [1] CRAN (R 4.3.0)
#> vctrs 0.6.2 2023-04-19 [1] CRAN (R 4.3.0)
#> withr 2.5.0 2022-03-03 [1] CRAN (R 4.3.0)
#> xfun 0.39 2023-04-20 [1] CRAN (R 4.3.0)
#> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
Hi Dominik,
just realised LHex2Cer
and LHex3Cer
(which includes e.g. lyso-Gb3) are not in dictionary. Possible to add these species too?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.