galaxy_download_rocrate: Generic for downloading a history as an RO-Crate

galaxy_download_rocrateR Documentation

Generic for downloading a history as an RO-Crate

Description

galaxy_download_rocrate() is an S4 generic. With x as a history ID (character) it requests an export in RO-Crate format, polls until ready, and downloads the archive to dest_file. With x as a Galaxy object, its history_id and galaxy_url are used and the object is returned invisibly after performing the download.

Usage

galaxy_download_rocrate(
  x,
  dest_file = tempfile(fileext = ".zip"),
  galaxy_url = "https://usegalaxy.eu",
  format = "rocrate.zip",
  poll_interval = 5,
  timeout = 600
)

## S4 method for signature 'character'
galaxy_download_rocrate(
  x,
  dest_file = tempfile(fileext = ".zip"),
  galaxy_url = "https://usegalaxy.eu",
  format = "rocrate.zip",
  poll_interval = 30,
  timeout = 600
)

## S4 method for signature 'Galaxy'
galaxy_download_rocrate(
  x,
  dest_file = tempfile(fileext = ".zip"),
  format = format,
  poll_interval = 5,
  timeout = 600
)

Arguments

x

A history ID (character), or a Galaxy object.

dest_file

Path to save the downloaded RO-Crate (defaults to a temporary .zip file).

galaxy_url

Base URL of the Galaxy instance, used by the character method. If GALAXY_URL is set it takes precedence.

format

Format for the history export. Possible formats depend on the Galaxy server. Typical inputs are 'tgz', 'tar', 'tar.gz', 'bag.zip', 'bag.tar', 'bag.tgz', 'rocrate.zip' or 'bco.json'. Defaults to 'rocrate.zip'.

poll_interval

Seconds between status checks.

timeout

Maximum time to wait in seconds before giving up.

Value

For the character method, the path to the downloaded file. For the Galaxy method, the (unchanged) Galaxy object invisibly.

Examples


hid <- "0123456789abcdef"
crate <- galaxy_download_rocrate(hid, dest_file = "history_rocrate.zip")
g <- galaxy()
g <- galaxy_initialize(g)
g <- galaxy_download_rocrate(g, dest_file = "history_rocrate.zip")


GalaxyR documentation built on July 6, 2026, 5:08 p.m.