Skip to contents

Write a Seurat object to a SOMA

Usage

# S3 method for Seurat
write_soma(x, uri, ..., platform_config = NULL, tiledbsoma_ctx = NULL)

Arguments

x

A Seurat object

uri

URI for resulting SOMA object

...

Arguments passed to other methods

platform_config

Optional platform configuration

tiledbsoma_ctx

Optional SOMATileDBContext

Value

The URI to the resulting SOMAExperiment generated from the data contained in x

Writing Cell-Level Meta Data

Cell-level meta data is written out as a data frame called “obs” at the experiment level

Writing Assays

Seurat Assay objects are written out as individual measurements:

  • the “data” matrix is written out a sparse matrix called “data” within the “X” group

  • the “counts” matrix, if not empty, is written out a sparse matrix called “counts” within the “X” group

  • the “scale.data” matrix, if not empty, is written out a sparse matrix called “scale_data” within the “X” group

  • feature-level meta data is written out as a data frame called “var

Expression matrices are transposed (cells as rows) prior to writing. All other slots, including results from extended assays (eg. SCTAssay, ChromatinAssay) are lost

Writing DimReducs

Seurat DimReduc objects are written out to the “obsm” and “varm” groups of a measurement:

  • cell embeddings are written out as a sparse matrix in the “obsm” group

  • feature loadings, if not empty, are written out as a sparse matrix in the “varm” groups; loadings are padded with NAs to include all features

Dimensional reduction names are translated to AnnData-style names (eg. “pca” becomes X_pca for embeddings and “PCs” for loadings). All other slots, including projected feature loadings and jackstraw information, are lost

Writing Graphs

Seurat Graph objects are written out as sparse matrices to the “obsp” group of a measurement

Writing SeuratCommands

Seurat command logs are written out as data frames to the “seurat_commands” group of a collection