Tests for allele-specific chromatin accessibility at each heterozygous site, following Calderon et al., Nat. Genet. 2019. After WASP filtering (which removes reference mapping bias), each site is tested with a two-sided binomial test against the null hypothesis of a 50:50 ref:alt split. Multiple-testing correction (Benjamini-Hochberg) is applied PER SAMPLE.

calcASCStatistics(dsObj, minCoverage = 10, minAllele = 2)

Arguments

dsObj

A DsASC object (WASP-filtered, peak-annotated).

minCoverage

Minimum total coverage (ref+alt) required to test a site in a sample (default 10).

minAllele

Minimum reads required on EACH allele (min(ref, alt)) for a site-sample to be tested (default 2). At low coverage the only calls that reach significance against 0.5 are the most extreme imbalances, with minor allele = 0; those are low-confidence "pseudo-ASC" that inflate the ref skew and the significant count. Requiring >= 2 reads on both alleles is the standard ASE/ASC guard and keeps calls two-sided.

Value

A data.table with one row per tested (snp x sample): ref, alt, total, log2FC (alt vs ref effect size), pVal, fdr (per-sample BH), and peakId.

Details

Note: the null is a fixed p = 0.5. WASP is responsible for removing mapping bias upstream; re-centering the null on the observed (pooled) allele fraction is NOT done, because (a) it conflates allele identity across donors, and (b) it would calibrate the null against the very ASC signal being detected.