Parse LINUCS strings into a glyrepr::glycan_structure().
LINUCS is a tree-oriented glycan format that writes each residue as a
linkage token, a residue token, and a braced child list, for example
"[][Hexp]{[(4+1)][Hexp]{}}".
Arguments
- x
A character vector of LINUCS strings. NA values are allowed and will be returned as NA structures.
- on_failure
How to handle parsing failures.
"error"aborts when a structure cannot be parsed."na"returnsNAat invalid positions.- progress
Whether to show a progress bar while parsing.
- validate
Whether to validate parsed glycan graphs before constructing the result.
Value
A glyrepr::glycan_structure() object.
Details
LINUCS linkages are written as "(parent+child)", where parent is the
linkage position on the parent residue and child is the anomeric linkage
position on the child residue. Residue labels are normalized to the
monosaccharide and substituent vocabulary used by glyrepr::glyrepr.
A -ol suffix on the root residue is retained as alditol status.
