\name{getGEOSAGE} \alias{getGEOSAGE} \alias{getFileNames} \alias{getSampleId} \alias{parseSAGE} \title{Automatically downloads SAGE libraries from NCBI} \description{ Given an organism name (e.g. human) and a correct url, \code{\link{getGEOSAGE}} downloads SAGE libraries and stores them in a specified directory } \usage{ getGEOSAGE(organism = "human", targetDir = "", quiet = TRUE, url = "http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?") getFileNames(organism, url) getSampleId(url) } \arguments{ \item{organism}{A character string for the name of the organism of interests} \item{targetDir}{A character string for the directory where the downloaded SAGE libraries will be stored} \item{quiet}{A boolean indicating whether the status message from \code{\link{download.file}} will be supressed} \item{url}{A character string for part of the url from which SAGE libraries will be downloaded} } \details{ \code{\link{getGEOSAGE}} downloads SAGE libraries from NCBI's GEO site and stores them in a specified directory. The url passed is the location where the cgi resides and will be appended the correct parameters that specifies the content and format of the data file to be downloaded. The system relies on GPL numbers that differ among organisms to find the correct platform sample ids for files belonging to a given organism. The platform sample ids will then be used to fetch the desired annotation files. \code{\link{getFileNames}} gets the correct GPL number and \code{\link{getSampleId}} gets the platform sample ids. \code{\link{parseSAGE}} parses the downloaded file and stores the data to a specified place. } \value{ \item{getFileNames}{Returns a vector of GPL numbers} \item{getSampleId}{Returns a vector of platform sample ids} } \references{\url{http://www.ncbi.nlm.nih.gov/geo/query/}} \author{J. Zhang} \seealso{\code{\link{mergeSAGE}}} \examples{ # Since downloading and parsing SAGE libraries are time consuming, the # example code is inactivated. \dontrun{getGEOSAGE(organism = "human", targetDir = "", quiet = TRUE, url = "http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?")} } \keyword{manip}