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.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bin Fu

Last Published

January 24th, 2026

Functions in glyrepr (0.10.0)

count_mono

Get the Number of Monosaccharides
add_colors

Add Colors to Monosaccharides
add_gray_linkages

Add Gray Color to Linkages in IUPAC String
convert_to_generic

Convert Monosaccharides to Generic Type
glycan_composition

Create a Glycan Composition
get_structure_level

Get the Structure Resolution Levels
colorize_iupac_string

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

Get the Anomeric information
available_monosaccharides

Get Available Monosaacharides
available_substituents

Available Substituents
get_mono_type

Get Monosaccharide Types
simap

Map Functions Over Glycan Structure Vectors with Indices
get_structure_graphs

Access Individual Glycan Structures
possible_linkages

Generate Possible Linkages
reduce_structure_level

Reduce a Glycan Structure to a Lower Resolution Level
smap_unique

Apply Function to Unique Structures Only
smap_predicates

Test Predicates on Glycan Structure Vectors
glycan_structure

Create a Glycan Structure Vector
replace_monos_with_colored

Replace Monosaccharides in String with Colored Versions
glyrepr-package

glyrepr: Representation for Glycan Compositions and Structures
get_mono_color

Get Color for Concrete Monosaccharides
format_glycan_structure_subset

Format a Subset of Glycan Structures with Optional Colors
.parse_iupac_condensed_single

Parse IUPAC-condensed string to glycan structure
glyrepr-vctrs

Internal vctrs methods
remove_linkages

Remove All Linkages from a Glycan
remove_substituents

Remove All Substituents from a Glycan
valid_linkages

Check if Linkages are Valid
smap

Map Functions Over Glycan Structure Vectors
has_linkages

Determine if a Glycan Structure has Linkages
smap2

Map Functions Over Two Glycan Structure Vectors
n_glycan_core

Example Glycan Structures
is_known_monosaccharide

Check if a Monosaccharide is Known
spmap

Map Functions Over Glycan Structure Vectors and Multiple Arguments
structure_to_iupac

Convert Glycan Structure to IUPAC-like Sequence
as_glycan_structure

Convert to Glycan Structure Vector
as_glycan_composition

Convert to Glycan Composition
.extract_base_mono

Extract Base Monosaccharide Name (Without Substituents)