on_failure parameter to all parser functions. When on_failure = "error", the parser will throw an error when it encounters an unparsable string. When on_failure = "na", the parser will return NA for unparsable strings. The default is "error", for backwards compatibility.parse_iupac_extended() now accepts input with plain text equivalents ("alpha", "beta", "->"). (#10)dplyr::case_match() with dplyr::recode_values() in parsers to prevent warnings.parse_iupac_extended() and parse_iupac_short() now support generic monosaccharides, e.g. "Hex", "HexNAc", "HexN".parse_linear_code() to parse Linear Code strings.auto_parse() now supports Linear Code strings.parse_iupac_extended().parse_wurcs().parse_iupac_short().parse_glycoct().glyrepr v0.7.0.parse_iupac_condensed() and parse_iupac_short() now require the reducing-end monosaccharide to have anomer information. For example, "Neu5Ac(a2-" and "Neu5Aca-" are valid, but "Neu5Ac" is not.parse_pglyco_struc() now support "aH" and "pH" monosaccharides.auto_parse() to automatically detect and parse different glycan structure string formats.> parse_iupac_condensed("bad_glycan")
Error in `purrr::map()` at glyparse/R/struc-parser-wrapper.R:13:3:
ℹ In index: 1.
Caused by error in `value[[3L]]()`:
! Could not parse IUPAC-condensed string: {.val {x}}
ℹ Invalid characters or format in IUPAC-condensed string
Run `rlang::last_trace()` to see where the error occurred.
Now:
> parse_iupac_condensed("bad_glycan")
Error in `parse_iupac_condensed()`:
! Can't parse: "bad_glycan"
Run `rlang::last_trace()` to see where the error occurred.
parse_glycoct() to parse glycans in GlycoCT format.parse_iupac_short(), parse_iupac_extended(), parse_iupac_condensed(),
parse_wurcs() now support multiple substituents on the same monosaccharide,
to align with the updates in glyrepr v0.5.0.