Learn R Programming

GenomicDataCommons (version 1.3.1)

transfer: Bulk data download

Description

The GDC maintains a special tool, https://docs.gdc.cancer.gov/Data_Transfer_Tool/Users_Guide/Getting_Started/, that enables high-performance, potentially parallel, and resumable downloads. The Data Transfer Tool is an external program that requires separate download.

transfer_help() queries the the command line GDC Data Transfer Tool, gdc-client, for available options to be used in the transfer command.

Usage

transfer(manifest, destination_dir = tempfile(), args = character(),
  token = NULL, gdc_client = "gdc-client")

transfer_help(gdc_client = "gdc-client")

Arguments

manifest

character(1) file path to manifest created by manifest(). See write_manifest for a simple way to create a manifest file from a data.frame created with manifest.

destination_dir

The path into which to place the transfered files.

args

character() vector specifying command-line arguments to be passed to gdc-client. See transfer_help for possible values. The arguments --manifest, --dir, and --token-file are determined by manifest, destination_dir, and token, respectively, and should NOT be provided as elements of args.

token

character(1) containing security token allowing access to restricted data. See https://gdc-docs.nci.nih.gov/API/Users_Guide/Authentication_and_Authorization/. Note that the GDC transfer tool requires a file for data transfer. Therefore, this token will be written to a temporary file (with appropriate permissions set).

gdc_client

character(1) name or path to gdc-client executable. On Windows, use / or \\ as the file separator.

Value

character(1) directory path to which the files were downloaded.

Functions

  • transfer_help:

Examples

Run this code
# NOT RUN {
file_manifest = files() %>% filter(~ access == "open") %>% manifest(size=10)
manifest_file = tempfile()
write.table(file_manifest,file=manifest_file,col.names=TRUE,row.names=FALSE,quote=FALSE)
destination <- transfer(manifest_file)
dir(destination)
# and with authenication
destination <- transfer(manifest_file,token=gdc_token)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab