normalize_LFM_iteratively: Normalize a ligation frequency matrix with iterative...

Description Usage Arguments Value Examples

View source: R/normalization.R

Description

A binned or unbinned ligation frequency matrix (LFM) is normalized using iterative proportional fitting (IPF).

Usage

1
normalize_LFM_iteratively(LFM, numberOfIterations, plotLoss = FALSE)

Arguments

LFM

A sparse ligation frequency matrix (LFM) with binned or unbinned data.

numberOfIterations

The number of iterations for normalization. Usually, 20 should be more than enough.

plotLoss

Optional boolean parameter, to determine if the loss function should be plotted. Defaults to FALSE.

Value

A list containing the normalized, triangular matrix finalLFM, the dataframes with the row sums IPFrowsums and the column sums IPFcolsums of every iteration, and a vector with the loss function for every iteration lossFunction.

Examples

1
2
3
M <- matrix(c(3,0,0,0,7,0,1,9,7),3,3)
M <- Matrix::Matrix(M, sparse = TRUE)
normalizedLFM <- normalize_LFM_iteratively(M, 10)

AnnikaGable/chromium documentation built on May 5, 2019, 6:04 a.m.