You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One could imagine the show method for SummarizedExperiment checking to see if there is evidence of HDF5 in the assay and if it finds it, it adds a line 'To serialize, use saveHDF5SummarizedExperiment.' It may not be completely foolproof but it might help.
Another approach that was suggested is to add save and saveRDS in BiocGenerics, and making them fail (advising use of special method) if handed an HDF5SummarizedExperiment derivate.
However there are several complications with this:
There's no HDF5SummarizedExperiment class. These objects are just SummarizedExperiment objects or derivatives and dispatch cannot be used to distinguish between those that have on-disk data from those that have in-memory data.
On-disk data could be present in any object, not just SummarizedExperiment objects. For example a GRanges object could have a TileDBMatrix object in its metadata columns.
save() cannot easily be turned into a generic.
There are situations where it's ok to call save() or saveRDS() on an object with on-disk data.
Feedback and suggestions are welcome.
The text was updated successfully, but these errors were encountered:
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':#> #> h5lshdf5_BS1#> An object of type 'BSseq' with#> 3 methylation loci#> 3 samples#> has not been smoothed#> Some assays are HDF5Array-backed
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.
The text was updated successfully, but these errors were encountered: