Documentation | Preprint | Discord
MuDataSeurat
is a package that provides I/O functionality for .h5mu
files and Seurat objects.
You can learn more about multimodal data containers in the mudata
documentation.
Installation
remotes::install_github("pmbio/MuDataSeurat")
Quick start
MuDataSeurat
provides a set of I/O operations for multimodal data.
MuDataSeurat
implements WriteH5MU()
that saves Seurat objects to .h5mu
files that can be further integrated into workflows in multiple programming languages, including the muon
Python library and the Muon.jl
Julia library. ReadH5MU()
reads .h5mu
files into Seurat objects.
MuDataSeurat
currently works for Seurat objects of v3 and above.
Writing files
Start with an existing dataset, e.g. a Seurat object with CITE-seq data:
library(SeuratData)
InstallData("bmcite")
bm <- LoadData(ds = "bmcite")
WriteH5MU()
allows to save the object into a .h5mu
file:
Please note that only standardised parts of the object are written to the file, and extra information from specific methods, stored in the Seurat object, might be omitted upon writing the file.
Reading files
bm <- ReadH5MU("bmcite.h5mu")
Please note that only the intersection of cells is currently loaded into the Seurat object due to the object structure limitation. Multimodal embeddings (global .obsm
slot) are loaded with the assay.used
field set to the default assay. Embeddings names are changed in order to comply with R & Seurat requirements and conventions.
Relevant projects
Other R packages for multimodal I/O include:
- MuData for MultiAssayExperiment objects
- SeuratDisk