Skip to contents

The goal of glydet is to describe glycosylation structural properties in a site specific manner. In the field of glycomics, this analytical approach is known as derived traits. glydet provides functions to calculate derived traits well-defined in literature, and implements a domain-specific language to define custom derived traits.

Installation

Install glycoverse

We recommend installing the meta-package glycoverse, which includes this package and other core glycoverse packages.

Install glydet alone

If you don’t want to install all glycoverse packages, you can only install glydet.

You can install the latest release of glydet from r-universe (recommended):

# install.packages("pak")
pak::repo_add(glycoverse = "https://glycoverse.r-universe.dev")
pak::pkg_install("glydet")

Or from GitHub:

pak::pkg_install("glycoverse/glydet@*release")

Or install the development version (NOT recommended):

pak::pkg_install("glycoverse/glydet")

Note: Tips and troubleshooting for the meta-package glycoverse are also applicable here: Installation of glycoverse.

Documentation

  • 🚀 Get started: Here
  • 🔧 Custom derived traits: Here
  • 📚 Reference: Here

Role in glycoverse

glydet is a high-level package in the glycoverse ecosystem. It is designed to be used by glycomics or glycoproteomics researchers directly to calculate derived traits. It is built on top of many other packages in the glycoverse ecosystem, including glyexp, glyrepr, glyparse, and glymotif.

Example

First, let’s load necessary packages and get the data ready.

gp_se
#>
#> ── GlycoproteomicSE ────────────────────────────────────────────────────────────
#> ℹ Abundance assay: 12 samples, 3979 variables
#> ℹ Glycan type: N
#> ℹ Row data fields: protein <chr>, glycan_composition <comp>, glycan_structure <struct>, protein_site <int>, gene <chr>
#> ℹ Column data fields: group <fct>
#> ℹ Metadata fields: exp_type <chr>, glycan_type <chr>, quant_method <chr>

Now, let’s calculate some derived traits!

trait_se <- derive_traits(gp_se)
trait_se
#> class: SummarizedExperiment
#> dim: 3864 12
#> metadata(3): exp_type glycan_type quant_method
#> assays(1): abundance
#> rownames(3864): A6NJW9-49-TM A6NJW9-49-TH ... Q9Y6W6-184-AG
#>   Q9Y6W6-184-TS
#> rowData names(5): protein protein_site trait gene explanation
#> colnames(12): C1 C2 ... Y2 Y3
#> colData names(1): group

Voilà! What you see is a plain SummarizedExperiment with “traitproteomics” type. Think of it as your original dataset’s sophisticated cousin 🎭 — instead of tracking “quantification of each glycan on each glycosite in each sample,” it now contains “the value of each derived trait on each glycosite in each sample.”

tibble::as_tibble(rowData(trait_se), rownames = "variable")
#> # A tibble: 3,864 × 6
#>    variable      protein protein_site trait gene  explanation
#>    <chr>         <chr>          <int> <chr> <chr> <chr>
#>  1 A6NJW9-49-TM  A6NJW9            49 TM    CD8B2 Proportion of high-mannose gl…
#>  2 A6NJW9-49-TH  A6NJW9            49 TH    CD8B2 Proportion of hybrid glycans …
#>  3 A6NJW9-49-TC  A6NJW9            49 TC    CD8B2 Proportion of complex glycans…
#>  4 A6NJW9-49-MM  A6NJW9            49 MM    CD8B2 Abundance-weighted mean of ma…
#>  5 A6NJW9-49-CA2 A6NJW9            49 CA2   CD8B2 Proportion of bi-antennary gl…
#>  6 A6NJW9-49-CA3 A6NJW9            49 CA3   CD8B2 Proportion of tri-antennary g…
#>  7 A6NJW9-49-CA4 A6NJW9            49 CA4   CD8B2 Proportion of tetra-antennary…
#>  8 A6NJW9-49-TF  A6NJW9            49 TF    CD8B2 Proportion of fucosylated gly…
#>  9 A6NJW9-49-TFc A6NJW9            49 TFc   CD8B2 Proportion of core-fucosylate…
#> 10 A6NJW9-49-TFa A6NJW9            49 TFa   CD8B2 Proportion of arm-fucosylated…
#> # ℹ 3,854 more rows
assay(trait_se)[1:5, 1:5]
#>               C1 C2 C3 H1 H2
#> A6NJW9-49-TM   0  0  0  0  0
#> A6NJW9-49-TH   0  0  0  0  0
#> A6NJW9-49-TC   1  1  1  1  1
#> A6NJW9-49-MM  NA NA NA NA NA
#> A6NJW9-49-CA2  1  1  1  1  1
tibble::as_tibble(colData(trait_se), rownames = "sample")
#> # A tibble: 12 × 2
#>    sample group
#>    <chr>  <fct>
#>  1 C1     C
#>  2 C2     C
#>  3 C3     C
#>  4 H1     H
#>  5 H2     H
#>  6 H3     H
#>  7 M1     M
#>  8 M2     M
#>  9 M3     M
#> 10 Y1     Y
#> 11 Y2     Y
#> 12 Y3     Y