loadFraserDataSet: Loading/Saving FraserDataSets

View source: R/saveHDF5Objects.R

loadFraserDataSetR Documentation

Loading/Saving FraserDataSets

Description

This is a convenient function to load and save a FraserDataSet object. It looks and saves the FraserDataSet objects and HDF5 files on disk under the given working dir. Internally it uses HDF5 files for all assays.

Usage

loadFraserDataSet(dir, name = NULL, file = NULL, upgrade = FALSE)

saveFraserDataSet(fds, dir = NULL, name = NULL, rewrite = FALSE)

Arguments

dir

A path where to save the objects (replaces the working directory)

name

The analysis name of the project (saved within the 'dir')

file

The file path to the fds-object.RDS file that should be loaded.

upgrade

Should the version of the loaded object be updated?

fds

A FraserDataSet object ot be saved

rewrite

logical if the object should be rewritten. This makes sense if you have filtered or subsetted the object and want to save only the subsetted version

Value

FraserDataSet

Examples

fds <- createTestFraserSettings()
name(fds) <- "saveing_test"

# make sure the object is saved to disc
dontWriteHDF5(fds) <- FALSE
fdsSaved <- saveFraserDataSet(fds)
fdsSaved

# load object from disc
fdsLoaded <- loadFraserDataSet(dir=workingDir(fds), name=name(fds))
fdsLoaded

all.equal(fdsSaved, fdsLoaded)


c-mertes/FRASER documentation built on June 14, 2024, 7:49 p.m.