Learn R Programming

glyrepr

glyrepr provides two important representations of glycans: glycan compositions and glycan structures. This package is the core of glycoverse ecosystem, as it provides the basic data structures and functions for representing and manipulating glycans.

In fact, the functions in this packages are heavily used by other glycoverse packages such as glyparse and glymotif, which you are probably already using or will use.

Installation

You can install the latest release of glyrepr from CRAN:

install.packages("glyrepr")

Or from r-universe:

install.packages('glyrepr', repos = c('https://glycoverse.r-universe.dev', 'https://cloud.r-project.org'))

Or from GitHub:

remotes::install_github("glycoverse/glyrepr@*release")

Or install the development version:

remotes::install_github("glycoverse/glyrepr")

Documentation

Copy Link

Version

Install

install.packages('glyrepr')

Monthly Downloads

518

Version

0.10.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bin Fu

Last Published

February 13th, 2026

Functions in glyrepr (0.10.1)

smap_unique

Apply Function to Unique Structures Only
smap_predicates

Test Predicates on Glycan Structure Vectors
structure_to_iupac

Convert Glycan Structure to IUPAC-like Sequence
smap2

Map Functions Over Two Glycan Structure Vectors
as_glycan_structure

Convert to Glycan Structure Vector
as_glycan_composition

Convert to Glycan Composition
add_gray_linkages

Add Gray Color to Linkages in IUPAC String
get_anomer

Get the Anomeric information
available_monosaccharides

Get Available Monosaacharides
remove_linkages

Remove All Linkages from a Glycan
get_structure_graphs

Access Individual Glycan Structures
get_mono_type

Get Monosaccharide Types
get_mono_color

Get Color for Concrete Monosaccharides
.parse_iupac_condensed_single

Parse IUPAC-condensed string to glycan structure
add_colors

Add Colors to Monosaccharides
remove_substituents

Remove All Substituents from a Glycan
replace_monos_with_colored

Replace Monosaccharides in String with Colored Versions
simap

Map Functions Over Glycan Structure Vectors with Indices
count_mono

Get the Number of Monosaccharides
.extract_base_mono

Extract Base Monosaccharide Name (Without Substituents)
glyrepr-vctrs

Internal vctrs methods
colorize_iupac_string

Apply Colors to IUPAC String (Monosaccharides + Gray Linkages)
available_substituents

Available Substituents
get_structure_level

Get the Structure Resolution Levels
smap

Map Functions Over Glycan Structure Vectors
glycan_composition

Create a Glycan Composition
has_linkages

Determine if a Glycan Structure has Linkages
valid_linkages

Check if Linkages are Valid
spmap

Map Functions Over Glycan Structure Vectors and Multiple Arguments
convert_to_generic

Convert Monosaccharides to Generic Type
n_glycan_core

Example Glycan Structures
is_known_monosaccharide

Check if a Monosaccharide is Known
format_glycan_structure_subset

Format a Subset of Glycan Structures with Optional Colors
glycan_structure

Create a Glycan Structure Vector
possible_linkages

Generate Possible Linkages
glyrepr-package

glyrepr: Representation for Glycan Compositions and Structures
reduce_structure_level

Reduce a Glycan Structure to a Lower Resolution Level