parse_linear_code: Parse Linear Code Structures

View source: R/parse-linear-code.R

parse_linear_codeR Documentation

Parse Linear Code Structures

Description

Parse Linear Code structures into a glyrepr::glycan_structure(). To know more about Linear Code, see this article.

Usage

parse_linear_code(x, on_failure = "error", progress = FALSE)

Arguments

x

A character vector of Linear Code 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" returns NA at invalid positions.

progress

Whether to show a progress bar while parsing.

Value

A glyrepr::glycan_structure() object.

Examples

linear_code <- "Ma3(Ma6)Mb4GNb4GNb"
parse_linear_code(linear_code)


glyparse documentation built on Oct. 30, 2026, 9:10 a.m.