\HeaderA{cisSnpTests}{perform tests for eQTL cis to specified genes}{cisSnpTests}
\keyword{models}{cisSnpTests}
\begin{Description}\relax
perform tests for eQTL cis to specified genes
\end{Description}
\begin{Usage}
\begin{verbatim}
cisSnpTests(fmla, smls, radius, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{fmla}] standard formula. LHS can be a GeneSet with AnnotationIdentifier
geneIdType.  RHS can be predictor formula component using variables
in pData of \code{smls}

\item[\code{smls}] instance of smlSet

\item[\code{radius}] numeric value: number of bases up and downstream from probe
CHRLOC to be examined for SNP

\item[\code{...}] not in use

\end{ldescription}
\end{Arguments}
\begin{Value}
a list of cwSnpScreen instances
\end{Value}
\begin{Note}\relax
Getting SNP locations is slow for the first event while metadata
are brought into scope.  Subsequent calls are faster.
\end{Note}
\begin{Author}\relax
VJ Carey \textless{}stvjc@channing.harvard.edu\textgreater{}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
library(GSEABase)
# two genes on chr 20
gs1 = GeneSet(c("CPNE1", "ADA"), geneIdType = SymbolIdentifier())
gs2 = gs1
organism(gs2) = "Homo sapiens"
geneIdType(gs2) = AnnotationIdentifier("illuminaHumanv1.db")
if (!exists("hmceuB36.2021")) data(hmceuB36.2021)
cc = cisSnpTests(gs2~male, hmceuB36.2021, radius=1e5)
lapply(cc, function(x) length(p.value(x@.Data[[1]])))
cc = cisSnpTests(gs2~male, hmceuB36.2021, radius=1e6)
lapply(cc, function(x) length(p.value(x@.Data[[1]])))
\end{ExampleCode}
\end{Examples}

