Learn R Programming

DupChecker (version 1.10.2)

geoDownload: geoDownload

Description

The function downloads GEO raw data from ncbi ftp server based on datasets user provided. Once the compressed raw data is downloaded, individual gzipped target file will be extracted from compressed raw data, and individual target file will be extracted from corresponding gzipped file. The dataset/count table will be returned.

Usage

geoDownload(datasets, targetDir = getwd(), filePattern = NULL, tar = "internal", overwrite = FALSE)

Arguments

datasets
the GEO dataset names, for example: c("GSE14333")
targetDir
the target directory to store the datasets
filePattern
the file pattern of the expected data file may or may not extracted from gzipped file, for example: "cel$" for AffyMetrix CEL files. Default is NULL.
tar
the path to the command to be used in untar function
overwrite
If TRUE, overwrite existing files, otherwise ignore such files. The equivalent of unzip -o.

Value

a data frame containing dataset and how many target files in that dataset

Examples

Run this code
#download three datasets from GEO website
rootDir<-paste0(dirname(tempdir()), "/DupChecker")
dir.create(rootDir, showWarnings = FALSE)
datatable<-geoDownload(datasets = c("GSE1478"), targetDir=rootDir, filePattern="cel$")

Run the code above in your browser using DataLab