Methods for FOV objects

# S3 method for FOV
Cells(x, boundary = NULL, ...)

# S3 method for FOV
Features(x, set = NULL, ...)

# S3 method for FOV
FetchData(object, vars, cells = NULL, simplify = TRUE, ...)

# S3 method for FOV
GetTissueCoordinates(object, which = NULL, ...)

# S3 method for FOV
Keys(object, ...)

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

# S3 method for FOV
$(x, i, ...)

# S3 method for FOV
[(x, i, j, ...)

# S3 method for FOV
[[(x, i, ...)

# S3 method for FOV
length(x)

# S3 method for FOV
names(x)

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

# S4 method for FOV,character,missing,Centroids
[[(x, i, j, ...) <- value

# S4 method for FOV,character,missing,Molecules
[[(x, i, j, ...) <- value

# S4 method for FOV,character,missing,NULL
[[(x, i, j, ...) <- value

# S4 method for FOV,character,missing,Segmentation
[[(x, i, j, ...) <- value

# S4 method for FOV
show(object)

Arguments

x, object

A FOV object

boundary, set

Name of segmentation boundary or molecule set to extract cell or feature names for; pass NA to return all cells or feature names

...

Arguments passed to other methods

vars

A vector of variables to fetch; can be the name of a segmentation boundary, to get tissue coordinates, or molecule names, to get molecule coordinates

simplify

If only returning either boundary or molecule coordinates, return a single data frame instead of a list

which

Name of segmentation boundary or molecule set

new.names

vector of new cell names

i, cells

For [[ and [[<-, the name of a segmentation or “molecules”; for FetchData, subset. and [, a vector of cells to keep

j, features

For subset and [, a vector of features to keep; for [[<-, not used

value

For [[<-, a replacement Molecules, Centroids, or Segmentation object; otherwise NULL to remove the boundary stored at i

Value

Cells: A vector of cell names

Features: A vector of spatially-resolved molecule names; if no molecular information present, returns NULL

FetchData: If both molecule and boundary coordinates are requested, then a two-length list:

  • molecules”: A data frame with the molecule coordinates requested. If molecules requested are keyed, the keys are preserved in the data frame

  • coordinates”: A data frame with coordinates from the segmentation boundaries requested

If simplify is TRUE and only one data frame is generated, then only the data frame is returned. Otherwise, a one-length list is returned with the single data frame generated

GetTissueCoordinates: ...

Keys: A named vector of molecule set keys; names are the names of the molecule sets and values are the keys for the respective molecule set

RenameCells: object with the cells renamed to new.names

$, [[: The segmentation boundary or spatially-resolved molecule information stored at i

length: The number of segmentation layers (Segmentation or Centroids objects)

names: A vector of segmentation boundary and molecule set names

subset: x with just the cells and features specified

[[<-: Varies depending on the class of value:

  • If value is NULL, returns x with the boundary i removed; also allows removing molecules; does not allow removing the default segmentation

  • If value is a Molecules, returns x with value stored in molecules; requires that i is “molecules”

  • Otherwise, stores value as a segmentation boundary named i

show: Invisibly returns NULL

Details

The following methods are defined for interacting with a FOV object:

Cells: Get cell names

Features: Get spatially-resolved molecule names

FetchData: Fetch boundary and/or molecule coordinates from a FOV object

GetTissueCoordinates: Get boundary or molecule coordinates from a FOV object

Keys: Get the keys of molecule sets contained within a FOV object

RenameCells: Update cell names

$, [[: Extract a segmentation boundary

length: Get the number of segmentation layers in a FOV object

names: Get the names of segmentation layers and molecule sets

subset, [: Subset a FOV object

[[<-: Add or remove segmentation layers and molecule information to/from a FOV object

show: Display an object summary to stdout

See also