Skip to contents

The function calculates the (punctured) marginal coverage in window_size windows around each peak, and then normalizes the data by dividing the original data by the punctured marginal coverage, while setting the minimum to minimal_quantile of the punctured marginal coverage.

Usage

normalize_egc(
  mcatac,
  marginal_track,
  window_size = 10000,
  epsilon = 0.00001,
  minimal_quantile = 0.1
)

Arguments

mcatac

The McPeaks object containing the data to be normalized.

marginal_track

The marginal track

epsilon

The epsilon value added to the egc matrix (default is 1e-5).

widnow_size

The size of the windows to use around each peak for normalization.

Value

The McPeaks object with normalized egc values.

Examples

if (FALSE) {
mcatac <- import_from_matrix(mat, peaks, genome = "hg38", class = "McPeaks")
mcatac <- normalize_egc(mcatac, "pbmc_mc.marginal")
}