
Create comparison scatter plots showing normalization effects between two cell types
plot_cell_type_normalization_scatter.Rd
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.
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:
Raw ATAC signal (log2 transformed)
Region-normalized signal
Constitutive peak-normalized signal
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
)
} # }