\HeaderA{nem.discretize}{Discretize perturbation data according to control experiments}{nem.discretize}
\keyword{graphs}{nem.discretize}
\keyword{models}{nem.discretize}
\begin{Description}\relax
discretizes raw data to define effects of interventions with respect to wildtype/control measurements
\end{Description}
\begin{Usage}
\begin{verbatim}
nem.discretize(D,neg.control=NULL,pos.control=NULL,nfold=2,cutoff=0:10/10, pCounts=20, empPval=.05, verbose=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{D}] matrix with experiments as columns and effect reporters as rows
\item[\code{neg.control}] either indices of columns in \code{D} or a matrix with the same number of rows as \code{D}
\item[\code{pos.control}] either indices of columns in \code{D} or a matrix with the same number of rows as \code{D}
\item[\code{nfold}] fold-change between neg. and pos. controls for selecting effect reporters. Default: 2
\item[\code{cutoff}] a (vector of) cutoff value(s) weighting the pos. controls versus the neg. controls. Default: 0:10/10
\item[\code{pCounts}] pseudo-counts to guard against unreasonable low error estimates
\item[\code{empPval}] empirical p-value cutoff for effects if only one control is available
\item[\code{verbose}] Default: TRUE
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Chooses cutoff such that separation between negative and positive controls becomes optimal.
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{dat}] discretized data matrix
\item[\code{pos}] discretized positive controls [in the two-controls setting]
\item[\code{neg}] discretized negative controls [in the two-controls setting]
\item[\code{sel}] effect reporters selected [in the two-controls setting]
\item[\code{cutoff}] error rates for different cutoff values [in the two-controls setting]
\item[\code{para}] estimated error rates [in the two-controls setting]
\end{ldescription}
\end{Value}
\begin{Note}\relax
preliminary! will be developed to be more generally applicable
\end{Note}
\begin{Author}\relax
Florian Markowetz \textless{}URL: http://genomics.princeton.edu/\textasciitilde{}florian\textgreater{}
\end{Author}
\begin{References}\relax
Markowetz F, Bloch J, Spang R, Non-transcriptional pathway features reconstructed from secondary effects of RNA interference, Bioinformatics, 2005
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{BoutrosRNAi2002}{BoutrosRNAi2002}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   # discretize Boutros data as in
   # Markowetz et al, 2005
   data("BoutrosRNAi2002")
   disc <- nem.discretize(BoutrosRNAiExpression,neg.control=1:4,pos.control=5:8,cutoff=.7)
   stopifnot(disc$dat==BoutrosRNAiDiscrete[,9:16])   
\end{ExampleCode}
\end{Examples}

