Skip to contents

Aggregate glycoproteomics data to different levels (glycoforms, glycopeptides, etc.). This function sums up quantitative values for each unique combination of specified variables. It is recommended to call this function after missing value imputation.

Usage

aggregate(x, to_level = c("gf", "gp", "gfs", "gps"))

Arguments

x

A glyexp_experiment object containing glycoproteomics data. This function only works with glyexp_experiment objects as it requires variable information for aggregation.

to_level

The aggregation level, one of: "gf" (glycoforms), "gp" (glycopeptides), "gfs" (glycoforms with structures), or "gps" (glycopeptides with structures). See Details for more information.

Value

A modified glyexp_experiment object with aggregated expression matrix and updated variable information.

Details

The to_level parameter determines the level of aggregation. The following levels are available:

  • "gf": Aggregate to glycoforms, which is the unique combination of proteins, protein sites, and glycan compositions. This is the default level.

  • "gp": Aggregate to glycopeptides, which is the unique combination of peptides, proteins, protein sites, and glycan compositions.

  • "gfs": Like "gf", but differentiates structures with the same composition.

  • "gps": Like "gp", but differentiates structures with the same composition.

If aggregate has never been called on an experiment, it has a "psm" (peptide-spectrum match) level by default. You can aggregate an experiment from "psm" to all other levels. You can also call aggregate on an experiment that has already been aggregated. However, you cannot aggregate from "gf" to "gp", as the peptide information is lost during "gf" aggregation. Similarly, you cannot aggregate from "gf" to "gfs", or "gp" to "gps".