The goal of glystats is to perform statistical analysis on glycoproteomics and glycomics data. It works seamlessly with the glyexp package.
We recommend installing the meta-package glycoverse, which includes this package and other core glycoverse packages.
If you don’t want to install all glycoverse packages, you can only install glystats.
You can install the latest release of glystats from r-universe (recommended):
# install.packages("pak")
pak::repo_add(glycoverse = "https://glycoverse.r-universe.dev")
pak::pkg_install("glystats")
Or from GitHub:
pak::pkg_install("glycoverse/glystats@*release")
Or install the development version (NOT recommended):
pak::pkg_install("glycoverse/glystats")
Note: Tips and troubleshooting for the meta-package glycoverse are also applicable here: Installation of glycoverse.
All expression-analysis functions accept log_transform. Existing defaults
are preserved: it is TRUE for differential tests, correlation, clustering,
dimension reduction, supervised models, and set testing; it is FALSE for
gly_cox(), gly_roc(), and gly_fold_change().
# Skip a second transformation when expression values are already transformed.
pca <- gly_pca(exp, log_transform = FALSE)
# Opt in for a model that previously used untransformed expression.
cox <- gly_cox(exp, log_transform = TRUE)
PCA, PLS-DA, OPLS-DA, t-SNE, and UMAP preserve log(x + 1);
other analyses use log2(x + 1e-6) when enabled. Set testing uses the same
choice for automatic set construction and inference. Model estimates and
effect sizes reflect the selected analysis scale. Differential-test fold
changes still use the original supplied values; disabling transformation
does not tell these functions to back-transform already logged inputs.
For limma, the existing log2fc column contains model contrasts and is only
a log2 fold change when the supplied analysis scale is log2.
For gly_fold_change(), FALSE retains the log2 ratio of arithmetic group
means. TRUE reports the difference of mean log2-transformed values, the
log2 ratio of geometric means of x + 1e-6, rather than a ratio of logarithms.
Result extraction and significance-filtering utilities do not transform
expression and have no log_transform argument.
glycoverse
glystats is the downstream analysis package in the glycoverse
ecosystem. It provides statistical analysis functions for
glyexp::GlycomicSE and glyexp::GlycoproteomicSE objects. A common
workflow is to use glyread to
import data, glyclean to
preprocess data, and then glystats to perform statistical analysis.
Say we already have a preprocessed glycomics or glycoproteomics
container called exp:
# Two-sample t-test
ttest_res <- gly_ttest(exp)
# PCA analysis
pca_res <- gly_pca(exp)
# ROC analysis
roc_res <- gly_roc(exp)
That’s it! These functions use glycoverse column conventions to load
needed data and perform analysis. All functions start with gly_ to
leverage the auto-completion in RStudio. They accept a
glyexp::GlycomicSE or glyexp::GlycoproteomicSE object, and return
analysis result as a tibble or a list of tibbles. See documentation for
each function for more details.