Writes a single assay to an existing HDF5 file.
References
The HDF Group (1997-2024). "Hierarchical Data Format, version 5." https://www.hdfgroup.org/HDF5/
Examples
# Create a PhysioExperiment and write it to a temporary HDF5 file
pe <- PhysioExperiment(
assays = list(raw = matrix(rnorm(1000), nrow = 100, ncol = 10)),
samplingRate = 100
)
tmp <- tempfile(fileext = ".h5")
writePhysioHDF5(pe, tmp)
# Add a second assay to the object and write only that assay to the file
SummarizedExperiment::assay(pe, "scaled") <-
SummarizedExperiment::assay(pe, "raw") * 2
writeAssayHDF5(pe, tmp, "scaled")
unlink(tmp)