Description Usage Arguments Value Methods (by class) Examples
The method wraps several function calls related to the data preparation into one call. It copies user data files to the project directory ( searchCopyPhenoFiles
), downloads supplemental metadata files from the dbGaP ftp site ( ftpDownload
), extracts and saves the file meta-info ( recordPrjFileInfo
), and finally merges the data files of different consents ( mergeDatasetConsent
). If any of above steps hasn't gone through successfully (often due to temporary glitches), rerun the failed and rest of steps individually to make sure all steps are finished before going forward.
1 2 3 4 5 | prepareData(object, userDataDir, ...)
## S4 method for signature 'Commons,character'
prepareData(object, userDataDir, ...,
phsAcc = "", overwrite = FALSE, dataStudyOnly = TRUE)
|
object |
Commons class object. |
userDataDir |
a character string. The path to the top level directory of decrypted dbGaP phenotype data files. |
... |
There are optional arguments. |
phsAcc |
a character string. The dbGaP study accession. |
overwrite |
a logical value. When TRUE, ftp downloads the supplemental metadata files if they aren't already downloaded. When FALSE (default, ftp downloads the metadata files even the they already exist. |
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. |
a data frame. (invisible) The meta-info of merged data files.
object = Commons,userDataDir = character
: A method of class Commons
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
c <- Commons()
prepareData(c, userDataDir = '/home/user/data')
# or
prepareData(c, userDataDir = '/home/user/data', phsAcc = 'phs000001.v3.p1')
# or to include the data meta-info of all the studies released in dbGaP.
# Note: This step may take serveral hours.
prepareData(c, userDataDir='/home/user/data', dataStudyOnly = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.