For a candidate peak of the given width with k ChIP tags, the
uniform background rate lambda_BG is replaced by the dynamic
\(\lambda_{local} = \max(\lambda_{BG}, [\lambda_{1k},]
\lambda_{5k}, \lambda_{10k})\), where \(\lambda_{Xk}\) is the
control tag count of the X-kb window centred on the peak rescaled
to the peak width (count * width / X000). When no control sample
exists the 1 kb term is omitted (use_1k = FALSE). The peak
p-value is the Poisson upper tail \(P(X \ge k)\) under
lambda_local and fold_enrichment is k / lambda_local.
Usage
Chipsq(
count,
width,
lambda_bg,
count_1k = NULL,
count_5k = NULL,
count_10k = NULL,
use_1k = TRUE
)References
Zhang, Y., Liu, T., Meyer, C. A., Eeckhoute, J., Johnson, D. S., Bernstein, B. E., Nusbaum, C., Myers, R. M., Brown, M., Li, W. and Liu, X. S. (2008), Model-based Analysis of ChIP-Seq (MACS), Genome Biology 9(9), R137. Dynamic lambda and Poisson p-value, Methods, Peak detection.
Examples
Chipsq(count = c(1, 2, 3, 4, 5, 6, 7, 8), width = 5L, lambda_bg = 5L)
#> $pvalue
#> [1] 0.9932621 0.9595723 0.8753480 0.7349741 0.5595067 0.3840393 0.2378165
#> [8] 0.1333717
#>
#> $lambda_local
#> [1] 5 5 5 5 5 5 5 5
#>
#> $fold_enrichment
#> [1] 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6
#>
#> $count
#> [1] 1 2 3 4 5 6 7 8
#>
#> $width
#> [1] 5 5 5 5 5 5 5 5
#>
#> $n_peaks
#> [1] 8
#>
#> $method
#> [1] "MACS dynamic-lambda Poisson peak test (Zhang et al. 2008)"
#>
