Skip to contents

Normalizes ATAC-seq data using constitutive peaks (peaks that are consistently active across cell types) as reference points.

Usage

normalize_const(
  peaks,
  mat,
  anchor_cell_type = NULL,
  norm_quant = 1,
  scaling_quant = 0.9
)

Arguments

peaks

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

mat

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

anchor_cell_type

Character or NULL. The cell type to use as reference for normalization. If NULL, uses the mean of all cell types as reference. Default: NULL

norm_quant

Numeric. Quantile used for primary normalization step. Default: 1

scaling_quant

Numeric. Quantile used for final scaling step. Default: 0.9

Value

A normalized matrix with the same dimensions as the input, where cell type-specific biases have been corrected using constitutive peaks as reference

Details

The normalization process:

  1. Calculates total signal in constitutive peaks for each cell type

  2. Normalizes using either a specific cell type or mean of all cell types as reference

  3. Applies quantile-based normalization to standardize signal ranges

  4. Caps values at 1 and applies final scaling

This approach assumes that constitutive peaks are highly accesible in all cell types and can be used as a reference.

See also

normalize_regional for prior normalization step, normalize_to_prob for subsequent probability normalization

Examples

if (FALSE) { # \dontrun{
# Using mean of all cell types as reference
norm_const_mat <- normalize_const(peaks_df, norm_mat)

# Using specific anchor cell type
norm_const_mat <- normalize_const(
    peaks_df,
    norm_mat,
    anchor_cell_type = "CD4_T",
    norm_quant = 0.95,
    scaling_quant = 0.9
)
} # }