\HeaderA{pa.calls}{Presence-Absence Calls from Negative Strand Matching Probesets}{pa.calls}
\keyword{manip}{pa.calls}
\begin{Description}\relax
Function to make gene presence/absence calls based on distance from empirical distribution of chip-specific negative strand matching probesets (NSMP).
\end{Description}
\begin{Usage}
\begin{verbatim}
pa.calls(object, looseCutoff = 0.02, tightCutoff = 0.01, verbose = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an ExpressionSet object (result of running expression-generating function, like expresso(), rma(), mas5(), etc.) Currently, this must be of chip type HGU133A or HGU133 Plus 2.0
\item[\code{looseCutoff}] the larger P-value cutoff (see details)
\item[\code{tightCutoff}] the smaller, more strict P-value cutoff
\item[\code{verbose}] logical. If 'TRUE' detailed progress messages are reported.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function calculates a matrix of P-values for the expression values in the input ExpressionSet. P-values are calculated based on the empirical survivor function (1-CDF) of the set of negative probesets identified by Affymetrix as negative strand matching probesets (NSMP) with no cross hybridization. These probesets are therefore assumed to show nothing but background/machine noise plus some occasional non-specific binding. The P-value returned for any probeset expression value in ExpressionSet is the value of the NSMP survivor function for that expression level. 

Presence/Absence calls are derived by applying the two cutoff values to
the matrix of P-values for all genes in the ExpressionSet, as follows:
\item Present ('P'):    P-values <= tightCutoff
\item Absent ('A'):     P-values > looseCutoff
\item Marginal ('M'):   P-values between tightCutoff and looseCutoff
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{list}] a new list containing two matrices: Pcalls and Pvals, as follows:
\item[\code{Pcalls }] a matrix of Presence (P), Marginal (M), Absent (A) indicators
\item[\code{Pvals }] a matrix of P-values. Each data point is the P-value for the expr 
at the same x,y coordinates. 
\end{ldescription}
\end{Value}
\begin{Note}\relax
NSMP sets have been established for the HGU133A and HGU133-Plus-2.0 chipsets to date. Hence only these two are currently supported by PANP.
\end{Note}
\begin{Author}\relax
Peter Warren
\end{Author}
\begin{References}\relax
Warren, P., Bienkowska, J., Martini, P., Jackson, J., and Taylor, D., PANP - a New Method of Gene Detection on Oligonucleotide Expression Arrays (2007), in preparation
\end{References}
\begin{Examples}
\begin{ExampleCode}
## Load example ExpressionSet 
data(gcrma.ExpressionSet)

## Generate Pvals and Pcalls matrices from ExpressionSet, using default cutoffs
PA <- pa.calls(gcrma.ExpressionSet)

## to access the Pcalls and Pvals:
myPcalls <- PA$Pcalls
myPvals <-  PA$Pvals
\end{ExampleCode}
\end{Examples}

