Calderon et al. count and test allele-specific chromatin at the level of a biological sample (a donor x cell-type x condition), merging technical replicate libraries. Our per-library ATAC objects instead carry each replicate as its own column, which halves the reads per binomial test and sharply reduces power (median per-test coverage ~17 vs a paper-comparable ~34). This function sums ref/alt counts across libraries that share the same groupCols, reproducing the paper's per-sample unit before testing.

ascPoolReplicates(
  refMat,
  altMat,
  annot,
  groupCols = c("cellType", "stimulus", "donor"),
  verbose = TRUE
)

Arguments

refMat, altMat

count matrices [snp x library].

annot

sample annotation with sampleId plus groupCols.

groupCols

columns defining a biological sample (default c("cellType","stimulus","donor")).

verbose

log the collapse (default TRUE).

Value

list(ref, alt, annot): pooled matrices [snp x biological-sample] and a one-row-per-sample annotation whose sampleId is the group key.

Author

Irem B. GUNDUZ