median_normalization {proDA} | R Documentation

## Column wise median normalization of the data matrix

### 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

    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

      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)

[Package proDA version 1.8.0 Index]