\HeaderA{screening}{Fits the optimal kinetic parameter values for several genes.}{screening}
\keyword{ts}{screening}
\begin{Description}\relax
This method fits the three kinetic parameter values for each gene in a user-supplied vector. 
It returns a list containing the results.
\end{Description}
\begin{Usage}
\begin{verbatim}
screening(eset,genes,HVDM,transforms,cl1zscorelow,cl1modelscorehigh,cl1degraterange)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{eset}] an ExpressionSet object (Biobase) 
\item[\code{genes}] a vector containing the genes identifiers to be screened (in character format) 
\item[\code{transforms}] a vector containing the kintetic parameter identifiers that have to be transformed during optimisation (optional) 
\item[\code{HVDM}] a HVDM object (see details) 
\item[\code{cl1zscorelow}] the sensitivity Z-score cutoff value for a gene to be classified as a putative target 
\item[\code{cl1modelscorehigh}] the model score cutoff value for a gene to be classified as a putative target 
\item[\code{cl1degraterange}] the degradation rate bounds applied for a gene to be classified as a putative target 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This screening step can only be applied if a \code{training()} step has already been run. 
The output to the \code{training()} step can be given as the "HVDM" argument. A fit of each gene in the "genes" argument
is then performed. 

Alternatively an output to a previously run \code{screening()} step can be supplied as an
"HVDM" argument. In this case, the fit is not performed once again. Feeding a previous output
of \code{screening()} to that same function again is useful only if the various bounds altered in the secon run.
In the case this option is used, the "eset" and "genes" arguments do not have to be supplied (they will
be ignored anyway).

The output of that function is a list containing the results. The relevant data frame is in the "results" member of the output. 
Putative targets can be identified using the "class1" field of that data frame (see example).

Bounds determining whether a gene is a target of the transcription factor under review have to be supplied. They are:

- cl1zscorelow: lower bound for the sensitivity Z-score (default: 2.5)

- cl1modelscore: upper bound for the model score (default: 100.0). 
This default will have to be changed in most cases. As a rule of thumb,  
5x the model score for the genes in the training set can be used.

- cl1degraterange: lower and upper bounds for the degradation rate (default: c(0.01,5.0)). This is to 
exclude those genes with an absurd degradation rate, measured in (unit time)\^(-1). In our example the
unit time is an hour. In the case the unit time is different, these default bounds will have to be altered accordingly.

An exponential transform is set by default for both the basal (Bj) and degradation (Dj) rates (through the transforms argument). This
forces the values for both these parameters to be positive. It also helps to reach a better fit. To turn this off let transforms=c(). Even in this case the degradation rate will not be allowed to take non positive values as it causes problems with the
differential operator used internally. The value in the vector indicates the parameter to be transformed: "Bj": basal rate of transcription, "Sj": sensitivity, "Dj": degradation rate.
The entry label indicates the transform to be applied; presently, only log-tranforms are implemented (ie "exp").
\end{Details}
\begin{Value}
a list containing the results (see documentation for more details).
\end{Value}
\begin{Note}\relax
Obviously, the expression set given as a \code{eset} argument has to be the same as the one used
for the training set.
\end{Note}
\begin{Author}\relax
Martino Barenco
\end{Author}
\begin{References}\relax
M. Barenco, D. Tomescu, D. Brewer, R. Callard, J. Stark, M. Hubank (2006) Ranked predictions
of p53 targets using Hidden Variable Dynamic Modelling. \emph{Genome Biology}, \bold{V7(3)}, R25.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{training}{training}},\code{\LinkA{HVDMreport}{HVDMreport}},\code{\LinkA{fitgene}{fitgene}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(HVDMexample)
tHVDMp53<-training(eset=fiveGyMAS5,genes=p53traingenes,degrate=0.8,actname="p53")
screenp53<-screening(eset=fiveGyMAS5,genes=genestoscreen[1:10],HVDM=tHVDMp53)

#extracting a list of putative p53 targets
p53targets<-screenp53$results[screenp53$results$class1,]

#shifting the goal posts
screenp53B<-screening(HVDM=screenp53,cl1zscorelow=3.5)
\end{ExampleCode}
\end{Examples}

