%\VignetteIndexEntry{RMAGEML}
%\VignetteDepends{RMAGEML}
%\VignetteKeywords{RMAGEML}
%\VignettePackage{RMAGEML}
\documentclass[12pt]{article}
\usepackage{amsmath,epsfig,psfig,pstricks,fullpage}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{url}
\usepackage[authoryear,round]{natbib}
\newcommand{\scscst}{\scriptscriptstyle}
\newcommand{\scst}{\scriptstyle}
\author{Steffen Durinck$^\ddagger$\footnote{Steffen.Durinck@esat.kuleuven.ac.be}, Joke Allemeersch$^\ddagger$\footnote{Joke.Allemeersch@esat.kuleuven.ac.be}, Vincent J Carey$^\P$,  Yves Moreau$^\ddagger$,\\ Bart De Moor$^\ddagger$}
\usepackage{/homes/madman/R-2.0.0/share/texmf/Sweave}
\begin{document}
\title{Documentation of the RMAGEML package}

\maketitle
\begin{center} $^\ddagger$Department of Electronical Engineering, ESAT-SCD, K.U.Leuven,\\ Kasteelpark Arenberg 10, 3001 Leuven-Heverlee, Belgium, \url{http://www.esat.kuleuven.ac.be/~dna/BioI}\\and $^\P$Channing Laboratory, Brigham and Women's Hospital, 75 Francis Street, Boston 02115, USA
 
 \end{center}


%library(tools)
%Rnwfile<- file.path("/home/steffen/programming/R/MAGEML/inst/doc/RMAGEML.Rnw")
%Sweave(Rnwfile,pdf=TRUE,eps=TRUE,stylepath=TRUE,driver=RweaveLatex())

\tableofcontents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
MAGE-ML or Microarray Gene Expression Markup Language is a language designed to describe and exchange information about microarray experiments. MAGE-ML is based on XML and can describe microarray designs, microarray experiment setups, gene expression data, and data analysis results. \\  This package provides the link between MAGE-ML files and BioConductor.  It gives the possibility to read in MAGE-ML files that describe cDNA microarray experiments. The functions convert the MAGE-ML files into the customary BioConductor objects (i.e., \tt{marrayLayout}, \tt{marrayInfo} \rm and \tt{marrayRaw} \rm objects or limma \tt{RGList} \rm objects).\\
\

\noindent Here we give a short introduction to the Microarray and GeneExpression Object Model (MAGE-OM) and how we implemented the extraction of information necessary to make BioConductor objects. For a full description of MAGE-OM, we refer to the Gene Expression Specification: \url{http://www.omg.org/cgi-bin/doc?formal/03-02-03}.\\
The main classes of the MAGE object model are BioSequence, Quantitationtype, ArrayDesign, DesignElement, Array, BioMaterial, BioAssay, BioAssayData, Experiment, HigherLevelAnalysis, Protocol, Description, AuditAndSecurity, Measurement, and BioEvent.\\  
In MAGE-ML these translate into packages with the same name.  The packages needed for building BioConductor objects are BioAssayData, BioAssay, BioMaterial, BioSequence, ArrayDesign, and DesignElement.\\
The \textsf{DesignElement} package contains a mapping of
\textsf{\emph{Features}}, which are the actual features present on the 
array, to
\textsf{\emph{Reporters}}, the reporter a feature represents.  The 
\textsf{DesignElement} package also provides a mapping from
\textsf{\emph{Reporters}} to their corresponding
\textsf{\emph{BioSequence}} references. These
\textsf{\emph{BioSequence}} objects are characterized by their name and 
database
entries in the \textsf{BioSequence} package. The
\textsf{ArrayDesign} package contains information on the layout of
the array.  From this package, we can derive the position of each
\textsf{\emph{Feature}} on the array in terms of
\textsf{\emph{Zone}} (block or grid) and row and column within
each \textsf{\emph{Zone}}. The \textsf{BioAssayData} package
describes the feature references that were assayed and the measured and 
derived
\textsf{\emph{QuantitationTypes}}. The \textsf{BioAssay} package 
describes the different steps in the microarray
experiment. The last package used to make BioConductor objects is
the \textsf{BioMaterial} package and describes how a sample is treated 
to obtain, for example, labeled samples used for hybridization.\\




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Prerequisites}{
The RMAGEML package depends on SJava(>= 0.67) and a Java VM, e.g. j2resdk1.4.0.\\
Other dependencies are as the Java-MAGEstk API and Java Xerces included in the package itself.\\
}

\section{Getting started}
{\bf Installing the package.}
The package can be installed as a normal R package: download the RMAGEML\_2.0.4.tar.gz package and under Unix use the command\\ 
\

\noindent{\tt R CMD INSTALL RMAGEML\_2.0.4.tar.gz}.\\ 
\

\noindent The equivalent command for Windows is\\ 
\

\noindent{\tt Rcmd INSTALL RMAGEML\_2.0.4.zip}.\\  
\

\noindent The package automatically loads the Biobase and marrayInput packages from BioConductor and the SJava libraries, so these should be installed as well.\\
\

\noindent {\bf Starting R.}
Before starting R one should be aware that the RMAGEML package uses SJava and that SJava requires to set the LD\_LIBRARY\_PATH environment variable before starting R.\\
Without setting this variable the package won't work\\

\noindent {\bf Loading the package.}
You can load the package into R by typing\\

\begin{Schunk}
\begin{Sinput}
> library(RMAGEML)