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.
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.
library(glyexp)
library(SummarizedExperiment)
library(glyclean)
library(glydet)
gp_se <- auto_clean(real_experiment)
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): groupVoilà! 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