background-peak-selection-normalization
Summary
Select GC content and accessibility-matched background peaks to normalize bias-corrected deviation scores in chromatin accessibility analysis. This normalization step removes technical artifacts and ensures that motif deviation scores reflect true biological variability rather than GC or sequencing depth confounds.
When to use
After computing expected accessibility from filtered peak and sample counts, and before computing final deviation scores. Use this skill when working with sparse ATAC-seq or DNase-seq data where GC bias and accessibility depth are known confounders of motif-associated variability.
When NOT to use
- Input peaks are already aggregated or bulk-level; background-peak normalization is designed for single-cell or sample-level sparse data.
- No GC bias annotations are available in rowData; addGCBias() must be applied first.
- You are computing raw accessibility counts rather than motif-associated variability; use filterPeaks and filterSamples alone if the goal is QC, not deviation scoring.
Inputs
- SummarizedExperiment object with filtered peak counts and rowData containing GC bias annotations
- Pre-computed expected accessibility values (from computeExpectations)
- Matrix of motif-to-peak matches (from matchMotifs)
Outputs
- chromVARDeviations object (SummarizedExperiment) with two assays: deviations and deviationScores
- Normalized motif deviation scores (rows = motifs, columns = samples/cells)
How to apply
Generate background peak sets using getBackgroundPeaks() to obtain peaks matched for GC content and accessibility level to each observed peak. These background peaks serve as control annotations for normalization. Pass the background peaks to computeDeviations() along with the motif-peak matches, filtered counts, and pre-computed expectations. The function will compute deviation scores as the difference between observed motif variability and the expected variability estimated from background peaks, thereby correcting for GC bias and sequencing depth effects. Validate that the deviation assay shows a reasonable distribution (e.g., mean near 0, standard deviation around 1) and that results are reproducible across independent background peak selections.
Related tools
- chromVAR (Provides getBackgroundPeaks() and computeDeviations() functions for background-based normalization of motif deviations) — https://github.com/GreenleafLab/chromVAR
- SummarizedExperiment (Data structure holding filtered counts, GC bias annotations, and output deviation assays)
- motifmatchr (Provides matchMotifs() output (peak-to-motif match matrix) required as input to computeDeviations()) — https://github.com/GreenleafLab/motifmatchr
Examples
dev <- computeDeviations(object = counts_filtered, annotations = motif_ix, background_peaks = bg_peaks)
Evaluation signals
- Deviation assay has correct dimensions (motif count = rows, sample count = columns)
- Deviation scores have mean approximately 0 and standard deviation approximately 1 (normalized distribution)
- deviationScores assay exists and contains z-score or similar standardized values
- Motifs with strong expected deviation from background show higher absolute deviation scores than low-variance motifs
- Re-running with different random background peak selections produces highly correlated deviation scores (robustness check)
Limitations
- Background peak selection relies on sufficient peak density for robust GC and accessibility matching; sparse peak sets may yield unreliable background pools.
- Assumes that GC content and overall accessibility are the primary technical confounders; other sources of bias (e.g., library complexity, batch effects) are not directly corrected.
- Method is sensitive to the quality of the input expectations and motif-peak matches; errors in filterSamples, filterPeaks, or matchMotifs will propagate to deviation scores.
- No changelog documented for chromVAR; reproducibility across versions may require explicit version pinning.
Evidence
- [other] Generate background peaks using getBackgroundPeaks() to obtain GC and accessibility-matched peak sets for normalization.: "Generate background peaks using getBackgroundPeaks() to obtain GC and accessibility-matched peak sets for normalization"
- [other] The computeDeviations function returns a SummarizedExperiment object containing deviation scores that quantify motif-associated variability in chromatin accessibility across samples: "The computeDeviations function returns a SummarizedExperiment object containing deviation scores that quantify motif-associated variability in chromatin accessibility across samples"
- [other] Compute bias-corrected deviations using computeDeviations() with filtered counts, motif matches, background peaks, and computed expectations to produce the final chromVARDeviations object.: "Compute bias-corrected deviations using computeDeviations() with filtered counts, motif matches, background peaks, and computed expectations to produce the final chromVARDeviations object"
- [readme] The package aims to identify motifs or other genomic annotations associated with variability in chromatin accessibility between individual cells or samples: "aims to identify motifs or other genomic annotations associated with variability in chromatin accessibility between individual cells or samples"
- [other] Validate output structure (two assays: deviations and deviationScores), row count (motif count), column count (sample count), and score distributions.: "Validate output structure (two assays: deviations and deviationScores), row count (motif count), column count (sample count), and score distributions"
1---2name: background-peak-selection-normalization3description: Use when after computing expected accessibility from filtered peak and sample counts, and before computing final deviation scores. Use this skill when working with sparse ATAC-seq or DNase-seq data where GC bias and accessibility depth are known confounders of motif-associated variability.4license: CC-BY-4.05---67# background-peak-selection-normalization89## Summary1011Select GC content and accessibility-matched background peaks to normalize bias-corrected deviation scores in chromatin accessibility analysis. This normalization step removes technical artifacts and ensures that motif deviation scores reflect true biological variability rather than GC or sequencing depth confounds.1213## When to use1415After computing expected accessibility from filtered peak and sample counts, and before computing final deviation scores. Use this skill when working with sparse ATAC-seq or DNase-seq data where GC bias and accessibility depth are known confounders of motif-associated variability.1617## When NOT to use1819- Input peaks are already aggregated or bulk-level; background-peak normalization is designed for single-cell or sample-level sparse data.20- No GC bias annotations are available in rowData; addGCBias() must be applied first.21- You are computing raw accessibility counts rather than motif-associated variability; use filterPeaks and filterSamples alone if the goal is QC, not deviation scoring.2223## Inputs2425- SummarizedExperiment object with filtered peak counts and rowData containing GC bias annotations26- Pre-computed expected accessibility values (from computeExpectations)27- Matrix of motif-to-peak matches (from matchMotifs)2829## Outputs3031- chromVARDeviations object (SummarizedExperiment) with two assays: deviations and deviationScores32- Normalized motif deviation scores (rows = motifs, columns = samples/cells)3334## How to apply3536Generate background peak sets using getBackgroundPeaks() to obtain peaks matched for GC content and accessibility level to each observed peak. These background peaks serve as control annotations for normalization. Pass the background peaks to computeDeviations() along with the motif-peak matches, filtered counts, and pre-computed expectations. The function will compute deviation scores as the difference between observed motif variability and the expected variability estimated from background peaks, thereby correcting for GC bias and sequencing depth effects. Validate that the deviation assay shows a reasonable distribution (e.g., mean near 0, standard deviation around 1) and that results are reproducible across independent background peak selections.3738## Related tools3940- **chromVAR** (Provides getBackgroundPeaks() and computeDeviations() functions for background-based normalization of motif deviations) — https://github.com/GreenleafLab/chromVAR41- **SummarizedExperiment** (Data structure holding filtered counts, GC bias annotations, and output deviation assays)42- **motifmatchr** (Provides matchMotifs() output (peak-to-motif match matrix) required as input to computeDeviations()) — https://github.com/GreenleafLab/motifmatchr4344## Examples4546```47dev <- computeDeviations(object = counts_filtered, annotations = motif_ix, background_peaks = bg_peaks)48```4950## Evaluation signals5152- Deviation assay has correct dimensions (motif count = rows, sample count = columns)53- Deviation scores have mean approximately 0 and standard deviation approximately 1 (normalized distribution)54- deviationScores assay exists and contains z-score or similar standardized values55- Motifs with strong expected deviation from background show higher absolute deviation scores than low-variance motifs56- Re-running with different random background peak selections produces highly correlated deviation scores (robustness check)5758## Limitations5960- Background peak selection relies on sufficient peak density for robust GC and accessibility matching; sparse peak sets may yield unreliable background pools.61- Assumes that GC content and overall accessibility are the primary technical confounders; other sources of bias (e.g., library complexity, batch effects) are not directly corrected.62- Method is sensitive to the quality of the input expectations and motif-peak matches; errors in filterSamples, filterPeaks, or matchMotifs will propagate to deviation scores.63- No changelog documented for chromVAR; reproducibility across versions may require explicit version pinning.6465## Evidence6667- [other] Generate background peaks using getBackgroundPeaks() to obtain GC and accessibility-matched peak sets for normalization.: "Generate background peaks using getBackgroundPeaks() to obtain GC and accessibility-matched peak sets for normalization"68- [other] The computeDeviations function returns a SummarizedExperiment object containing deviation scores that quantify motif-associated variability in chromatin accessibility across samples: "The computeDeviations function returns a SummarizedExperiment object containing deviation scores that quantify motif-associated variability in chromatin accessibility across samples"69- [other] Compute bias-corrected deviations using computeDeviations() with filtered counts, motif matches, background peaks, and computed expectations to produce the final chromVARDeviations object.: "Compute bias-corrected deviations using computeDeviations() with filtered counts, motif matches, background peaks, and computed expectations to produce the final chromVARDeviations object"70- [readme] The package aims to identify motifs or other genomic annotations associated with variability in chromatin accessibility between individual cells or samples: "aims to identify motifs or other genomic annotations associated with variability in chromatin accessibility between individual cells or samples"71- [other] Validate output structure (two assays: deviations and deviationScores), row count (motif count), column count (sample count), and score distributions.: "Validate output structure (two assays: deviations and deviationScores), row count (motif count), column count (sample count), and score distributions"