galaxy_delete_datasets: Delete multiple Galaxy datasets by ID

View source: R/2025-10-27_JF_R_Galaxy_functions.R

galaxy_delete_datasetsR Documentation

Delete multiple Galaxy datasets by ID

Description

Convenience wrapper that deletes a vector of dataset IDs using galaxy_delete_dataset. Requests are paced with a small sleep between calls to avoid overwhelming the server.

Usage

galaxy_delete_datasets(
  output_ids,
  purge = TRUE,
  sleep = 0.2,
  galaxy_url = "https://usegalaxy.eu"
)

Arguments

output_ids

Character vector of dataset IDs to delete.

purge

Logical. Passed to galaxy_delete_dataset. Default: TRUE.

sleep

Numeric. Seconds to wait between API calls. Default: 0.2.

galaxy_url

Character. Base URL of the Galaxy instance (for example "https://usegalaxy.eu"). If the environment variable GALAXY_URL is set, it takes precedence.

Value

A named list where each element is the return value from galaxy_delete_dataset for the corresponding dataset ID.

Examples


input_file <- tempfile(fileext = ".txt")
input_file2 <- tempfile(fileext = ".txt")
test_text <- "This is an example \nfile."
writeLines(test_text,input_file)
writeLines(test_text,input_file2)
history_id <- galaxy_initialize("test upload")
dataset_id <- galaxy_upload_https(input_file, history_id)
dataset_id2 <- galaxy_upload_https(input_file2, history_id)

galaxy_delete_datasets(list(output_ids = c(dataset_id, dataset_id2)))


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