\HeaderA{read.spike}{Read SpikeList from a RGList\_CALIB and Concentration files}{read.spike}
\keyword{file}{read.spike}
\begin{Description}\relax
Reads a SpikeList from a given RGList\_CALIB object and user specified concentration files
\end{Description}
\begin{Usage}
\begin{verbatim}
read.spike(RG, file = NULL, path = NULL, ext = NULL, sep = "\t", conccol,
           regexpcol, different = FALSE, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{RG}] a \code{\LinkA{RGList\_CALIB}{RGList.Rul.CALIB}} object.
\item[\code{file}] character string giving the name of the concentration file.
\item[\code{path}] character string giving the directory containing the file.
Can be omitted if the file is in the current working directory.
\item[\code{ext}] character string giving optional extension to be added to
each file name.
\item[\code{sep}] field separator character.
\item[\code{conccol}] list with fields \code{RConc}, \code{GConc} giving the column names
to be used for red and green concentration in the concentration file.
\item[\code{regexpcol}] character vector giving regular expressions in the 
concentration file.
\item[\code{different}] a logical value. \code{TRUE} means that different arrays use 
different spikes. So every array should have one concentration file. 
\code{FALSE} means that different arrays use the same spike and only one 
concentration file is needed. Default is \code{FALSE}.
\item[\code{...}] any other arguments are passed to \code{\LinkA{read.table}{read.table}}. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is the function to generate SpikeList in the CALIB package. SpikeList 
contains all the information for the spikes. This function exacts foreground 
and background intensities and spot area from RGList\_CALIB, which is generated from 
funtion \code{\LinkA{read.rg}{read.rg}}. Also this funtion reads concentrations 
for each spike from a user-specified concentration file (or more than one 
concentration files if different arrays use different spikes).

For the concentration file, it should contain the following columns:
regular expression, red and green concentrations and spike type.
Spike type should be in the set of \code{Calibration},\\ \code{Ratio}
and \code{Negative}.

See the CALIB User's Guide for the example of this function.
\end{Details}
\begin{Value}
An \code{\LinkA{SpikeList}{SpikeList}} object containing the components

\begin{ldescription}
\item[\code{R}] matrix containing the red channel foreground intensities for
each spot for each array.
\item[\code{G}] matrix containing the green channel foreground intensities
for each spot for each array.
\item[\code{Rb}] matrix containing the red channel background intensities for
each spike for each array.
\item[\code{Gb}] matrix containing the green channel background intensities
for each spike for each array.
\item[\code{RArea}] matrix containing the red spot area for each spike for each array.
\item[\code{GArea}] matrix containing the green spot area for each spike for each array.
\item[\code{RConc}] matrix containing the red concentration for each spike for each array.
\item[\code{GConc}] matrix containing the green concentration for each spike for each array.
\item[\code{genes}] data frame containing annotation information about the probes, 
for example, spike types and IDs and spatial positions on the array
\end{ldescription}
\end{Value}
\begin{Author}\relax
Hui Zhao
\end{Author}
\begin{References}\relax
\textasciitilde{}put references to the literature/web site here \textasciitilde{}
\end{References}

