DelayedDatasetDisk.RdA 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
sampleNamesThe character vector with unique sample names. Renaming samples renames files on obj$getCurrentDir() as well
scratchDirThe 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
)samplesA 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_dirThe directory where samples being processed will be saved
keep_intermediateA logical value, whether intermediate realization steps should be saved.
sample_classThe 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_dirA new scratch directory to store samples
datasetIf an object is given, it is saved under the new_scratch_dir, with the samples.
override_current_dirIf 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