% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse-iupac-extended.R
\name{parse_iupac_extended}
\alias{parse_iupac_extended}
\title{Parse IUPAC-extended Structures}
\usage{
parse_iupac_extended(x, on_failure = "error")
}
\arguments{
\item{x}{A character vector of IUPAC-extended strings. NA values are allowed and will be returned as NA structures.}

\item{on_failure}{How to handle parsing failures. \code{"error"} aborts when a
structure cannot be parsed. \code{"na"} returns \code{NA} at invalid positions.}
}
\value{
A \code{\link[glyrepr:glycan_structure]{glyrepr::glycan_structure()}} object.
}
\description{
Parse IUPAC-extended-style structure characters into a \code{\link[glyrepr:glycan_structure]{glyrepr::glycan_structure()}}.
For more information about IUPAC-extended format, see \doi{10.1351/pac199668101919}.
}
\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 \code{"\\u03b2-D-Galp-(1\\u21923)-\\u03b1-D-GalpNAc-(1\\u2192"} and
\code{"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)
parse_iupac_extended("beta-D-Galp-(1->3)-alpha-D-GalpNAc-(1->")

}
\seealso{
\code{\link[=parse_iupac_condensed]{parse_iupac_condensed()}}, \code{\link[=parse_iupac_short]{parse_iupac_short()}}
}
