Learn R Programming

SeuratObject (version 5.0.2)

Segmentation-methods: Segmentation Methods

Description

Methods for Segmentation objects

Usage

# S3 method for Segmentation
Cells(x, ...)

# S3 method for Segmentation GetTissueCoordinates(object, full = TRUE, ...)

# S3 method for Segmentation RenameCells(object, new.names = NULL, ...)

# S3 method for Segmentation lengths(x, use.names = TRUE)

# S3 method for Segmentation subset(x, cells = NULL, ...)

# S4 method for Segmentation,ANY,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for Segmentation coordinates(obj, full = TRUE, ...)

# S4 method for Segmentation show(object)

Value

Cells: A vector of cell names

GetTissueCoordinates, coordinates: A data frame with three columns:

  • x”: the x-coordinate

  • y”: the y-coordinate

  • cell” or “ID”: the cell name

If full is TRUE, then each coordinate will indicate a vertex for the cell polygon; otherwise, each coordinate will indicate a centroid for the cell. Note: GetTissueCoordinates ....

RenameCells: object with the cells renamed to new.names

lengths: An rle object for the cells

subset, [: x subsetted to the cells specified by cells/i

show: Invisibly returns NULL

Arguments

x, object, obj

A Segmentation object

...

Arguments passed to other methods

full

Expand the coordinates to the full polygon

new.names

vector of new cell names

use.names

Ignored

i, cells

A vector of cells to keep; if NULL, defaults to all cells

j, drop

Ignored

Progress Updates with <span class="pkg">progressr</span>

The following methods use progressr to render status updates and progress bars:

  • RenameCells

To enable progress updates, wrap the function call in with_progress or run handlers(global = TRUE) before running this function. For more details about progressr, please read vignette("progressr-intro")

Parallelization with <span class="pkg">future</span>

The following methods use future to enable parallelization:

  • RenameCells

Parallelization strategies can be set using plan. Common plans include “sequential” for non-parallelized processing or “multisession” for parallel evaluation using multiple R sessions; for other plans, see the “Implemented evaluation strategies” section of ?future::plan. For a more thorough introduction to future, see vignette("future-1-overview")

Details

Cells: Get cell names

GetTissueCoordinates, coordinates: Get tissue coordinates

RenameCells: Update cell names

lengths: Generate a run-length encoding of the cells present

subset, [: Subset a Segmentation object to certain cells

show: Display an object summary to stdout

See Also

Segmentation-class

Segmentation layer classes: Centroids-class, Centroids-methods, Molecules-class, Molecules-methods, Segmentation-class