Learn R Programming

glyrepr (version 0.10.0)

has_linkages: Determine if a Glycan Structure has Linkages

Description

Unknown linkages in a glycan structure are represented by "??-?". Also, a linkage can be partially known (e.g. "a?-?"). This function checks if a glycan structure has linkages, in a strict or lenient way.

Usage

has_linkages(glycan, strict = FALSE)

Value

A logical vector indicating if each glycan structure has linkages.

Arguments

glycan

A glycan_structure() vector.

strict

A logical value.

  • If FALSE (default), a glycan is considered to have linkages if any linkage is partially known (not "??-?").

  • If TRUE, a glycan is considered to have linkages only if all linkages are fully determined (no "?" in the linkage).

See Also

remove_linkages(), possible_linkages()

Examples

Run this code
glycan <- o_glycan_core_1(linkage = TRUE)
has_linkages(glycan)
print(glycan)

glycan <- remove_linkages(glycan)
has_linkages(glycan)
print(glycan)

glycan <- as_glycan_structure("Gal(b1-?)GalNAc(a1-")
has_linkages(glycan)
has_linkages(glycan, strict = TRUE)

Run the code above in your browser using DataLab