Skip to contents

Transforms normalized ATAC-seq signals into probability-like values between 0 and 1, using either a specified threshold or a quantile of constitutive peak values to determine the maximum signal level.

Usage

normalize_to_prob(peaks, mat, prob1_thresh = NULL, const_quantile = 0.9)

Arguments

peaks

A data frame with peak intervals and a logical 'const' column for constitutive peaks

mat

Numeric matrix. The matrix to normalize (typically output from normalize_const)

prob1_thresh

Numeric or NULL. Signal threshold for probability = 1. If NULL, calculated from constitutive peaks using const_quantile. Default: NULL

const_quantile

Numeric. Quantile of constitutive peak values to use as threshold when prob1_thresh is NULL. Default: 0.9

Value

A matrix with the same dimensions as the input, containing probability-like values between 0 and 1

Details

The normalization process:

  1. Determines threshold for probability = 1 (either directly or from constitutive peaks)

  2. Divides all values by this threshold

  3. Caps values at 1

  4. Applies min-max normalization to ensure full 0,1 range utilization

Warning

If prob1_thresh is NULL, the peaks data frame must include a logical 'const' column. The function will stop with an error if this column is missing.

See also

normalize_regional, normalize_const for prior normalization steps

Examples

if (FALSE) { # \dontrun{
# Using constitutive peak quantile
prob_mat <- normalize_to_prob(peaks_df, norm_const_mat)

# Using specific threshold
prob_mat <- normalize_to_prob(
    peaks_df,
    norm_const_mat,
    prob1_thresh = 0.75,
    const_quantile = 0.95
)
} # }