Contents

1 Overview

The alabaster.se package implements methods to save SummarizedExperiment objects to file artifacts and load them back into R. Check out the alabaster.base for more details on the motivation and concepts of the alabaster framework.

2 Quick start

Given a (Ranged)SummarizedExperiment, we can use saveObject() to save it inside a staging directory:

library(SummarizedExperiment)
example(SummarizedExperiment, echo=FALSE) # can't be bothered to copy it here.
rse
## class: RangedSummarizedExperiment 
## dim: 200 6 
## metadata(0):
## assays(1): counts
## rownames: NULL
## rowData names(1): feature_id
## colnames(6): A B ... E F
## colData names(1): Treatment
library(alabaster.se)
tmp <- tempfile()
saveObject(rse, tmp)

list.files(tmp, recursive=TRUE)
##  [1] "OBJECT"                                 
##  [2] "assays/0/OBJECT"                        
##  [3] "assays/0/array.h5"                      
##  [4] "assays/names.json"                      
##  [5] "column_data/OBJECT"                     
##  [6] "column_data/basic_columns.h5"           
##  [7] "row_data/OBJECT"                        
##  [8] "row_data/basic_columns.h5"              
##  [9] "row_ranges/OBJECT"                      
## [10] "row_ranges/ranges.h5"                   
## [11] "row_ranges/sequence_information/OBJECT" 
## [12] "row_ranges/sequence_information/info.h5"

We can then load it back into the session with readObject().

roundtrip <- readObject(tmp)
class(roundtrip)
## [1] "RangedSummarizedExperiment"
## attr(,"package")
## [1] "SummarizedExperiment"

Session information

sessionInfo()
## R Under development (unstable) (2024-01-16 r85808)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.19-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] alabaster.se_1.3.4          alabaster.base_1.3.20      
##  [3] SummarizedExperiment_1.33.3 Biobase_2.63.0             
##  [5] GenomicRanges_1.55.3        GenomeInfoDb_1.39.6        
##  [7] IRanges_2.37.1              S4Vectors_0.41.3           
##  [9] BiocGenerics_0.49.1         MatrixGenerics_1.15.0      
## [11] matrixStats_1.2.0           BiocStyle_2.31.0           
## 
## loaded via a namespace (and not attached):
##  [1] Matrix_1.6-5            jsonlite_1.8.8          compiler_4.4.0         
##  [4] BiocManager_1.30.22     crayon_1.5.2            Rcpp_1.0.12            
##  [7] rhdf5filters_1.15.2     bitops_1.0-7            alabaster.matrix_1.3.10
## [10] jquerylib_0.1.4         yaml_2.3.8              fastmap_1.1.1          
## [13] lattice_0.22-5          R6_2.5.1                XVector_0.43.1         
## [16] S4Arrays_1.3.3          knitr_1.45              DelayedArray_0.29.5    
## [19] bookdown_0.37           GenomeInfoDbData_1.2.11 bslib_0.6.1            
## [22] rlang_1.1.3             HDF5Array_1.31.5        cachem_1.0.8           
## [25] xfun_0.42               alabaster.ranges_1.3.3  sass_0.4.8             
## [28] SparseArray_1.3.4       cli_3.6.2               Rhdf5lib_1.25.1        
## [31] zlibbioc_1.49.0         digest_0.6.34           grid_4.4.0             
## [34] alabaster.schemas_1.3.1 rhdf5_2.47.4            lifecycle_1.0.4        
## [37] evaluate_0.23           abind_1.4-5             RCurl_1.98-1.14        
## [40] rmarkdown_2.25          tools_4.4.0             htmltools_0.5.7