The goal of glydraw is to draw published-ready Structure Nomenclature For Glycans (SNFG). We use ggplot2 as the backend to draw the cartoons.
Installation
You can install the latest release of glydraw from GitHub with:
# install.packages("remotes")
remotes::install_github("glycoverse/glydraw@*release")Or install the development version:
remotes::install_github("glycoverse/glydraw")Example
Call draw_cartoon() to plot a SNFG:
library(glydraw)
draw_cartoon("Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1-")
And call save_cartoon() to save it to a file:
cartoon <- draw_cartoon("Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1-")
save_cartoon(cartoon, "N-core.png", dpi = 300)