The observed activity is the net read fraction toward the predicted stronger-binding allele: $$obs = \frac{\sum_i (H_i - L_i)}{\sum_i (H_i + L_i)}$$ bounded in [-1, 1]; obs > 0 means the predicted-binder allele is preferentially accessible. Significance is assessed with an orientation-permutation null: each site's H/L assignment is flipped with probability 0.5 (a Rademacher sign flip), which is the exact null of "predicted binding is unrelated to which allele is accessible". This is vectorised as a single matrix multiply over nPerm sign draws.

ascActivityStat(H, L, nPerm = 2000L, seed = NULL)

Arguments

H, L

oriented count vectors (from ascOrientReads).

nPerm

number of orientation permutations (default 2000).

seed

optional RNG seed for reproducibility.

Value

list(obs, z, p, meanNull, sdNull, nSites).

Author

Irem B. GUNDUZ