normalize_istd: Normalize each class by its corresponding internal...

View source: R/normalize.R

normalize_istdR Documentation

Normalize each class by its corresponding internal standard(s).

Description

Normalize each class by its corresponding internal standard(s). Lipid classes are normalized using corresponding internal standard(s) of the same lipid class. If no corresponding internal standard is found the average of all measured internal standards is used instead.

Usage

normalize_istd(data, measure = "Area", exclude = "blank", log = TRUE)

Arguments

data

LipidomicsExperiment object.

measure

Which measure to use as intensity, usually Area, Area Normalized or Height. Default is Area.

exclude

Samples to exclude, can be either:
"blank" - automatically detected blank samples and exclude them logical vector with the same length as samples. Default.

log

whether the normalized values should be log2 transformed. Default is TRUE.

Value

A LipidomicsExperiment object with normalized values. Each molecule is normalized against the internal standard from the same class.

Examples

datadir <- system.file("extdata", package = "lipidr")
filelist <- list.files(datadir, "data.csv", full.names = TRUE)
d <- read_skyline(filelist)
clinical_file <- system.file("extdata", "clin.csv", package = "lipidr")
d <- add_sample_annotation(d, clinical_file)
d_summarized <- summarize_transitions(d, method = "average")

# Normalize data that have been summarized (single value per molecule).
data_norm_istd <- normalize_istd(
  d_summarized,
  measure = "Area", exclude = "blank", log = TRUE
)

ahmohamed/lipidr documentation built on July 7, 2023, 2:22 a.m.