MyNixOS website logo
Description

Representation for Glycan Compositions and Structures.

Computational representations of glycan compositions and structures, including details such as linkages, anomers, and substituents. Supports varying levels of monosaccharide specificity (e.g., "Hex" or "Gal") and ambiguous linkages. Provides robust parsing and generation of IUPAC-condensed structure strings. Optimized for vectorized operations on glycan structures, with efficient handling of duplications. As the cornerstone of the glycoverse ecosystem, this package delivers the foundational data structures that power glycomics and glycoproteomics analysis workflows.

glyrepr

Lifecycle:experimental CRANstatus R-universeversion R-CMD-check Codecov testcoverage

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

  • 🚀 Get started: Here
  • 🔍 Underlying graph representation: Here
  • 🔧 Faster structure operations: Here
  • ✏️ IUPAC-condensed glycan text representation: Here
  • 📚 Reference: Here

Role in glycoverse

As the cornerstone of the glycoverse ecosystem, this package provides two fundamental data structures for representing glycans: glycan_composition() and glycan_structure(). These specialized data types are what distinguish glycoverse from other omics analysis frameworks, serving as the foundation for higher-level packages like glymotif, which build upon them to perform advanced glycan analysis.

Example

library(glyrepr)

# Create glycan compositions
glycan_composition(
  c(Man = 5, GlcNAc = 2),
  c(Man = 3, Gal = 2, GlcNAc = 4, Fuc = 1, Neu5Ac = 2)
)
#> <glycan_composition[2]>
#> [1] Man(5)GlcNAc(2)
#> [2] Man(3)Gal(2)GlcNAc(4)Fuc(1)Neu5Ac(2)

# Parse IUPAC-condensed glycan text representation
# `glyrepr` supports IUPAC-condensed glycan text representation natively.
# For other formats like WURCS or glycoCT, use the `glyparse` package.
# For example, the following two glycan structures are equivalent:
structures <- as_glycan_structure(c("GlcNAc(b1-4)GlcNAc(?1-", "Man(a1-2)GlcNAc(?1-"))

# Get the composition of a glycan structure
as_glycan_composition(structures)
#> <glycan_composition[2]>
#> [1] GlcNAc(2)
#> [2] Man(1)GlcNAc(1)

# Count the number of given residues
count_mono(structures, "Hex")
#> [1] 0 1
count_mono(glycan_composition(c(Man = 3, GlcNAc = 2, Gal = 2)), "Hex")
#> [1] 5
Metadata

Version

0.10.1

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows