Normalization Module

Types

Type Description

MorResult

Summary of the median of ratios (mor) normalization with normed data, determined correctionfactors, and transformation function.

Functions and values

Function or value Description

medianOfRatios data

Full Usage: medianOfRatios data

Parameters:
    data : Matrix<float> - data matrix with columns as features (samples,time points) and rows as measured entities (genes,proteins).

Returns: MorResult Normalized data matrix with correction factors and normalization function.

Median of ratios normalization As used by Deseq2, see: https://github.com/hbctraining/DGE_workshop/blob/master/lessons/02_DGE_count_normalization.md . Rows are genes, columns are samples

data : Matrix<float>

data matrix with columns as features (samples,time points) and rows as measured entities (genes,proteins).

Returns: MorResult

Normalized data matrix with correction factors and normalization function.

Example

 
   // raw data with proteins as rows and samples as columns
   let myData = Matrix.init 500 5 (fun _ _ -> rnd.NextDouble())
   let normedData = Normalization.medianOfRatios myData

medianOfRatiosBy f data

Full Usage: medianOfRatiosBy f data

Parameters:
    f : float -> float - The transformation function is applied on all values of the matrix before calculating the normalization factors.
    data : Matrix<float> - data matrix with columns as features (samples,time points) and rows as measured entities (genes,proteins).

Returns: MorResult Normalized data matrix with correction factors and normalization function.

Median of ratios normalization As used by Deseq2, see: https://github.com/hbctraining/DGE_workshop/blob/master/lessons/02_DGE_count_normalization.md . Rows are genes, columns are samples

f : float -> float

The transformation function is applied on all values of the matrix before calculating the normalization factors.

data : Matrix<float>

data matrix with columns as features (samples,time points) and rows as measured entities (genes,proteins).

Returns: MorResult

Normalized data matrix with correction factors and normalization function.

Example

 
   // raw data with proteins as rows and samples as columns
   let myData = Matrix.init 500 5 (fun _ _ -> rnd.NextDouble())
   let normedData = Normalization.medianOfRatiosBy (fun x -> ln (x+1)) myData

medianOfRatiosWide data

Full Usage: medianOfRatiosWide data

Parameters:
    data : Matrix<float> - data matrix with columns as measured entities and rows as features (samples,time points) (genes,proteins).

Returns: MorResult Normalized data matrix with correction factors and normalization function.

Median of ratios normalization As used by Deseq2, see: https://github.com/hbctraining/DGE_workshop/blob/master/lessons/02_DGE_count_normalization.md . Columns are genes, rows are samples

data : Matrix<float>

data matrix with columns as measured entities and rows as features (samples,time points) (genes,proteins).

Returns: MorResult

Normalized data matrix with correction factors and normalization function.

Example

 
   // raw data with proteins as columns and samples as rows
   let myData = Matrix.init 5 500 (fun _ _ -> rnd.NextDouble())
   let normedData = Normalization.medianOfRatiosWide myData

medianOfRatiosWideBy f data

Full Usage: medianOfRatiosWideBy f data

Parameters:
    f : float -> float - The transformation function is applied on all values of the matrix before calculating the normalization factors.
    data : Matrix<float> - data matrix with columns as measured entities and rows as features (samples,time points) (genes,proteins).

Returns: MorResult Normalized data matrix with correction factors and normalization function.

Median of ratios normalization As used by Deseq2, see: https://github.com/hbctraining/DGE_workshop/blob/master/lessons/02_DGE_count_normalization.md . Columns are genes, rows are samples

f : float -> float

The transformation function is applied on all values of the matrix before calculating the normalization factors.

data : Matrix<float>

data matrix with columns as measured entities and rows as features (samples,time points) (genes,proteins).

Returns: MorResult

Normalized data matrix with correction factors and normalization function.

Example

 
   // raw data with proteins as columns and samples as rows
   let myData = Matrix.init 5 500 (fun _ _ -> rnd.NextDouble())
   let normedData = Normalization.medianOfRatiosWideBy (fun x -> ln (x+1)) myData

quantile data

Full Usage: quantile data

Parameters:
    data : Matrix<float> - data matrix with columns as measured entities and rows as features (samples,time points) (genes,proteins).

Returns: Matrix<float> Normalized data matrix.

Quantile normalization with equal number of elements (rows) for each sample (column). Column mean and column standard deviation are qual after normalization. Rows are genes, columns are samples.

data : Matrix<float>

data matrix with columns as measured entities and rows as features (samples,time points) (genes,proteins).

Returns: Matrix<float>

Normalized data matrix.

Example

 
   // raw data with proteins as rows and samples as columns
   let myData = Matrix.init 500 5 (fun _ _ -> rnd.NextDouble())
   let normedData = Normalization.quantile myData

zScoreTransform yVal

Full Usage: zScoreTransform yVal

Parameters:
Returns: Vector<float> transformed yData in unchanged order

z score normalization/transformation using the sample standard deviation. Rarely used since variance is not equal to 1.

Bortz J., Schuster C., Statistik für Human- und Sozialwissenschaftler, 7 (2010), p. 35

yVal : Vector<float>
Returns: Vector<float>

transformed yData in unchanged order

Example

 
   // transform data, such that data has zero mean and sample standard deviation of 1
   Normalization.zScoreTransform (vector [|1.1;5.3;-9.0;13.2;17.3;-2.3|])

zScoreTransformPopulation yVal

Full Usage: zScoreTransformPopulation yVal

Parameters:
Returns: Vector<float> transformed yData in unchanged order

z score normalization/transformation using the population standard deviation.

Bortz J., Schuster C., Statistik für Human- und Sozialwissenschaftler, 7 (2010), p. 35

yVal : Vector<float>
Returns: Vector<float>

transformed yData in unchanged order

Example

 
   // transform data, such that data has zero mean and population standard deviation of  
   Normalization.zScoreTransformPopulation (vector [|1.1;5.3;-9.0;13.2;17.3;-2.3|])