
Automatic Structure Parsing
auto_parse.Rd
Detect the structure string type and use the appropriate parser to parse automatically. Mixed types are supported.
Supported types:
GlycoCT
IUPAC-condensed
IUPAC-extended
IUPAC-short
WURCS
pGlyco
StrucGP
Value
A glycan graph if x
is a single character,
or a list of glycan graphs if x
is a character vector.
Examples
# Single structure
x <- "Gal(b1-3)GlcNAc(b1-4)Glc(a1-" # IUPAC-condensed
auto_parse(x)
#> <glycan_structure[1]>
#> [1] Gal(b1-3)GlcNAc(b1-4)Glc(a1-
#> # Unique structures: 1
# Mixed types
x <- c(
"Gal(b1-3)GlcNAc(b1-4)Glc(a1-", # IUPAC-condensed
"Neu5Aca3Gala3(Fuca6)GlcNAcb-" # IUPAC-short
)
auto_parse(x)
#> <glycan_structure[2]>
#> [1] Gal(b1-3)GlcNAc(b1-4)Glc(a1-
#> [2] Neu5Ac(a2-3)Gal(a1-3)[Fuc(a1-6)]GlcNAc(b1-
#> # Unique structures: 2