Skip to contents

In order to make a Seurat object with semla, you can use AddSemlaToSeurat to add the required data to the Seurat object. This assumes that the Seurat object contains one or more "VisiumV1" object(s) in the images slot. Alternatively, you can convert a Seurat object with "SlideSeq" data.

Usage

UpdateSeuratForSemla(
  object,
  image_type = c("tissue_lowres", "tissue_hires"),
  verbose = TRUE
)

Arguments

object

An object of class Seurat with Visium data

image_type

One of "tissue_lowres" or "tissue_hires", specifying what H&E image was loaded into the Seurat object. Only used for "VisiumV1" data.

verbose

Print messages

Value

A Seurat object compatible with semla

VisiumV1

Note that you need to specify what H&E image was loaded, one of "tissue_lowres" or "tissue_hires". If this argument is incorrect, the tissue coordinates will be misplaced.

Visit the getting started tutorial on our package website for an example on how to convert a Seurat object with VisiumV1 data.

SlideSeq

For SlideSeq data, there's no additional H&E image provided. If you convert a Seurat object containing SlideSeq data, all image related functionality of semla will be inaccessible.

Examples


if (FALSE) {
library(semla)
library(SeuratData)

# Load example Seurat object with VisiumV1 data
InstallData("stxBrain")
brain <- LoadData("stxBrain", type = "anterior1")

# Make Seurat object compatible with semla
brain_semla <- UpdateSeuratForSemla(brain)

# Load example Seurat object with SlideSeq data
InstallData("ssHippo")
slide_seq <- LoadData("ssHippo")

# Make Seurat object compatible with semla
slide_seq <- UpdateSeuratForSemla(slide_seq)
}