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,
betabinom = FALSE,
rho = NULL
)A DsASC object (WASP-filtered, peak-annotated).
Minimum total coverage (ref+alt) required to test a site in a sample (default 10).
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.
Logical. If FALSE (default), sites are tested with a
binomial test against 0.5, as in Calderon et al. If
TRUE, a beta-binomial test is used, which accounts
for overdispersion.
Overdispersion of the beta-binomial test, between 0 and 1.
Either a single value used for all samples, a named
vector with one value per sample, or NULL
(default) to estimate it per sample. Ignored when
betabinom = FALSE.
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.
With betabinom = TRUE it also contains the overdispersion
rho used for each sample.
The binomial test assumes that read counts vary around 0.5 only through
sampling. Real data are usually overdispersed: allele fractions vary between
sites more than binomial sampling allows, which makes the binomial test
anti-conservative. With betabinom = TRUE each site is instead tested
with a beta-binomial distribution centred on 0.5, whose overdispersion
rho is estimated per sample by maximum likelihood across all tested
sites, unless supplied. Because the estimate includes truly imbalanced sites,
it is slightly inflated, which makes the test conservative. As rho
approaches 0 the beta-binomial test reduces to the binomial one.
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.