\HeaderA{haplo.scan.w}{Wrapper for searching for a trait-locus by sliding a fixed-width window over each marker locus and scanning all possible haplotype lengths within the window}{haplo.scan.w}
\keyword{misc}{haplo.scan.w}
\begin{Description}\relax
Wrapper for searching for a trait-locus by sliding a fixed-width window over each marker locus and scanning all possible haplotype lengths within the window.
\end{Description}
\begin{Usage}
\begin{verbatim}
haplo.scan.w(geneSetObj, 
             width = 4, 
             miss.val = c(0, NA), 
             em.control = haplo.em.control(), 
             sim.control = score.sim.control())
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{geneSetObj}] A geneSet object
\item[\code{width}] Width of sliding the window
\item[\code{miss.val}] Vector of values that represent missing alleles in geno. 
\item[\code{em.control}] A list of control parameters to determine how to perform
the EM algorithm for estimating haplotype frequencies when
phase is   unknown. The list is created by the function
\code{\LinkA{haplo.em.control}{haplo.em.control}} - see this function for more details.
\item[\code{sim.control}] List of control parameters to determine how simulations
are performed for simulated p-values. The list is created by
the function \code{\LinkA{score.sim.control}{score.sim.control}} and the default values of this
function can be changed as desired. See \code{\LinkA{score.sim.control}{score.sim.control}} for
details. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Please refer to \code{\LinkA{haplo.scan}{haplo.scan}} for more details.
\end{Details}
\begin{Value}
A list that has class haplo.scan, which contains the following items:

\begin{ldescription}
\item[\code{call}] The call to haplo.scan.w

\item[\code{scan.df}] A data frame containing the maximum test statistic for each window
around each locus, and its simulated p-value.

\item[\code{max.loc}] The loci (locus) which contain(s) the maximum observed test statistic
over all haplotype lengths and all windows.

\item[\code{globalp}] A p-value for the significance of the global maximum statistic.

\item[\code{nsim}] Number of simulations performed

\end{ldescription}
\end{Value}
\begin{Note}\relax
~~further notes~~
\end{Note}
\begin{Author}\relax
Weiliang Qiu \email{stwxq@channing.harvard.edu}, Ross Lazarus \email{ross.lazarus@channing.harvard.edu}
\end{Author}
\begin{References}\relax
~put references to the literature/web site here ~
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{haplo.em.w}{haplo.em.w}}, \code{\LinkA{haplo.score.slide.w}{haplo.score.slide.w}}, \code{\LinkA{haplo.score.w}{haplo.score.w}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
"haplo.scan.w"
\end{ExampleCode}
\end{Examples}

