Skip to contents

Creates a new `H5ClusterRunSummary` object, representing a single run of summary cluster time-series data from an HDF5 file.

It performs validation, checks for the existence of the summary dataset, and determines `n_time` from the dataset dimensions.

Usage

make_run_summary(
  file_source,
  scan_name,
  mask,
  clusters,
  cluster_names = character(),
  cluster_ids = integer(),
  summary_dset = "summary_data"
)

Arguments

file_source

Either an open `H5File` object or a character string path to the HDF5 file.

scan_name

The character string name of the scan (e.g., "run1").

mask

A `LogicalNeuroVol` object for the brain mask (used for reference/consistency).

clusters

A `ClusteredNeuroVol` object for cluster assignments. This is required for consistency and reference, even though summary data is accessed.

cluster_names

(Optional) Character vector of names for the clusters.

cluster_ids

(Optional) Integer vector of IDs for the clusters.

summary_dset

(Optional) The name of the dataset within the run's summary group (default: "summary_data").

Value

A new `H5ClusterRunSummary` object.

Examples

if (FALSE) { # \dontrun{
# Note: This function is deprecated in favor of H5ClusterRunSummary()

# Create temporary HDF5 file
temp_file <- tempfile(fileext = ".h5")
exp_file <- fmristore:::create_minimal_h5_for_H5ClusterExperiment(file_path = temp_file)

# Create mask
mask <- fmristore:::create_minimal_LogicalNeuroVol(dims = c(5, 5, 4))

# Create summary run object (deprecated - will show deprecation warning)
suppressWarnings({
  run_summary <- make_run_summary(exp_file, scan_name = "Run2_Summary", mask = mask)
})

# Clean up - note: make_run_summary returns an object that doesn't own the file handle
unlink(temp_file)
} # }