The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

glyrepr

Lifecycle: experimental CRAN status R-CMD-check Codecov test coverage

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 GitHub with:

# install.packages("remotes")
remotes::install_github("glycoverse/glyrepr@*release")

Or install the development version:

remotes::install_github("glycoverse/glyrepr")

Documentation

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.