DelayedDatasetDisk.Rd
A class that contains a dataset where its samples are backed on disk. Each sample is stored on a file, and when queued operations are executed files are loaded and saved on a new folder.
This class is not exported, but if you want to use it reach us at https://github.com/sipss/GCIMS/issues/ and we will export it.
GCIMS::DelayedDatasetBase
-> DelayedDatasetDisk
sampleNames
The character vector with unique sample names. Renaming samples renames files on obj$getCurrentDir()
as well
scratchDir
The directory where intermediate and processed files are saved.
new()
Create a delayed dataset on disk
DelayedDatasetDisk$new(
samples,
scratch_dir,
keep_intermediate = FALSE,
sample_class = NULL
)
samples
A named vector. The names are sample ids, the values are
either filenames or sample objects. If they are not filenames then the objects are dumped to disk.
If they are filenames, the filenames are relative to base_dir
.
scratch_dir
The directory where samples being processed will be saved
keep_intermediate
A logical value, whether intermediate realization steps should be saved.
sample_class
The class of the samples in the dataset, used just to validate the contract between
the delayed actions and the samples. If NULL
action return values are not checked
getSample()
Get a sample from the dataset
updateScratchDir()
Copies the samples to a new scratch directory and saves the dataset there as well
DelayedDatasetDisk$updateScratchDir(
new_scratch_dir,
dataset = NULL,
override_current_dir = NULL
)
new_scratch_dir
A new scratch directory to store samples
dataset
If an object is given, it is saved under the new_scratch_dir, with the samples.
override_current_dir
If not NULL
, assume samples are in this directory, instead of in self$getCurrentDir()
. Useful
when loading samples from a saved directory.
subset()
Subsets some samples