Learn R Programming

GenomicDataCommons (version 1.3.1)

gdcdata: Download GDC files

Description

Download one or more files from GDC. Files are downloaded using the UUID and renamed to the file name on the remote system. By default, neither the uuid nor the file name on the remote system can exist.

Usage

gdcdata(uuids, destination_dir = tempfile(), overwrite = FALSE,
  progress = interactive(), token = NULL)

Arguments

uuids

character() of GDC file UUIDs.

destination_dir

character(1) file path to a directory for downloading files.

overwrite

logical(1) default FALSE indicating whether existing files with identical name should be over-written.

progress

logical(1) default TRUE in interactive sessions, FALSE otherwise indicating whether a progress par should be produced for each file download.

token

(optional) character(1) security token allowing access to restricted data. See https://gdc-docs.nci.nih.gov/API/Users_Guide/Authentication_and_Authorization/.

Value

a named vector with file uuids as the names and paths as the value

Details

This function is appropriate for one or several files; for large downloads use manifest to create a manifest for and the GDC Data Transfer Tool.

See Also

manifest for downloading large data.

Examples

Run this code
# NOT RUN {
uuids <- c("e3228020-1c54-4521-9182-1ea14c5dc0f7",
           "18e1e38e-0f0a-4a0e-918f-08e6201ea140")
(files <- gdcdata(uuids, overwrite=TRUE))
setNames(file.size(files), names(files))
# }

Run the code above in your browser using DataLab