Skip to content

ArtifactDB/alabaster.bumpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Save BumpyMatrix objects to file

Environment Status
BioC-release Release OK
BioC-devel Devel OK

The alabaster.bumpy package implements methods for saving and loading BumpyMatrix objects under the alabaster framework. It provides a language-agnostic method for serializing data in bumpy matrices, most typically as assays of a SummarizedExperiment. To get started, install the package and its dependencies from Bioconductor:

# install.packages("BiocManager")
BiocManager::install("alabaster.bumpy")

Let's create a BumpyMatrix object:

library(BumpyMatrix)
library(S4Vectors)
df <- DataFrame(x=runif(100), y=runif(100))
f <- factor(sample(letters[1:20], nrow(df), replace=TRUE), letters[1:20])
mat <- BumpyMatrix(split(df, f), c(5, 4))

We save it to file:

library(alabaster.bumpy)
tmp <- tempfile()
saveObject(mat, tmp)

And then load it back:

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

About

Save and load BumpyMatrix objects from file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages