\HeaderA{threshold.func}{Function to indicate gain or loss for each clone for each sample}{threshold.func}
\keyword{htest}{threshold.func}
\begin{Description}\relax
This function outputs a matrix containing gain/loss indicator for each clone and sample.
\end{Description}
\begin{Usage}
\begin{verbatim}
threshold.func(dat, posThres, negThres = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{dat}] log2ratios of the relevant array CGH object
\item[\code{posThres}] Global or sample-specific threshold for gain
\item[\code{negThres}] Global or sample-specific threshold for loss. Defaults to -posThres
\end{ldescription}
\end{Arguments}
\begin{Value}
Returns a matrix with a row for each clone and column for each sample. "1" indicates gain and "-1" indicates loss.
\end{Value}
\begin{Author}\relax
Jane Fridlyand, Ritu Roydasgupta
\end{Author}
\begin{Examples}
\begin{ExampleCode}

data(colorectal)

factor <- 3
tbl <- threshold.func(log2.ratios(colorectal),posThres=factor*(sd.samples(colorectal)$madGenome))
rownames(tbl) <- clone.names(colorectal)
colnames(tbl) <- sample.names(colorectal)
tbl[1:5,1:5]

\end{ExampleCode}
\end{Examples}

