| Segmentation-methods {SeuratObject} | R Documentation |
Segmentation Methods
Description
Methods for Segmentation
objects
Usage
## S3 method for class 'Segmentation'
Cells(x, ...)
## S3 method for class 'Segmentation'
GetTissueCoordinates(object, full = TRUE, ...)
## S3 method for class 'Segmentation'
RenameCells(object, new.names = NULL, ...)
## S3 method for class 'Segmentation'
lengths(x, use.names = TRUE)
## S3 method for class 'Segmentation'
subset(x, cells = NULL, ...)
## S4 method for signature 'Segmentation,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'Segmentation'
coordinates(obj, full = TRUE, ...)
## S4 method for signature 'Segmentation'
show(object)
Arguments
x, object, obj |
A
|
... |
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 |
j, drop |
Ignored |
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
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
Progress Updates with progressr
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 future
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")
See Also
Segmentation layer classes:
Centroids-class,
Centroids-methods,
Molecules-class,
Molecules-methods,
Segmentation-class