Class representing a local SpatialExperiment object in a Vitessce dataset.
Super class
vitessceR::AbstractWrapper
-> SPEWrapper
Public fields
obj
The object to wrap.
img_sample_id
The sample_id for the image of interest.
img_image_id
The image_id for the image of interest.
cell_embeddings
The keys in the Seurat object's reductions/cell.embeddings to use for creating dimensionality reduction mappings.
cell_embedding_names
Names to use for creating dimensionality reduction mappings.
cell_embedding_dims
The dimension indices to use for creating dimensionality reduction mappings.
cell_set_metas
The keys in the Seurat object's meta.data to use for creating cell sets.
cell_set_meta_names
The keys in the Seurat object's meta.data to use for cell set names mapped to new names.
cell_set_meta_scores
The keys in the Seurat object's meta.data to use for cell set names mapped to keys for scores.
zarr_folder
The name for the folder at the root of the zarr store.
img_filename
The name for the folder at the root of the zarr store for the image.
Methods
Inherited methods
Method new()
Create a wrapper around a Seurat object.
Usage
SPEWrapper$new(
obj,
sample_id = NA,
image_id = NA,
cell_embeddings = NA,
cell_embedding_names = NA,
cell_embedding_dims = NA,
cell_set_metas = NA,
cell_set_meta_names = NA,
cell_set_meta_scores = NA,
...
)
Arguments
obj
The object to wrap.
sample_id
The sample_id for the image of interest.
image_id
The image_id for the image of interest.
cell_embeddings
The keys in the Seurat object's reductions/cell.embeddings to use for creating dimensionality reduction plots.
cell_embedding_names
Names to use for creating dimensionality reduction plots.
cell_embedding_dims
An array of dimension indices to use for each cell_embedding.
cell_set_metas
An optional list of keys in the object's meta.data list to use for creating cell sets.
cell_set_meta_names
If cell_set_metas is provided, this list can also be provided to set new names to replace the keys in the interface.
cell_set_meta_scores
If cell_set_metas is provided, this list can also be provided to map between meta.data keys for set annotations and keys for annotation scores.
...
Parameters inherited from
AbstractWrapper
.
Method get_zarr_path()
Get the path to the zarr store, relative to the current directory.
Method get_zarr_url()
Get the URL to the Zarr store, to fill in the file URL in the file definitions.
Method get_img_path()
Get the path to the image Zarr store, relative to the current directory.
Method get_img_url()
Get the URL to the image Zarr store, to fill in the file URL in the file definitions.
Method convert_and_save()
Create the JSON output files, web server routes, and file definition creators.
Method make_cells_file_def_creator()
Make the file definition creator function for the cells data type.
Method make_cell_sets_file_def_creator()
Make the file definition creator function for the cell sets data type.
Method make_expression_matrix_file_def_creator()
Make the file definition creator function for the expression matrix data type.
Method make_raster_file_def_creator()
Make the file definition creator function for the raster data type.
Examples
obj <- get_spe_obj()
w <- SPEWrapper$new(
obj,
sample_id = "sample1",
image_id = "image1"
)