\HeaderA{do.aGFF.calc}{Perform ACME calculation}{do.aGFF.calc}
\keyword{htest}{do.aGFF.calc}
\begin{Description}\relax
This function performs the moving window chi-square calculation.  It
is written in C, so is quite fast.
\end{Description}
\begin{Usage}
\begin{verbatim}
do.aGFF.calc(x, window, thresh)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An \code{aGFF} class object
\item[\code{window}] An integer value, representing the number of basepairs
to include in the windowed chi-square calculation
\item[\code{thresh}] The quantile of the data distribution for each sample
that will be used to classify a probe as positive
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A window size on the order of 2-3 times the average size of fragments
from sonication, digestion, etc. and containing at least 8-10 probes
is the recommended size.  Larger size windows are probably more
sensitive, but obviously reduce the accuracy with which boundaries of
signal can be called.

A threshold of between 0.9 and 0.99 seems empirically to be adequate.
If one plots the histogram of data values and there is an obvious
better choice (such as a bimodal distribution, with one peak
representing enrichment), a more data-driven approach may yield better
results.
\end{Details}
\begin{Value}
An object of class \code{aGFFCalc}
\end{Value}
\begin{Author}\relax
Sean Davis <sdavis2@mail.nih.gov>
\end{Author}
\begin{Examples}
\begin{ExampleCode}
data(example.agff)
example.agffcalc <- do.aGFF.calc(example.agff,window=1000,thresh=0.9)
example.agffcalc
\end{ExampleCode}
\end{Examples}

