\Header{yeastAnn}{Functions to annotate yeast genom data}
\alias{formatChrLoc}{yeastAnn}
\alias{formatGO}{yeastAnn}
\alias{getGEOYeast}{yeastAnn}
\alias{getProbe2SGD}{yeastAnn}
\alias{procYeastGeno}{yeastAnn}
\keyword{manip}{yeastAnn}
\begin{Description}\relax
Given a GEO accession number for a yease data set and the extensions
for annotation data files names that are available from Yeast Genom
web site, the functions generates a data package with containing
annoatation data for yeast genes in the GEO data set.\end{Description}
\begin{Usage}
\begin{verbatim}
yeastAnn(base = "", yGenoUrl =
"ftp://genome-ftp.stanford.edu/pub/yeast/data_download/", yGenoNames = c("literature_curation/gene_literature.tab",
"chromosomal_feature/chromosomal_feature.tab",
"literature_curation/go_annotation.tab"), toKeep = list(c(6, 1), c(9, 5,
8, 11, 15), c(3, 2, 6)), colNames = list(c("sgdid", "pubmed"),
c("sgdid", "chrom", "strand", "desc", "enzyme"), c("sgdid", "gene",
"go")), seps = c("\t", "\t", "\t"), by = "sgdid")
getProbe2SGD(probe2ORF, yGenoUrl, fileName
="chromosomal_feature/external_id.tab", toKeep = c(3, 4), colNames =
c("orf","sgdid"), sep = "\t", by = "orf")
procYeastGeno(baseURL =
"ftp://genome-ftp.stanford.edu/pub/yeast/data_download/", fileName,
toKeep, colNames, seps = "\t")
getGEOYeast(GEOAccNum, GEOUrl =
"http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?", geoCols = c(1, 8),
yGenoUrl = "ftp://genome-ftp.stanford.edu/pub/yeast/data_download/") 
formatGO(gos, evis)
formatChrLoc(chr, chrloc, chrori)  
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{base}] \code{base} a matrix with two columns. The first column is
probe ids and the second one are the mappings to SGD ids used by all
the Yeast Genome data files. If \code{base} = "", the whole genome
will be mapped based on a data file that contains mappings between all
the ORFs and SGD ids
\item[\code{GEOAccNum}] \code{GEOAccNum} a character string for the accession
number given by GEO for a yeast data set
\item[\code{GEOUrl}] \code{GEOUrl} a character string for the url that
contains a common CGI for all the GEO data. Currently it is
\url{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?}
\item[\code{srcUrl}] see GEOUrl
\item[\code{geoCols}] \code{geoCols} a vector of integers for the coloumn
numbers of the source file from GEO that maps yeast probe ids to ORF
ids
\item[\code{yGenoUrl}] \code{yGenoUrl} a character string for the url that is
a directory in Yeast Genom web site that contains directories for
yeast annotation data. Currently it is
\url{ftp://genome-ftp.stanford.edu/pub/yeast/data_download/}
\item[\code{baseURL}] see yGenoUrl
\item[\code{yGenoNames}] \code{yGenoNames} a vector of character strings for
the names of yeast annotation data. Each of the strings can be
appended to yGenoUrl to make a complete url for a data file
\item[\code{fileName}] a character string for the extension part of the
source data file that can be used to target genes to SGD ids
\item[\code{toKeep}] \code{toKeep} a list of vector of integers with numbers
corresponding to column numbers of yeast genom data files that will
kept when data files are processed. The length of toKeep must be the
same as yGenoName (a vector for each file)
\item[\code{colNames}] \code{colNames} a list of vectors of character strings
for the names to be given to the columns to keep when processing the
data. Again, the length of colNames must be the same as yGenoNames
\item[\code{seps}] \code{seps} a vector of characters for the separators used
by the data files included in yGenoNames
\item[\code{sep}] singular version of seps
\item[\code{by}] \code{by} a character string for the column that is common
in all data files to be processed. The column will be used to merge
separate data files
\item[\code{yGeno}] \code{yGeno} an object of the class YG
\item[\code{probe2ORF}] \code{probe2ORF} a matrix with mappings of yease
target genes to ORF ids that in turn can be mapped to SGD ids
\item[\code{gos}] \code{gos} a vector of character strings for GO ids
retrieved from Yeast Genome Project
\item[\code{evis}] \code{evis} a vector of character string for the evidence
code associated with go ids
\item[\code{chr}] \code{chr} a vector of character strings for chromosome
numbers
\item[\code{chrloc}] \code{chrloc} a vector of integers for chromosomal
locations
\item[\code{chrori}] \code{chrori} a vector of characters that can either be
w or c that are used for strand of yeast chromosomes
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
To merge files, the system has to map the target genes in the base
file to SGD ids and then use SGD ids to map traget genes to annotation
data from different sources.

\code{\Link{formatGO}} adds leading 0s to goids when needed and then
append the evidence code to the end of a goid following a "@".

\code{\Link{formatChrLoc}} assigns a + or - sing to \code{chrloc}
depending on whether the corresponding \code{chrori} is w or c and
then append \code{chr} to the end of \code{chrloc} following a "@".

\code{\Link{getGEOYeast}} gets yeast data from GEO for the columns
specified.\end{Details}
\begin{Value}
\code{\Link{yeastAnn}} returns a matrix with traget genes annotated by
data from selected data columns in different data sources.

\code{\Link{getProbe2SGD}} returns a matrix with mappings between
target genes and SGD ids.

\code{\Link{procYeastGeno}} returns a data matrix.

\code{\Link{formatGO}} returns a vector of character strings.

\code{\Link{formatChrLoc}} returns a vector of character strings.

\code{\Link{getGEOYeast}} returns a matrix with the number of columns
specified.\end{Value}
\begin{Note}\relax
The functions are part of the Bioconductor project at Dana-Farber
Cancer Institute to provide Bioinformatics functionalities through R\end{Note}
\begin{Author}\relax
Jianhua Zhang\end{Author}
\begin{References}\relax
\url{ftp://genome-ftp.stanford.edu}\end{References}
\begin{SeeAlso}\relax
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# The following code will take a while to run and is turned off 
if(FALSE){
yeastData <- yeastAnn(GEOAccNum = "GPL90")
}
\end{ExampleCode}
\end{Examples}

