R/DsASC-tfactivity.R
ascTFActivity.RdPools reads across the requested samples, orients each ASC SNP toward its
predicted stronger-binding allele using deltaDt, and computes the
ascActivityStat per transcription factor. Only sites whose
absolute PWM delta exceeds prefDelta (i.e. the motif is actually
disrupted) and whose pooled coverage reaches minReads are used.
ascTFActivity(
refMat,
altMat,
deltaDt,
sampleIds,
prefDelta = 1,
minReads = 4L,
minSites = 10L,
nPerm = 2000L,
seed = 42L,
label = NA_character_
)count matrices [snp x sample] (e.g. from
mergeDsASCArray).
data.table with columns snpId, tf,
delta (PWM score alt - ref), as produced by the
motif-scoring step of the driver script.
samples to pool over (a condition, lineage, etc.).
|delta| threshold to count a site as motif-disrupting (default 1.0, matching 03_tf_binding.R).
minimum pooled coverage (H+L) to keep a site (default 4).
minimum number of usable sites to report a TF (default 10).
permutations for the null (default 2000).
RNG seed (default 42).
optional context label copied into the output column
context.
data.table: tf, context, nSites, obs, z, p, fdr (BH over TFs), meanNull, sdNull.