ftpDownload: Download supplemental data files from dbGaP ftp

Description Usage Arguments Value Methods (by class) Examples

Description

The method downloads the supplemental metadata files from the dbGaP ftp site. It is called by the prepareData function.

Usage

1
2
3
4
5
ftpDownload(object, ...)

## S4 method for signature 'Commons'
ftpDownload(object, ..., phsAcc = "",
  dataStudyOnly = TRUE, overwrite = FALSE)

Arguments

object

Commons class object

...

There are optional arguments.

phsAcc

a character string. The dbGaP study accession. Only the files of the given study are downloaded when a study accession is provided.

dataStudyOnly

a logical value. When TRUE (default), only downloads the dataset and variable metadata of the stdudies that have data files in the project directory. When FALSE, downloads the dataset and variable metadata of all dbGaP released studies, regardless the actual phenotype data files of the studies are downloaded or not.

overwrite

a logical value. When TRUE, downloads the supplemental metadata files if they aren't already downloaded. When FALSE (default, downloads the metadata files even the they already exist.

Value

a logical value. If TRUE, all files are downloaded OK. If FALSE, there is at least one failed download.

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

c <- Commons()
ftpDownload(c)
# or
ftpDownload(c, phsAcc = 'phs000001.v3.p1')
ftpDownload(c, dataStudyOnly=FALSE)
# or to include the data meta-info of all the studies released in dbGaP.
# Note: This step may take serveral hours.
ftpDownload(c, dataStudyOnly = FALSE)

## End(Not run)

jameslhao/dbgapr_dev documentation built on May 8, 2019, 11:03 p.m.