Parse GlycoWorkbench (GWB/GWS) structure strings into a
glyrepr::glycan_structure().
Value
A glyrepr::glycan_structure() object.
Details
GlycoWorkbench writes glycans from the reducing end towards the
non-reducing ends. Residues include their anomer, configuration, and ring
form, for example "--4b1D-Gal,p". Branches are enclosed in parentheses,
and the structure is followed by mass options after $.
The parser normalizes the glycan tree to IUPAC-condensed notation before
constructing the glycan structure. GlycoWorkbench substituent nodes such as
"--6S" and "--9Ac" are retained as monosaccharide substituents. Mass
options are ignored because they are not part of the glycan graph.
Explicit open-chain residues (,o) are supported only for a reduced
redEnd root; other open-chain forms cannot be represented by glyrepr.
Examples
gwb <- paste0(
"freeEnd--1b1D-GlcNAc,p(--6a1L-Fuc,p)",
"--4b1D-Gal,p--3a2D-NeuAc,p$MONO,Und,0,0,freeEnd"
)
parse_gwb(gwb)
#> <glycan_structure[1]>
#> [1] Neu5Ac(a2-3)Gal(b1-4)[Fuc(a1-6)]GlcNAc(b1-
#> # Unique structures: 1
