galaxy_list_files: List all files (datasets) in a Galaxy history

galaxy_list_filesR Documentation

List all files (datasets) in a Galaxy history

Description

galaxy_list_files() is an S4 generic. With x as a character scalar, it is treated as a Galaxy history ID and returns a data frame of history datasets (files). With x as a Galaxy object, the history ID and URL are taken from the object.

Usage

galaxy_list_files(
  x,
  include_deleted = FALSE,
  include_hidden = FALSE,
  galaxy_url = "https://usegalaxy.eu",
  limit = 500L
)

## S4 method for signature 'character'
galaxy_list_files(
  x,
  include_deleted = FALSE,
  include_hidden = FALSE,
  galaxy_url = "https://usegalaxy.eu",
  limit = 500L
)

## S4 method for signature 'Galaxy'
galaxy_list_files(
  x,
  include_deleted = FALSE,
  include_hidden = FALSE,
  limit = 500L
)

Arguments

x

A history ID (character) or a Galaxy object.

include_deleted

Logical; if TRUE, include deleted datasets. Default: FALSE.

include_hidden

Logical; if TRUE, include hidden datasets. Default: FALSE.

galaxy_url

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

limit

Integer page size for API pagination. Default: 500L.

Details

The function queries ⁠/api/histories/{history_id}/contents⁠ using pagination and returns one row per history content item, restricted to datasets (history_content_type == "dataset" when available).

Value

A data.frame with one row per dataset and columns:

id

Encoded dataset ID.

name

Dataset name.

history_id

Encoded history ID.

history_content_type

Usually "dataset".

type

Galaxy item type (if provided by server).

state

Dataset state (e.g. "ok", "running", "error").

deleted

Logical deletion flag.

hidden

Logical hidden flag.

file_ext

Datatype extension (if available).

file_size

Dataset size in bytes (if available).

create_time

Creation timestamp (if available).

update_time

Update timestamp (if available).

If no datasets are found, an empty data frame with these columns is returned.

Examples


# Character method (history_id)
hid <- galaxy_initialize("List files example")
files_df <- galaxy_list_files(hid)
head(files_df)

# Galaxy-object method
g <- galaxy(history_name = "List files example")
g <- galaxy_initialize(g)
files_df2 <- galaxy_list_files(g)
head(files_df2)


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