Class for representing a SOMACollection
, which may contain of one or more
SOMA
s.
tiledbsc::TileDBObject
-> tiledbsc::TileDBGroup
-> SOMACollection
uns
Named list of unstructured objects.
somas
Retrieve SOMA
members.
Inherited methods
tiledbsc::TileDBObject$class()
tiledbsc::TileDBObject$exists()
tiledbsc::TileDBGroup$add_member()
tiledbsc::TileDBGroup$add_metadata()
tiledbsc::TileDBGroup$count_members()
tiledbsc::TileDBGroup$get_member()
tiledbsc::TileDBGroup$get_members()
tiledbsc::TileDBGroup$get_metadata()
tiledbsc::TileDBGroup$group_exists()
tiledbsc::TileDBGroup$list_member_uris()
tiledbsc::TileDBGroup$list_members()
tiledbsc::TileDBGroup$list_object_uris()
tiledbsc::TileDBGroup$list_objects()
tiledbsc::TileDBGroup$print()
tiledbsc::TileDBGroup$remove_member()
tiledbsc::TileDBGroup$tiledb_group()
new()
Create a new SOMACollection
. The existing TileDB group is
opened at the specified array uri
if one is present, otherwise a new
array group is created. The members
field is populated with
SOMA
objects for each URI passed explicitly to soma_uris
, as
well SOMA
objects discovered within the SOMACollection
object's
TileDB group.
SOMACollection$new(uri, verbose = TRUE, config = NULL, ctx = NULL)
set_query()
Set query parameters to slice by dimension values or filter by attribute values that are applied to all SOMAs within the collection.
SOMACollection$set_query(
obs_ids = NULL,
var_ids = NULL,
obs_attr_filter = NULL,
var_attr_filter = NULL
)
from_seurat()
Convert a Seurat object to a TileDB-backed SOMACollection
.
Each [SeuratObject::Assay
] is converted to a SOMA
and written to
a nested TileDB group with a URI of ./soma_<assay>
where <assay>
is the name of the Seurat assay.
Cell identities in the SeuratObject::Seurat
are maintained by
creating an active_ident
attribute in obs
that stores the factor
levels as a character vector.
Dimensionality reduction results are stored as obsm
and varm
arrays
within an SOMA
. The SeuratObject::DimReduc
object's key
slot is
used to determine which SOMA
to store the results in. The array names
are (obsm|varm)_dimreduction_<name>
, where <name>
is the name of the
dimensionality reduction method (e.g., "pca"
).
object
A SeuratObject::Seurat
object.
to_seurat()
Convert to a SeuratObject::Seurat object.
project
SeuratObject::Project
name for the Seurat
object
somas
character vector, names of SOMA
s to include as
SeuratObject::Assay
s in the Seurat
object. If NULL
, all SOMA
s
are included. Can also be a named list of character vectors, where each
element corresponds to a SOMA
name and the value is a character vector
of X
layers from that SOMA
to include as assays (e.g., list("RNA" = c("counts", "logcounts"))
).
batch_mode
logical, if TRUE
, batch query mode is enabled for
retrieving X
layers. See
AssayMatrix$to_dataframe()
for more information.
soma_uris()
List the SOMA
URIs in the collection.
A vector of URIs for each SOMA
in the collection.