median_normalization: Column wise median normalization of the data matrix

Description Usage Arguments Value Examples

View source: R/normalization.R

Description

The method calculates for each sample the median change (i.e. the difference between the observed value and the row average) and subtracts it from each row. Missing values are ignored in the procedure. The method is based on the assumption that a majority of the rows did not change.

Usage

1
median_normalization(X, spike_in_rows = NULL)

Arguments

X

a matrix or SummarizedExperiment of proteins and samples

spike_in_rows

a numeric or boolean vector that is used to to normalize the intensities across samples. Default: NULL which means that all rows are used.

Value

the normalized matrix

Examples

1
2
3
4
5
6
  syn_data <- generate_synthetic_data(n_proteins = 10)
  normalized_data <- median_normalization(syn_data$Y)
  normalized_data
  
  # If we assume that the first 5 proteins are spike-ins
  normalized_data2 <- median_normalization(syn_data$Y, spike_in_rows = 1:5)

proDA documentation built on Nov. 8, 2020, 5:01 p.m.