Skip to contents

Creates a series of scatter plots comparing ATAC-seq signals between two cell types at each stage of the normalization process. The plots show raw signals, regional normalization, constitutive peak normalization, and probability normalization in a single combined figure.

Usage

plot_cell_type_normalization_scatter(
  obj,
  cell_type1,
  cell_type2,
  peaks_f = NULL
)

Arguments

obj

List. A preprocessed ATAC-seq data object, output from preprocess_data

cell_type1

Character. Name of the first cell type to plot (x-axis)

cell_type2

Character. Name of the second cell type to plot (y-axis)

peaks_f

Logical vector or NULL. Optional filter for selecting specific peaks. If NULL, all peaks are used. Default: NULL

Value

A ggplot2 object containing four scatter plots arranged horizontally using patchwork, showing the progression of normalization effects

Details

The function creates four scatter plots showing:

  1. Raw ATAC signal (log2 transformed)

  2. Region-normalized signal

  3. Constitutive peak-normalized signal

  4. Probability-normalized signal

Each plot includes:

  • Points colored by peak type (constitutive vs variable)

  • A diagonal reference line

See also

normalize_regional, normalize_const, normalize_to_prob for the normalization methods being visualized

Examples

if (FALSE) { # \dontrun{
# Basic usage comparing two cell types
p <- plot_cell_type_normalization_scatter(
    atac_obj,
    cell_type1 = "CD4_T",
    cell_type2 = "CD8_T"
)

# Plot specific peaks using a filter
p <- plot_cell_type_normalization_scatter(
    atac_obj,
    cell_type1 = "CD4_T",
    cell_type2 = "CD8_T",
    peaks_f = atac_obj$peaks$tss_dist < 1000
)
} # }