Skip to contents

Aggregates glycoproteomics data to "gfs" (glycoforms with structures) level if the glycan structure column exists, otherwise to "gf" (glycoforms with compositions) level.

Usage

auto_aggregate(exp, standardize_variable = TRUE)

Arguments

exp

A glyexp::experiment() object with "glycoproteomics" type.

standardize_variable

Whether to call glyexp::standardize_variable() after aggregation. Set to FALSE to skip network calls for faster testing. Default is TRUE.

Value

A modified glyexp::experiment() object with aggregated expression matrix and updated variable information.

Examples

library(glyexp)
exp <- real_experiment
auto_aggregate(exp)
#>  Aggregating to "gfs" level
#> 
#> ── Glycoproteomics Experiment ──────────────────────────────────────────────────
#>  Expression matrix: 12 samples, 4001 variables
#>  Sample information fields: group <fct>
#>  Variable information fields: protein <chr>, glycan_composition <comp>, glycan_structure <struct>, protein_site <int>, gene <chr>