FilterSlideSeq: Filter stray beads from Slide-seq puck

View source: R/objects.R

FilterSlideSeqR Documentation

Filter stray beads from Slide-seq puck

Description

This function is useful for removing stray beads that fall outside the main Slide-seq puck area. Essentially, it's a circular filter where you set a center and radius defining a circle of beads to keep. If the center is not set, it will be estimated from the bead coordinates (removing the 1st and 99th quantile to avoid skewing the center by the stray beads). By default, this function will display a SpatialDimPlot showing which cells were removed for easy adjustment of the center and/or radius.

Usage

FilterSlideSeq(
  object,
  image = "image",
  center = NULL,
  radius = NULL,
  do.plot = TRUE
)

Arguments

object

Seurat object with slide-seq data

image

Name of the image where the coordinates are stored

center

Vector specifying the x and y coordinates for the center of the inclusion circle

radius

Radius of the circle of inclusion

do.plot

Display a SpatialDimPlot with the cells being removed labeled.

Value

Returns a Seurat object with only the subset of cells that pass the circular filter

Examples

## Not run: 
# This example uses the ssHippo dataset which you can download
# using the SeuratData package.
library(SeuratData)
data('ssHippo')
# perform filtering of beads
ssHippo.filtered <- FilterSlideSeq(ssHippo, radius = 2300)
# This radius looks to small so increase and repeat until satisfied

## End(Not run)

satijalab/seurat documentation built on May 11, 2024, 4:04 a.m.