\HeaderA{findRegions}{Find all regions in data above p-value threshold}{findRegions}
\keyword{manip}{findRegions}
\begin{Description}\relax
After the ACME calculation, each probe is associated with a
p-value of enrichment.  However, one often wants the contiguous
regions associated with runs of p-values above a given p-value
threshold.
\end{Description}
\begin{Usage}
\begin{verbatim}
findRegions(calcobj, thresh = 1e-04)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{calcobj}] An \code{aGFFCalc} object
\item[\code{thresh}] The p-value threshold
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Runs of p-values above the p-value threshold will be reported as one
"region".  These can be used for downstream analyses, export to
browsers, submitted for transcription factor binding enrichment
analyses, etc.
\end{Details}
\begin{Value}
A data frame with these columns:
\begin{ldescription}
\item[\code{Length}] The length of the region in probes
\item[\code{TF}] Either TRUE or FALSE; TRUE regions represent regions of
enrichment while FALSE regions are the regions between the TRUE regions
\item[\code{StartInd}] The starting Index of the region
\item[\code{EndInd}] The ending Index of the region
\item[\code{Sample}] The sample containing the region
\item[\code{Chromosome}] The Chromosome of the region
\item[\code{Start}] The starting basepairof the region
\item[\code{End}] The ending basepair of the region
\end{ldescription}
\end{Value}
\begin{Author}\relax
Sean Davis \textless{}sdavis2@mail.nih.gov\textgreater{}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{do.aGFF.calc}{do.aGFF.calc}}, \code{\LinkA{findClosestGene}{findClosestGene}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(example.agff)
example.agffcalc <- do.aGFF.calc(example.agff,window=1000,thresh=0.9)
foundregions <- findRegions(example.agffcalc,thresh=0.001)
foundregions[1:6,]
\end{ExampleCode}
\end{Examples}

