HDF5MultiAssayExperiment | R Documentation |
This function takes a MultiAssayExperiment
object and uses the assays
functionality to obtain data matrices out of the experiments. These are
then saved into the .h5
file format. This function relies heavily on
the HDF5Array
package whose installation is required before use.
saveHDF5MultiAssayExpeirment
preserves the classes contained in the
ExperimentList
with the exception of matrix
which is
converted to HDF5Matrix
. Internal SummarizedExperiment
assays are
converted to HDF5-backed assays as in
HDF5Array::saveHDF5SummarizedExperiment
. SummarizedExperiment
objects with multiple i
-th assays will have the first assay take
precedence and others assays will be dropped with a warning.
If the first assay in a SummarizedExperiment
contains an array,
the array is preserved in the process of saving and loading the
HDF5-backed MultiAssayExperiment
.
saveHDF5MultiAssayExperiment(
x,
dir = "h5_mae",
prefix = NULL,
replace = FALSE,
chunkdim = NULL,
level = NULL,
as.sparse = NA,
verbose = NA
)
loadHDF5MultiAssayExperiment(dir = "h5_mae", prefix = NULL)
x |
A |
dir |
The path (as a single string) to the directory where to save the
HDF5-based When saving, the directory will be created if it doesn't already exist.
If the directory already exists and no prefix is specified and
|
prefix |
An optional prefix to add to the names of the files created
inside |
replace |
When no prefix is specified, should a pre-existing directory be replaced with a new empty one? The content of the pre-existing directory will be lost! |
chunkdim , level |
The dimensions of the chunks and the compression level to use for writing the assay data to disk. Passed to the internal calls to |
as.sparse |
Whether the assay data should be flagged as sparse or not. If set to
Passed to the internal calls to |
verbose |
Set to In the case of |
saveHDF5MultiAssayExperiment
: saves an Rds
and h5
file to a
directory from the input MultiAssayExperiment
loadHDF5MultiAssayExperiment
: a MultiAssayExperiment
object loaded
from a folder as saved by saveHDF5MultiAssayExperiment
data("miniACC")
testDir <- file.path(tempdir(), "test_mae")
saveHDF5MultiAssayExperiment(
miniACC, dir = testDir, verbose = TRUE, replace = TRUE
)
## inspect the files in the dir
list.files(testDir)
loadHDF5MultiAssayExperiment(
dir = testDir
)
## remove example files
unlink(testDir, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.