Skip to contents

The data container of a glycoproteomics or glycomics experiment. Expression matrix, sample information, and variable information are required then will be managed by the experiment object. It acts as the data core of the glycoverse ecosystem.

The glyexp package provides a set of functions to create, manipulate, and analyze experiment() objects in a tidyverse style.

Usage

experiment(expr_mat, sample_info, var_info, exp_type, glycan_type, ...)

Arguments

expr_mat

An expression matrix with samples as columns and variables as rows.

sample_info

A tibble with a column named "sample", and other columns other useful information about samples, e.g. group, batch, sex, age, etc.

var_info

A tibble with a column named "variable", and other columns other useful information about variables, e.g. protein name, peptide, glycan composition, etc.

exp_type

The type of the experiment, "glycomics" or "glycoproteomics".

glycan_type

The type of glycan, "N" or "O".

...

Other meta data about the experiment.

Value

A experiment(). If the input data is wrong, an error will be raised.

Details

Requirements of the input data

colnames(expr_mat) should be identical to sample_info$sample, and rownames(expr_mat) should be identical to var_info$variable. Both "sample" and "variable" columns should be unique. Order doesn't matter, as the expression matrix will be reordered to match the order of sample_info$sample and var_info$variable.

Meta data

Other meta data can be added to the meta_data attribute. meta_data is a list of additional information about the experiment. Two meta data fields are required:

  • exp_type: "glycomics" or "glycoproteomics"

  • glycan_type: "N" or "O"

Other meta data will be added by other glycoverse packages for their own purposes.

Examples

expr_mat <- matrix(runif(9), nrow = 3, ncol = 3)
colnames(expr_mat) <- c("S1", "S2", "S3")
rownames(expr_mat) <- c("V1", "V2", "V3")
sample_info <- tibble::tibble(sample = c("S1", "S2", "S3"), group = c("A", "B", "A"))
var_info <- tibble::tibble(variable = c("V1", "V2", "V3"), protein = c("P1", "P2", "P3"))
experiment(
  expr_mat, sample_info, var_info,
  exp_type = "glycoproteomics",
  glycan_type = "N"
)
#> 
#> ── Experiment ──────────────────────────────────────────────────────────────────
#>  Expression matrix: 3 samples, 3 variables
#>  Sample information fields: group
#>  Variable information fields: protein