get_structure_level: Get the Structure Resolution Levels

View source: R/structure-level.R

get_structure_levelR Documentation

Get the Structure Resolution Levels

Description

Glycan structures can have three possible levels of resolution, determined only by linkage and anomer information:

  • "intact": No linkage or anomer is unknown or ambiguous.

  • "partial": At least one linkage or anomer is unknown or ambiguous, and at least one linkage or anomer contains known information.

  • "topological": All linkages and anomers are completely unknown ("??-?"/"??").

Floating metadata does not by itself affect the structure level. A floating part's attachment linkage is evaluated like an ordinary linkage, while candidate-parent ambiguity for floating parts and substituents is independent of linkage resolution. Consequently, a glycan with floating metadata is regarded as "intact" when every graph-edge and floating-part attachment linkage, as well as the reducing-end anomer, is fully specified, even though a parent residue remains unlocalized.

Usage

get_structure_level(x)

Arguments

x

A glycan_structure() vector or a glycan igraph.

Value

For vector input, a character vector containing one structure level per element. Missing elements return NA_character_, and an empty input returns character(). For graph input, a character scalar.

See Also

has_linkages(), has_floating_parts(), has_floating_substituents(), get_mono_type()

Examples

glycan <- as_glycan_structure("Gal(b1-3)GalNAc(a1-")
get_structure_level(glycan)

floating <- as_glycan_structure(
  "{Neu5Ac(a2-6)|2,3}Gal(b1-3)GalNAc(a1-"
)
get_structure_level(floating)


glyrepr documentation built on Sept. 22, 2026, 5:09 p.m.