loadFraserDataSet: Loading/Saving FraserDataSets

Description Usage Arguments Value Examples

View source: R/saveHDF5Objects.R

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

1
2
3

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

FRASER documentation built on Feb. 3, 2021, 2:01 a.m.