`aggregateRegionCounts-DsATAC-method.Rd`

Agregate counts across a set of regions, e.g. for footprinting analysis

```
# S4 method for DsATAC
aggregateRegionCounts(
.object,
regionGr,
samples = getSamples(.object),
countAggrFun = "sum",
norm = "tailMean",
normTailW = 0.1,
kmerBiasAdj = TRUE,
k = 6,
sampleCovg = NULL,
sampleKmerFreqM = NULL,
regionKmerFreqM = NULL,
silent = FALSE
)
```

- .object
`DsATAC`

object- regionGr
`GRanges`

object specifying the regions to aggregate over- samples
sample identifiers

- countAggrFun
aggration function to be used for summarizing the insertion counts at each position. Possible values include

`"sum"`

,`"mean"`

, and`"median"`

- norm
method used for normalizing the resulting position-wise counts. Currently only

`'tailMean'`

is supported, which computes normalization factors as the mean signal in the tails of the window- normTailW
fraction of the region window to be used on each side of the window to be used for normalization if

`norm`

is one of`'tailMean'`

- kmerBiasAdj
compute Tn5 bias and use it to adjust the counts as in Corces, et al., Science, (2018)

- k
length of the kmer to be used for sequence bias correction. Only relevant if

`kmerBiasAdj==TRUE`

.- sampleCovg
to save compute time, a sample coverage track list (as computed by

`getCoverage(.object)`

) can be supplied. If not, it will be computed on the fly.- sampleKmerFreqM
to save compute time, a matrix of sample kmer frequency at insertion sites (as computed by

`getInsertionKmerFreq(.object, ...)`

) can be supplied. If not, it will be computed on the fly. Only relevant if`kmerBiasAdj==TRUE`

.- regionKmerFreqM
to save compute time, a matrix of region kmer frequencies (kmers X window width). Must have the same number of rows as the specified (or computed)

`sampleKmerFreqM`

(kmers) and the same number of columns as the window width (median width of`regionGr`

). Only relevant if`kmerBiasAdj==TRUE`

.- silent
limit log messages

a `data.frame`

containing position-wise counts (raw, normalized and optionally Tn5-bias-corrected) for each sample