Parse IUPAC-extended-style structure characters into a glyrepr::glycan_structure().
For more information about IUPAC-extended format, see doi:10.1351/pac199668101919
.
Value
A glyrepr::glycan_structure() object.
Details
The function accepts both a Unicode format (using the Greek letters alpha/beta
and the arrow symbol ->) and a plain-text format (using the strings "alpha",
"beta", and "->"). For example,
both "\u03b2-D-Galp-(1\u21923)-\u03b1-D-GalpNAc-(1\u2192" and
"beta-D-Galp-(1->3)-alpha-D-GalpNAc-(1->" are valid inputs.
Examples
iupac <- "\u03b2-D-Galp-(1\u21923)-\u03b1-D-GalpNAc-(1\u2192"
parse_iupac_extended(iupac)
#> <glycan_structure[1]>
#> [1] Gal(b1-3)GalNAc(a1-
#> # Unique structures: 1
parse_iupac_extended("beta-D-Galp-(1->3)-alpha-D-GalpNAc-(1->")
#> <glycan_structure[1]>
#> [1] Gal(b1-3)GalNAc(a1-
#> # Unique structures: 1
