Skip to contents

This function automatically selects and applies the most suitable normalization method for the given dataset. If Quality Control (QC) samples are present, the method that best stabilizes them (i.e., yields the lowest median coefficient of variation) is chosen. Otherwise, it defaults to median normalization for glycoproteomics data, and total area normalization for glycomics data.

Usage

auto_normalize(
  exp,
  group_col = "group",
  qc_name = "QC",
  to_try = NULL,
  info = NULL
)

Arguments

exp

An glyexp::experiment().

group_col

The column name in sample_info for groups. Default is "group". Can be NULL when no group information is available.

qc_name

The name of QC samples in the group_col column. Default is "QC". Only used when group_col is not NULL. Can be NULL when no QC samples are available.

to_try

Normalization functions to try when QC samples are present. A list. Default includes:

info

Internal parameter used by auto_clean().

Value

The normalized experiment.

Details

When QC samples are available, the function benchmarks all normalization methods in to_try and selects the one with the lowest median coefficient of variation (CV) among QC samples. Methods that fail are skipped with a warning.

Examples

library(glyexp)
exp_normed <- auto_normalize(real_experiment)
#>  No QC samples found. Using default normalization method based on experiment type.
#>  Experiment type is "glycoproteomics". Using `normalize_median()`.