\HeaderA{dabg.call}{Detection Above Background Call}{dabg.call}
\aliasA{xpsDABGCall}{dabg.call}{xpsDABGCall}
\aliasA{xpsDABGCall-methods}{dabg.call}{xpsDABGCall.Rdash.methods}
\keyword{manip}{dabg.call}
\begin{Description}\relax
Computes the Detection Above Background Call first implemented for the Exon arrays.
\end{Description}
\begin{Usage}
\begin{verbatim}
dabg.call(xps.data, filename = character(0), filedir = getwd(),
          alpha1 = 0.04, alpha2 = 0.06,
          option = "transcript", exonlevel = "", xps.scheme = NULL, add.data = TRUE, verbose = TRUE)

xpsDABGCall(object, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{xps.data}] object of class \code{DataTreeSet}.
\item[\code{filename}] file name of ROOT data file.
\item[\code{filedir}] system directory where ROOT data file should be stored.
\item[\code{alpha1}] a significance threshold in (0,alpha2).
\item[\code{alpha2}] a significance threshold in (alpha1,0.5).
\item[\code{option}] option determining the grouping of probes for summarization, one of 
\sQuote{transcript}, \sQuote{exon}, \sQuote{probeset}; exon arrays only.
\item[\code{exonlevel}] exon annotation level determining which probes should be used for summarization; exon/genome arrays only.
\item[\code{xps.scheme}] optional alternative \code{SchemeTreeSet}.
\item[\code{add.data}] logical. If \code{TRUE} call data will be added to slots \code{data} and \code{detcall}.
\item[\code{verbose}] logical, if \code{TRUE} print status information.
\item[\code{object}] object of class \code{DataTreeSet}.
\item[\code{...}] the arguments described above.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function generates a detection p-value based on comparing the perfect match probe
intensity to the intensity distribution provided by background probes sharing the same
GC-content as the PM probe under consideration. For exon/genome arrays special \sQuote{antigenomic}
background probes of defined GC-content are used, while for expression arrays the Mismatch
probes will be grouped by their GC-content. 

For exon/genome arrays it is necessary to supply \code{option} and \code{exonlevel}.

Following \code{option}s are valid for exon arrays only:
\Tabular{ll}{
\code{transcript}: & expression levels are computed for transcript clusters,
i.e. probe sets containing the same \sQuote{transcript\_cluster\_id}. \\
\code{exon}: & expression levels are computed for exon clusters,
i.e. probe sets containing the same \sQuote{exon\_id}, where each exon cluster
consists of one or more \code{probeset}s. \\
\code{probeset}: & expression levels are computed for individual probe sets,
i.e. for each \sQuote{probeset\_id}. \\
}
Following \code{exonlevel} annotations are valid for exon arrays:
\Tabular{lll}{
& \code{core}:& probesets supported by RefSeq and full-length GenBank transcripts. \\
& \code{metacore}:& core meta-probesets. \\
& \code{extended}:& probesets with other cDNA support. \\
& \code{metaextended}:& extended meta-probesets. \\
& \code{full}:& probesets supported by gene predictions only. \\
& \code{metafull}:& full meta-probesets. \\
& \code{ambiguous}:& ambiguous probesets only. \\
& \code{affx}:& standard AFFX controls. \\
& \code{all}:& combination of above.
}
Following \code{exonlevel} annotations are valid for whole genome arrays:
\Tabular{lll}{
& \code{core}:& probesets with category \sQuote{unique} and \sQuote{mixed}. \\
& \code{metacore}:& probesets with category \sQuote{unique} only. \\
& \code{affx}:& standard AFFX controls. \\
& \code{all}:& combination of above.
}
Exon levels can also be combined, with following combinations being most useful:
\Tabular{ll}{
\code{exonlevel="metacore+affx"}:  & core meta-probesets plus AFFX controls \\
\code{exonlevel="core+extended"}: & probesets with cDNA support \\
\code{exonlevel="core+extended+full"}:  & supported plus predicted probesets \\
}

Exon level annotations are described in the Affymetrix whitepaper
\sQuote{exon\_probeset\_trans\_clust\_whitepaper.pdf}.

In order to use an alternative \code{\LinkA{SchemeTreeSet}{SchemeTreeSet}} set the corresponding
SchemeTreeSet \code{xps.scheme}.

\code{xpsDABGCall} is the \code{DataTreeSet} method called by function \code{dabg.call}, 
containing the same parameters.
\end{Details}
\begin{Value}
A \code{\LinkA{CallTreeSet}{CallTreeSet}}
\end{Value}
\begin{Note}\relax
Yes, it is possible to compute DABG detection call for expression arrays, but it is
very slow and thus not recommended.
\end{Note}
\begin{Author}\relax
Christian Stratowa
\end{Author}
\begin{References}\relax
Affymetrix (2005) Exon Probeset Annotations and Transcript Cluster Groupings, Affymetrix Inc., 
Santa Clara, CA, exon\_probeset\_trans\_clust\_whitepaper.pdf.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{mas5.call}{mas5.call}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## first, load ROOT scheme file and ROOT data file
scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

## DABG detection call
call.dabg <- dabg.call(data.test3,"tmp_Test3DABG",verbose=FALSE)

## get data.frames
pval.dabg <- pvalData(call.dabg)
pres.dabg <- presCall(call.dabg)
head(pval.dabg)
head(pres.dabg)

## plot results
if (interactive()) {
callplot(call.dabg)
}

rm(scheme.test3, data.test3)
gc()
\end{ExampleCode}
\end{Examples}

