Open hpages opened 2 years ago
FWIW in BSseq we have a modified show()
that alerts the user that some of the assays are HDF5-backed (it doesn't handle other on-disk backends) but it doesn't provide specific advice about how to save/serialize the object.
suppressPackageStartupMessages(library(bsseq))
suppressWarnings(example("BSseq", "bsseq", echo = FALSE, verbose = FALSE))
#> Loading required package: DelayedArray
#> Loading required package: Matrix
#>
#> Attaching package: 'Matrix'
#> The following object is masked from 'package:S4Vectors':
#>
#> expand
#>
#> Attaching package: 'DelayedArray'
#> The following objects are masked from 'package:base':
#>
#> aperm, apply, rowsum, scale, sweep
#> Loading required package: rhdf5
#>
#> Attaching package: 'HDF5Array'
#> The following object is masked from 'package:rhdf5':
#>
#> h5ls
hdf5_BS1
#> An object of type 'BSseq' with
#> 3 methylation loci
#> 3 samples
#> has not been smoothed
#> Some assays are HDF5Array-backed
Created on 2021-10-08 by the reprex package (v2.0.1)
Vince (@vjcitn) suggested:
Motivated by https://community-bioc.slack.com/archives/C6KJHH0M9/p1633536980007800
Another approach that was suggested is to add
save
andsaveRDS
in BiocGenerics, and making them fail (advising use of special method) if handed an HDF5SummarizedExperiment derivate.However there are several complications with this:
save()
cannot easily be turned into a generic.save()
orsaveRDS()
on an object with on-disk data.Feedback and suggestions are welcome.