\HeaderA{03.ReadingData}{Reading Microarray Data from Files}{03.ReadingData}
\keyword{documentation}{03.ReadingData}
\begin{Description}\relax
This help page gives an overview of LIMMA functions used to read data from files.
\end{Description}
\begin{Section}{Reading Target Information}
The function \code{\LinkA{readTargets}{readTargets}} is designed to help with organizing information about which RNA sample is hybridized to each channel on each array and which files store information for each array.
\end{Section}
\begin{Section}{Reading Intensity Data}
The first step in a microarray data analysis is to read into R the intensity data for each array provided by an image analysis program.
This is done using the function \code{\LinkA{read.maimages}{read.maimages}}.

\code{\LinkA{read.maimages}{read.maimages}} optionally constructs quality weights for each spot using quality functions listed in \LinkA{QualityWeights}{QualityWeights}.

\code{read.maimages} produces an \code{RGList} object and stores only the information required from each image analysis output file.
If you wish to read all the image analysis output files into R as individual data frames preserving all the original columns found in the files, you may use \code{\LinkA{read.series}{read.series}}.
An \code{RGList} object can be extracted from the data frames at a later stage using the functions \code{\LinkA{rg.spot}{rg.spot}}, \code{\LinkA{rg.genepix}{rg.genepix}} or \code{\LinkA{rg.quantarray}{rg.quantarray}}.

Another function, \code{\LinkA{rg.series.spot}{rg.series.spot}} is very similar to \code{\LinkA{read.maimages}{read.maimages}} with \code{source="spot"}.
This function will be removed in future versions of LIMMA.

\code{\LinkA{read.maimages}{read.maimages}} uses utility functions \code{\LinkA{removeExt}{removeExt}}, \code{\LinkA{read.matrix}{read.matrix}}, \code{\LinkA{read.imagene}{read.imagene}} and \code{\LinkA{readImaGeneHeader}{readImaGeneHeader}}.

The function \LinkA{as.MAList}{as.MAList} can be used to convert a \code{marrayNorm} object to an \code{MAList} object if the data was read and normalized using the marray and marrayNorm packages.
\end{Section}
\begin{Section}{Reading the Gene List}
Many image analysis program provide gene IDs as columns in the image analysis output files, for example ArrayVision, Imagene and the Stanford Microarray Database.
In other cases you may have the probe ID and annotation information in a separate file.
The function \code{\LinkA{readGAL}{readGAL}} reads information from a GenePix Array List (GAL) file.
It produces a data frame with known column names.
If the probe IDs or names consist of multiple strings separated by a delimiter, then \code{\LinkA{splitName}{splitName}} may be used to separate the name and annotation information into separate vectors.

The functions \code{\LinkA{readSpotTypes}{readSpotTypes}} and \code{\LinkA{controlStatus}{controlStatus}} assist with separating control spots from ordinary genes in the analysis and data exploration.

The function \code{\LinkA{getLayout}{getLayout}} extracts from the GAL-file data frame the print layout information for a spotted array.
The functions \code{\LinkA{gridr}{gridr}}, \code{\LinkA{gridc}{gridc}}, \code{\LinkA{spotr}{spotr}} and \code{\LinkA{spotc}{spotc}} use the extracted layout to compute grid positions and spot positions within each grid for each spot.
The function \code{\LinkA{printorder}{printorder}} calculates the printorder, plate number and plate row and column position for each spot given information about the printing process.
The utility function \code{\LinkA{getSpacing}{getSpacing}} converts character strings specifying spacings of duplicate spots to numeric values.

If each probe is printed more than once of the arrays, then \code{\LinkA{uniquegenelist}{uniquegenelist}} will remove duplicate names from the gal-file or gene list.
\end{Section}
\begin{Section}{Manipulating Data Objects}
\code{\LinkA{cbind}{cbind}}, \code{\LinkA{rbind}{rbind}}, \code{\LinkA{merge}{merge}} allow different \code{RGList} or \code{MAList} objects to be combined.
\code{cbind} combines data from different arrays assuming the layout of the arrays to be the same.
\code{merge} can combine data even when the order of the probes on the arrays has changed.
\code{merge} uses utility function \code{\LinkA{makeUnique}{makeUnique}}.
\end{Section}
\begin{Author}\relax
Gordon Smyth
\end{Author}


