View source: R/2025-10-27_JF_R_Galaxy_functions.R
| galaxy_delete_dataset | R Documentation |
Delete a dataset (HDA) from a Galaxy instance using the Galaxy API.
galaxy_delete_dataset(
dataset_id,
purge = TRUE,
verbose = FALSE,
galaxy_url = "https://usegalaxy.eu"
)
dataset_id |
Character. The Galaxy dataset ID to delete. |
purge |
Logical. If |
verbose |
Logical. If |
galaxy_url |
Character. Base URL of the Galaxy instance
(for example |
This function performs an HTTP DELETE against the Galaxy
/api/datasets/id endpoint. By default it requests a purge
(permanent removal) by adding ?purge=true. The Galaxy API key is
read from the environment variable GALAXY_API_KEY.
Make sure Sys.getenv("GALAXY_API_KEY") is set to a valid API key..
Use caution when running with purge = TRUE as this permanently
removes data.
A named list with elements:
Logical. TRUE for 2xx responses, otherwise FALSE.
Integer. HTTP status code returned by the API.
Character. The raw response body (text).
input_file <- tempfile(fileext = ".txt")
test_text <- "This is an example \nfile."
writeLines(test_text,input_file)
history_id <- galaxy_initialize()
dataset_id <- galaxy_upload_https(input_file, history_id)
galaxy_delete_dataset(dataset_id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.