GetCropWindows: Get crop geometries

GetCropWindowsR Documentation

Get crop geometries

Description

This function can be used to define "crop windows" based on sets of target spots.

Usage

GetCropWindows(
  object,
  group.by = NULL,
  groups.to.keep = NULL,
  symmetric = TRUE,
  keep.all.spots = FALSE,
  xy_padding = 50
)

Arguments

object

A Seurat object created with STutility

group.by

A meta.data column to group the spots by. Only character vector or factors are allowed. Selects "labels" by default.

groups.to.keep

Provide a caharcter vector of groups to keep.

symmetric

Make crop window square. This will mkae it easier to align images in dowstream processing steps.

keep.all.spots

Keep all spots within selected crop windows and not just the spots belonging to the predefined groups. All spots that are present in multiple crop windows will be removed.

xy_padding

Increase the crop area in all directions. Given in pixels.

Value

A list of "crop geometries" to be used with CropImages)


jbergenstrahle/STUtility documentation built on March 14, 2023, 7:15 a.m.