\HeaderA{cdfAddPlasqTypes}{Adds the PLASQ types for the probes in a CDF structure}{cdfAddPlasqTypes}
\keyword{programming}{cdfAddPlasqTypes}
\keyword{internal}{cdfAddPlasqTypes}
\begin{Description}\relax
Adds the PLASQ types for the probes in a CDF structure.

This \code{\LinkA{function}{function}} is design to be used with \code{\LinkA{applyCdfGroups}{applyCdfGroups}}()
on an Affymetrix Mapping (SNP) CDF \code{\LinkA{list}{list}} structure.
\end{Description}
\begin{Usage}
\begin{verbatim}cdfAddPlasqTypes(groups, ...)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{groups}] A \code{\LinkA{list}{list}} structure with groups.
Each group must contain the fields \code{tbase}, \code{pbase},
and \code{expos}.

\item[\code{...}] Not used.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function identifies the number of nucleotides (bases) in probe
sequences that mismatch the the target sequence for allele A and the
allele B, as used by PLASQ [1], and adds an integer [0,15] interepreted
as one of 16 probe types.  In PLASQ these probe types are referred to as:
0=MMoBR, 1=MMoBF, 2=MMcBR, 3=MMcBF, 4=MMoAR, 5=MMoAF, 6=MMcAR, 7=MMcAF,
8=PMoBR, 9=PMoBF, 10=PMcBR, 11=PMcBF, 12=PMoAR, 13=PMoAF, 14=PMcAR,
15=PMcAF.\\

Pseudo rule for finding out the probe-type value:\\
\Itemize{
\item PM/MM: For MMs add 0, for PMs add 8.
\item A/B: For Bs add 0, for As add 4.
\item o/c: For shifted (o) add 0, for centered (c) add 2.
\item R/F: For antisense (R) add 0, for sense (F) add 1.
}
Example: (PM,A,c,R) = 8 + 4 + 2 + 0 = 14 (=PMcAR)
\end{Details}
\begin{Value}
Returns a \code{\LinkA{list}{list}} structure with the same number of groups as the
\code{groups} argument.  To each group, one fields is added:
\begin{ldescription}
\item[\code{plasqType}] A \code{\LinkA{vector}{vector}} of \code{\LinkA{integer}{integer}}s in [0,15].
\end{ldescription}
\end{Value}
\begin{Author}\relax
Henrik Bengtsson (\url{http://www.braju.com/R/})
\end{Author}
\begin{References}\relax
[1] LaFramboise T, Weir BA, Zhao X, Beroukhim R, Li C, Harrington D,
Sellers WR, and Meyerson M. \emph{Allele-specific amplification in
cancer revealed by SNP array analysis}, PLoS Computational Biology,
Nov 2005, Volume 1, Issue 6, e65.\\
\end{References}

