Skip to contents

This function takes a glyexp::experiment(), and returns a new glyexp::experiment() with motif quantifications.

The new experiment is different from a normal glyexp::experiment() in three ways:

  1. It doesn't have a "glycan_structure" or "glycan_composition" column, but a "motif" column instead.

  2. The metadata field "exp_type" is "motifomics", not "glycoproteomics" or glycomics.

You can understand a "motif experiment" in this way: For glycoproteomics data, instead of containing the quantification of each glycan on each glycosite, it now contains the quantification of each motif on each glycosite in each sample. For glycomics data, it contains the motif quantification in each sample.

Due to the unified data structure of glyexp::experiment(), the returned motif experiment can be passed to downstream glycoverse functions like glystats::gly_ttest() for further statistical analysis. Also, you can use as_tibble() to convert it to a "tidy" tibble for custom analysis.

Usage

quantify_motifs(exp, motifs, alignments = NULL, ignore_linkages = FALSE)

Arguments

exp

A glyexp::experiment() object containing glycoproteomics data.

motifs

A character vector of motif names, IUPAC-condensed structure strings, or a 'glyrepr_structure' object.

alignments

A character vector specifying alignment types for each motif. Can be a single value (applied to all motifs) or a vector of the same length as motifs.

ignore_linkages

A logical value. If TRUE, linkages will be ignored in the comparison.

Value

A glyexp::experiment() object containing motif quantifications.

Details

Here is a comprehensive comparison of the input experiment and the returned experiment:

Sample information: Sample information doesn't change.

Variable information: Firstly, we define the "base variables" as the unique combination of all columns in the variable information tibble except for "variable", "glycan_composition", and "glycan_structure". The new var_info would be a Cartesian product of all "base variables" and all motifs. For glycomics data, no "base variable" is defined, so the resulted var_info only contains the "motif" column.

Expression matrix: Rows are variables, columns are samples, same as before. Filling the cells are the quantifications for motifs on different glycosites in each sample, instead of quantifications of glycoforms or glycopeptides. Or just motif quantification in each sample, for glycomics data.

See also