\HeaderA{hbTests-methods}{haplotype-block based tests for structured expression variation}{hbTests.Rdash.methods}
\aliasA{hbTests}{hbTests-methods}{hbTests}
\aliasA{hbTests,genesym,smlSet,chrnum,numeric,numeric-method}{hbTests-methods}{hbTests,genesym,smlSet,chrnum,numeric,numeric.Rdash.method}
\keyword{methods}{hbTests-methods}
\begin{Description}\relax
haplotype-block based tests for structured expression variation
\end{Description}
\begin{Section}{Methods}
\describe{

\item[fmla = "genesym", sms = "smlSet", cnum = "chrnum", rsid = "numeric", rad = "numeric"] expression data for gene identified by \code{genesym} is extracted from \code{sms},
and genotype data within \code{rad} base pairs of \code{rsid} are obtained and
processed by \code{\LinkA{mapLD}{mapLD}} to define haplotype blocks and the SNP tagging
these blocks.  Score tests are then computed for the association of expression
of the gene identified by \code{genesym} with haplotype copy number (additive model by
default, but options captured by ... are passed to \code{\LinkA{haplo.score}{haplo.score}}.)

}
\end{Section}
\begin{Examples}
\begin{ExampleCode}
library(GGtools)
data(hmceuB36.2021)
hmFou = hmceuB36.2021[, hmceuB36.2021$isFounder==TRUE]
hh = hbTests(genesym("CPNE1"), hmFou, chrnum(20), 33600000, 2e4 )
hh
pvals(hh)
plot(locs(hh), -log10(pvals(hh)))
hscores(hh)[[which.min(pvals(hh))]]
\end{ExampleCode}
\end{Examples}

