Skip to contents

Download only GDS files that can be processed by dracarys.

Usage

dr_gds_download(
  gdsdir,
  outdir,
  token = Sys.getenv("ICA_ACCESS_TOKEN"),
  pattern = NULL,
  page_size = 100,
  dryrun = FALSE,
  regexes = DR_FILE_REGEX,
  recursive = NULL
)

Arguments

gdsdir

Full path to GDS directory.

outdir

Local output directory.

token

ICA access token (def: $ICA_ACCESS_TOKEN env var).

pattern

Pattern to further filter the returned file type tibble.

page_size

Page size (def: 10 via ICA API).

dryrun

If TRUE, just list the files that will be downloaded (don't download them).

regexes

Tibble with regex and function name (see example).

recursive

Should files be returned recursively in and under the specified GDS directory, or only directly in the specified GDS directory (def: TRUE via ICA API).

Examples

if (FALSE) { # \dontrun{
gdsdir <- "gds://production/analysis_data/SBJ01155/umccrise/202408300c218043/L2101566__L2101565"
outdir <- sub("gds:/", "~/icav1/g", gdsdir)
regexes <- tibble::tribble(
  ~regex, ~fun,
  "multiqc_data\\.json$", "MultiqcJsonFile",
  "-somatic\\.pcgr\\.json\\.gz$", "pcgrjson"
)
dr_gds_download(gdsdir = gdsdir, outdir = outdir, regexes = regexes, dryrun = T)
} # }